5 #include "tests/filesys/base/syn-write.h"
7 #include "tests/main.h"
15 pid_t children[CHILD_CNT];
18 CHECK (create (filename, sizeof buf1), "create \"%s\"", filename);
20 exec_children ("child-syn-wrt", children, CHILD_CNT);
21 wait_children (children, CHILD_CNT);
23 CHECK ((fd = open (filename)) > 1, "open \"%s\"", filename);
24 CHECK (read (fd, buf1, sizeof buf1) > 0, "read \"%s\"", filename);
25 random_bytes (buf2, sizeof buf2);
26 compare_bytes (buf1, buf2, sizeof buf1, 0, filename);