We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b75fd0 commit 15d3ca5Copy full SHA for 15d3ca5
1 file changed
src/test/direct.c
@@ -22,6 +22,17 @@ int main(void) {
22
ret = pread(fd, p, SIZE, 0);
23
test_assert(ret == SIZE);
24
25
+ fd = open("test.out", O_RDWR | O_CREAT | O_TRUNC, 0600);
26
+ test_assert(fd >= 0);
27
+ ret = fcntl(fd, F_SETFL, O_DIRECT);
28
+ test_assert(ret == 0);
29
+
30
+ ret = write(fd, p, SIZE);
31
+ test_assert(ret == SIZE);
32
33
+ ret = pread(fd, p, SIZE, 0);
34
35
36
atomic_puts("EXIT-SUCCESS");
37
return 0;
38
}
0 commit comments