Lines Matching refs:file

13 int file = -1;  variable
26 file = res; in test_file_open()
36 res = lseek(file, 0, SEEK_SET); in test_file_write()
39 close(file); in test_file_write()
40 file = -1; in test_file_write()
44 brw = write(file, (char *)test_str, strlen(test_str)); in test_file_write()
47 close(file); in test_file_write()
48 file = -1; in test_file_write()
55 close(file); in test_file_write()
56 file = -1; in test_file_write()
70 res = lseek(file, 0, SEEK_SET); in test_file_read()
73 close(file); in test_file_read()
74 file = -1; in test_file_read()
78 brw = read(file, read_buff, sz); in test_file_read()
81 close(file); in test_file_read()
82 file = -1; in test_file_read()
96 res = lseek(file, 2, SEEK_SET); in test_file_read()
99 close(file); in test_file_read()
100 file = -1; in test_file_read()
104 brw = read(file, read_buff, sizeof(read_buff)); in test_file_read()
107 close(file); in test_file_read()
108 file = -1; in test_file_read()
130 if (file >= 0) { in test_file_close()
131 res = close(file); in test_file_close()
138 file = -1; in test_file_close()
148 if (file < 0) { in test_file_fsync()
152 res = fsync(file); in test_file_fsync()
158 close(file); in test_file_fsync()
159 file = -1; in test_file_fsync()
168 if (file < 0) { in test_file_fdatasync()
172 res = fdatasync(file); in test_file_fdatasync()
178 close(file); in test_file_fdatasync()
179 file = -1; in test_file_fdatasync()
189 if (file < 0) { in test_file_truncate()
193 res = ftruncate(file, truncate_size); in test_file_truncate()
199 close(file); in test_file_truncate()
200 file = -1; in test_file_truncate()
353 file = open(TEST_FILE, O_RDWR | O_TRUNC); in ZTEST()
354 zassert_not_equal(file, -1, in ZTEST()