Lines Matching full:read
16 long read, fd; in ZTEST() local
30 read = semihost_read(fd, r_buffer, sizeof(r_buffer)); in ZTEST()
31 zassert_equal(read, -EIO, "Read from write-only file"); in ZTEST()
42 read = semihost_read(fd, r_buffer, sizeof(r_buffer)); in ZTEST()
43 zassert_equal(read, sizeof(r_buffer), "Read failed %d", read); in ZTEST()
44 zassert_mem_equal(r_buffer, w_buffer, sizeof(r_buffer), "Data not read"); in ZTEST()
45 read = semihost_read(fd, r_buffer, sizeof(r_buffer)); in ZTEST()
46 zassert_equal(read, sizeof(r_buffer), "Read failed"); in ZTEST()
47 zassert_mem_equal(r_buffer, w_buffer, sizeof(r_buffer), "Data not read"); in ZTEST()
49 /* Read past end of file */ in ZTEST()
50 read = semihost_read(fd, r_buffer, sizeof(r_buffer)); in ZTEST()
51 zassert_equal(read, -EIO, "Read past end of file"); in ZTEST()
56 /* Read from offset */ in ZTEST()
57 read = semihost_read(fd, r_buffer, sizeof(r_buffer) - 1); in ZTEST()
58 zassert_equal(read, sizeof(r_buffer) - 1, "Read failed"); in ZTEST()
59 zassert_mem_equal(r_buffer, w_buffer + 1, sizeof(r_buffer) - 1, "Data not read"); in ZTEST()