Skip to content

blosc_getitem return value seems inconsistent (DeepState fuzzing) #93

@agroce

Description

@agroce

Whether I assert that it is the #bytes of the #items, some tests seem to violate the claim. Is this known/expected?

	      unsigned start_item = DeepState_UIntInRange(0, num_elements-1);
	      unsigned num_items = DeepState_UIntInRange(0, num_elements-start_item);
	      LOG(TRACE) << "Getting " << num_items << " from " << start_item;
	      int get_result = blosc_getitem(intermediate, start_item, num_items, items);
	      //ASSERT_EQ(get_result, num_items * type_size) <<
	      //"Getting " << num_items << " from " << start_item << " expected: " << num_items * type_size << ": got " << get_result;

If I allow either:

             ASSERT((get_result == num_items) || (get_result == (num_items * type_size))) <<
                "Getting " << num_items << " from " << start_item << " with size " << type_size << ": got " << get_result;

it never fails, but that's not a consistent API. I can minimize a failing example, if you can clarify which is the expected return value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions