• Home
  • Raw
  • Download

Lines Matching refs:ret

186 	int ret, bytes_read = 0;  in read_adi()  local
191 ret = read(fd, buf + bytes_read, buf_sz - bytes_read); in read_adi()
193 if (ret < 0) in read_adi()
198 bytes_read += ret; in read_adi()
211 int ret, i, bytes_read = 0; in pread_adi() local
218 ret = pread(fd, buf + bytes_read, buf_sz - bytes_read, in pread_adi()
221 if (ret < 0) in pread_adi()
226 bytes_read += ret; in pread_adi()
227 cur_offset += ret; in pread_adi()
242 int ret, bytes_written = 0; in write_adi() local
247 ret = write(fd, buf + bytes_written, buf_sz - bytes_written); in write_adi()
249 if (ret < 0) in write_adi()
254 bytes_written += ret; in write_adi()
266 int ret, bytes_written = 0; in pwrite_adi() local
274 ret = pwrite(fd, buf + bytes_written, in pwrite_adi()
277 if (ret < 0) { in pwrite_adi()
285 bytes_written += ret; in pwrite_adi()
286 cur_offset += ret; in pwrite_adi()
300 off_t ret; in seek_adi() local
303 ret = lseek(fd, offset, whence); in seek_adi()
305 DEBUG_PRINT_L2("\tlseek ret = 0x%llx\n", ret); in seek_adi()
306 if (ret < 0) in seek_adi()
314 return ret; in seek_adi()
324 int ret; in test0_prpw_aligned_1byte() local
331 ret = pwrite_adi(fd, version, sizeof(version), offset); in test0_prpw_aligned_1byte()
332 if (ret != sizeof(version)) in test0_prpw_aligned_1byte()
333 TEST_STEP_FAILURE(ret); in test0_prpw_aligned_1byte()
335 ret = pread_adi(fd, version, sizeof(version), offset); in test0_prpw_aligned_1byte()
336 if (ret != sizeof(version)) in test0_prpw_aligned_1byte()
337 TEST_STEP_FAILURE(ret); in test0_prpw_aligned_1byte()
345 ret = 0; in test0_prpw_aligned_1byte()
347 RETURN_FROM_TEST(ret); in test0_prpw_aligned_1byte()
359 int ret, i; in test1_prpw_aligned_4096bytes() local
368 ret = pwrite_adi(fd, version, sizeof(version), offset); in test1_prpw_aligned_4096bytes()
369 if (ret != sizeof(version)) in test1_prpw_aligned_4096bytes()
370 TEST_STEP_FAILURE(ret); in test1_prpw_aligned_4096bytes()
372 ret = pread_adi(fd, version, sizeof(version), offset); in test1_prpw_aligned_4096bytes()
373 if (ret != sizeof(version)) in test1_prpw_aligned_4096bytes()
374 TEST_STEP_FAILURE(ret); in test1_prpw_aligned_4096bytes()
385 ret = 0; in test1_prpw_aligned_4096bytes()
387 RETURN_FROM_TEST(ret); in test1_prpw_aligned_4096bytes()
399 int ret, i; in test2_prpw_aligned_10327bytes() local
408 ret = pwrite_adi(fd, version, sizeof(version), offset); in test2_prpw_aligned_10327bytes()
409 if (ret != sizeof(version)) in test2_prpw_aligned_10327bytes()
410 TEST_STEP_FAILURE(ret); in test2_prpw_aligned_10327bytes()
412 ret = pread_adi(fd, version, sizeof(version), offset); in test2_prpw_aligned_10327bytes()
413 if (ret != sizeof(version)) in test2_prpw_aligned_10327bytes()
414 TEST_STEP_FAILURE(ret); in test2_prpw_aligned_10327bytes()
425 ret = 0; in test2_prpw_aligned_10327bytes()
427 RETURN_FROM_TEST(ret); in test2_prpw_aligned_10327bytes()
439 int ret, i; in test3_prpw_unaligned_12541bytes() local
448 ret = pwrite_adi(fd, version, sizeof(version), offset); in test3_prpw_unaligned_12541bytes()
449 if (ret != sizeof(version)) in test3_prpw_unaligned_12541bytes()
450 TEST_STEP_FAILURE(ret); in test3_prpw_unaligned_12541bytes()
452 ret = pread_adi(fd, version, sizeof(version), offset); in test3_prpw_unaligned_12541bytes()
453 if (ret != sizeof(version)) in test3_prpw_unaligned_12541bytes()
454 TEST_STEP_FAILURE(ret); in test3_prpw_unaligned_12541bytes()
465 ret = 0; in test3_prpw_unaligned_12541bytes()
467 RETURN_FROM_TEST(ret); in test3_prpw_unaligned_12541bytes()
476 int ret; in test4_lseek() local
482 ret = -1; in test4_lseek()
483 TEST_STEP_FAILURE(ret); in test4_lseek()
492 ret = -2; in test4_lseek()
493 TEST_STEP_FAILURE(ret); in test4_lseek()
498 ret = -3; in test4_lseek()
499 TEST_STEP_FAILURE(ret); in test4_lseek()
504 ret = -4; in test4_lseek()
505 TEST_STEP_FAILURE(ret); in test4_lseek()
510 ret = -5; in test4_lseek()
511 TEST_STEP_FAILURE(ret); in test4_lseek()
514 ret = 0; in test4_lseek()
516 RETURN_FROM_TEST(ret); in test4_lseek()
527 int ret; in test5_rw_aligned_1byte() local
534 ret = -1; in test5_rw_aligned_1byte()
535 TEST_STEP_FAILURE(ret); in test5_rw_aligned_1byte()
538 ret = write_adi(fd, &version, sizeof(version)); in test5_rw_aligned_1byte()
539 if (ret != sizeof(version)) in test5_rw_aligned_1byte()
540 TEST_STEP_FAILURE(ret); in test5_rw_aligned_1byte()
544 ret = -1; in test5_rw_aligned_1byte()
545 TEST_STEP_FAILURE(ret); in test5_rw_aligned_1byte()
548 ret = read_adi(fd, &version, sizeof(version)); in test5_rw_aligned_1byte()
549 if (ret != sizeof(version)) in test5_rw_aligned_1byte()
550 TEST_STEP_FAILURE(ret); in test5_rw_aligned_1byte()
558 ret = 0; in test5_rw_aligned_1byte()
560 RETURN_FROM_TEST(ret); in test5_rw_aligned_1byte()
573 int ret, i; in test6_rw_aligned_9434bytes() local
581 ret = -1; in test6_rw_aligned_9434bytes()
582 TEST_STEP_FAILURE(ret); in test6_rw_aligned_9434bytes()
585 ret = write_adi(fd, version, sizeof(version)); in test6_rw_aligned_9434bytes()
586 if (ret != sizeof(version)) in test6_rw_aligned_9434bytes()
587 TEST_STEP_FAILURE(ret); in test6_rw_aligned_9434bytes()
593 ret = -1; in test6_rw_aligned_9434bytes()
594 TEST_STEP_FAILURE(ret); in test6_rw_aligned_9434bytes()
597 ret = read_adi(fd, version, sizeof(version)); in test6_rw_aligned_9434bytes()
598 if (ret != sizeof(version)) in test6_rw_aligned_9434bytes()
599 TEST_STEP_FAILURE(ret); in test6_rw_aligned_9434bytes()
610 ret = 0; in test6_rw_aligned_9434bytes()
612 RETURN_FROM_TEST(ret); in test6_rw_aligned_9434bytes()
625 int ret, i; in test7_rw_aligned_14963bytes() local
635 ret = -1; in test7_rw_aligned_14963bytes()
636 TEST_STEP_FAILURE(ret); in test7_rw_aligned_14963bytes()
639 ret = write_adi(fd, version, sizeof(version)); in test7_rw_aligned_14963bytes()
640 if (ret != sizeof(version)) in test7_rw_aligned_14963bytes()
641 TEST_STEP_FAILURE(ret); in test7_rw_aligned_14963bytes()
647 ret = -1; in test7_rw_aligned_14963bytes()
648 TEST_STEP_FAILURE(ret); in test7_rw_aligned_14963bytes()
651 ret = read_adi(fd, version, sizeof(version)); in test7_rw_aligned_14963bytes()
652 if (ret != sizeof(version)) in test7_rw_aligned_14963bytes()
653 TEST_STEP_FAILURE(ret); in test7_rw_aligned_14963bytes()
666 ret = 0; in test7_rw_aligned_14963bytes()
668 RETURN_FROM_TEST(ret); in test7_rw_aligned_14963bytes()
685 int fd, ret, test; in main() local
687 ret = build_memory_map(); in main()
688 if (ret < 0) in main()
689 return ret; in main()
701 ret = (*tests[test])(fd); in main()
702 if (ret != 0) in main()
704 test, ret); in main()