Lines Matching refs:status

101     status_t status;  in test_basic_read_write()  local
139 status = norfs_put_obj(char_key, char_array, sizeof(char_array), 0); in test_basic_read_write()
140 EXPECT_EQ(NO_ERROR, status, "norfs_put_obj returned error"); in test_basic_read_write()
141 status = norfs_put_obj(int_key, (unsigned char *)&big_int, sizeof(big_int), 0); in test_basic_read_write()
142 EXPECT_EQ(NO_ERROR, status, "norfs_put_obj returned error"); in test_basic_read_write()
144 status = norfs_read_obj(char_key, char_array_buffer, sizeof(unsigned char)*6, in test_basic_read_write()
146 EXPECT_EQ(NO_ERROR, status, "norfs_read_obj returned error"); in test_basic_read_write()
147 if (status) in test_basic_read_write()
150 status = norfs_read_obj(int_key, (unsigned char *)&big_int_buffer, in test_basic_read_write()
152 EXPECT_EQ(NO_ERROR, status, "norfs_read_obj returned error"); in test_basic_read_write()
153 if (status) in test_basic_read_write()
156 if (!status) { in test_basic_read_write()
172 status = norfs_read_obj_iovec(17, iov_out, iov_out_count, &obj_len, 0); in test_basic_read_write()
173 EXPECT_EQ(NO_ERROR, status, "norfs_read_obj returned error for iovec"); in test_basic_read_write()
175 if (!status) { in test_basic_read_write()
200 status = norfs_read_obj(char_key, char_array_buffer, sizeof(unsigned char)*6, in test_basic_read_write()
202 EXPECT_EQ(NO_ERROR, status, "norfs_read_obj returned error"); in test_basic_read_write()
203 if (status) in test_basic_read_write()
205 status = norfs_read_obj(int_key, (unsigned char *)&big_int_buffer, in test_basic_read_write()
207 EXPECT_EQ(NO_ERROR, status, "norfs_read_obj returned error"); in test_basic_read_write()
208 if (status) in test_basic_read_write()
211 if (!status) { in test_basic_read_write()
225 status = norfs_read_obj_iovec(17, iov_out, iov_out_count - 1, &obj_len, 0); in test_basic_read_write()
227 EXPECT_EQ(NO_ERROR, status, "norfs_read_obj returned error for iovec"); in test_basic_read_write()
229 if (!status) { in test_basic_read_write()
244 status = norfs_remove_obj(17); in test_basic_read_write()
245 EXPECT_EQ(NO_ERROR, status, "Error when removing object"); in test_basic_read_write()
247 status = norfs_read_obj_iovec(17, iov_out, 2, &obj_len, 0); in test_basic_read_write()
248 EXPECT_EQ(ERR_NOT_FOUND, status, "Found object when unexpected"); in test_basic_read_write()
250 status = norfs_remove_obj(17); in test_basic_read_write()
251 EXPECT_EQ(ERR_NOT_FOUND, status, "Allowed redundant delete of object"); in test_basic_read_write()
266 status_t status = NO_ERROR; in test_garbage_collection() local
272 status = norfs_put_obj(4, array, size, 0); in test_garbage_collection()
273 EXPECT_EQ(NO_ERROR, status, in test_garbage_collection()
281 status = norfs_put_obj(j, array, size, 0); in test_garbage_collection()
282 EXPECT_EQ(NO_ERROR, status, in test_garbage_collection()
284 if (status) in test_garbage_collection()
287 if (status) in test_garbage_collection()
291 status = norfs_read_obj(4, array, size, &bytes_read, 0); in test_garbage_collection()
292 EXPECT_EQ(NO_ERROR, status, in test_garbage_collection()
329 status_t status; in test_deletion() local
341 status = get_inode(2, &inode); in test_deletion()
342 EXPECT_EQ(true, status, in test_deletion()
344 if (!status) in test_deletion()
393 status_t status = norfs_read_obj(2, buff, 4, &bytes_read, 0); in test_corruption() local
394 EXPECT_EQ(NO_ERROR, status, in test_corruption()
403 status = norfs_read_obj(4, buff, 4, &bytes_read, 0); in test_corruption()
404 EXPECT_EQ(ERR_NOT_FOUND, status, "Corrupted object should not be found"); in test_corruption()
405 status = norfs_read_obj(0, buff, 4, &bytes_read, 0); in test_corruption()
406 EXPECT_EQ(ERR_NOT_FOUND, status, in test_corruption()
420 status_t status; in test_deletion_objects_retained_during_gc() local
431 status = norfs_put_obj(key, obj, obj_len, 0); in test_deletion_objects_retained_during_gc()
432 EXPECT_EQ(NO_ERROR, status, "Error putting object"); in test_deletion_objects_retained_during_gc()
435 status = norfs_remove_obj(key); in test_deletion_objects_retained_during_gc()
436 EXPECT_EQ(status, NO_ERROR, "Error removing object"); in test_deletion_objects_retained_during_gc()
438 status = norfs_read_obj(key, obj, obj_len, &bytes_read, 0); in test_deletion_objects_retained_during_gc()
439 EXPECT_EQ(ERR_NOT_FOUND, status, "Object not removed"); in test_deletion_objects_retained_during_gc()
443 status = norfs_read_obj(key, obj, obj_len, &bytes_read, 0); in test_deletion_objects_retained_during_gc()
444 EXPECT_EQ(ERR_NOT_FOUND, status, in test_deletion_objects_retained_during_gc()
447 status = norfs_put_obj(key, obj, obj_len, 0); in test_deletion_objects_retained_during_gc()
448 EXPECT_EQ(NO_ERROR, status, "Error putting object"); in test_deletion_objects_retained_during_gc()
486 status_t status; in test_thrash_fs() local
507 status = norfs_remove_obj(key); in test_thrash_fs()
509 EXPECT_EQ(ERR_NOT_FOUND, status, in test_thrash_fs()
512 EXPECT_EQ(NO_ERROR, status, in test_thrash_fs()
514 if (status) { in test_thrash_fs()
523 status = norfs_put_obj_iovec(key, iov, 1, 0); in test_thrash_fs()
524 EXPECT_EQ(NO_ERROR, status, in test_thrash_fs()
529 status = norfs_put_obj(key, (unsigned char *)&i, sizeof(i), 0); in test_thrash_fs()
530 EXPECT_EQ(NO_ERROR, status, in test_thrash_fs()
536 status = norfs_read_obj_iovec(key, iov, 1, &bytes_read, 0); in test_thrash_fs()
538 EXPECT_EQ(ERR_NOT_FOUND, status, in test_thrash_fs()
541 EXPECT_EQ(NO_ERROR, status, in test_thrash_fs()
544 if (status || state[key] != *(int *)iov->iov_base) { in test_thrash_fs()
551 status = norfs_read_obj(key, (unsigned char *)&int_buff, sizeof(int), in test_thrash_fs()
554 EXPECT_EQ(ERR_NOT_FOUND, status, in test_thrash_fs()
557 EXPECT_EQ(NO_ERROR, status, in test_thrash_fs()
560 if (status || state[key] != int_buff) { in test_thrash_fs()
578 status = norfs_read_obj(i, (unsigned char *)&int_buff, sizeof(int), &bytes_read, 0); in test_thrash_fs()
580 EXPECT_EQ(ERR_NOT_FOUND, status, in test_thrash_fs()
583 EXPECT_EQ(NO_ERROR, status, in test_thrash_fs()
600 status_t status; in test_overflow_filesystem() local
603 status = norfs_put_obj(i, &obj, sizeof(obj), 0); in test_overflow_filesystem()
604 if (status != NO_ERROR) { in test_overflow_filesystem()
605 EXPECT_EQ(ERR_NO_MEMORY, status, "put_obj returned unexpected error"); in test_overflow_filesystem()
608 if (status != ERR_TOO_BIG) { in test_overflow_filesystem()
617 status = norfs_remove_obj(j); in test_overflow_filesystem()
619 status = norfs_put_obj(i, &obj, sizeof(obj), 0); in test_overflow_filesystem()
620 EXPECT_EQ(NO_ERROR, status, "Error after clearing space for new objects"); in test_overflow_filesystem()