6 #include "tests/filesys/base/syn-read.h"
8 static char buf[BUF_SIZE];
11 main (int argc, const char *argv[])
19 CHECK (argc == 2, "argc must be 2, actually %d", argc);
20 child_idx = atoi (argv[1]);
23 random_bytes (buf, sizeof buf);
25 CHECK ((fd = open (filename)) > 1, "open \"%s\"", filename);
26 for (i = 0; i < sizeof buf; i++)
29 CHECK (read (fd, &c, 1) > 0, "read \"%s\"", filename);
30 compare_bytes (&c, buf + i, 1, i, filename);