19main (
int argc,
const char *argv[])
27 CHECK (argc == 2,
"argc must be 2, actually %d", argc);
28 child_idx =
atoi (argv[1]);
34 for (i = 0; i <
sizeof buf; i++)
static char buf[BUF_SIZE]
const char * test_name
Child process for syn-read test.
int main(int argc, const char *argv[])
int atoi(const char *s)
Converts a string representation of a signed decimal integer in S into an ‘int’, which is returned.
int open(const char *file)
int read(int fd, void *buffer, unsigned size)
void compare_bytes(const void *read_data_, const void *expected_data_, size_t size, size_t ofs, const char *file_name)
test/lib.h
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
void random_bytes(void *buf_, size_t size)
Writes SIZE random bytes into BUF.
void random_init(unsigned seed)
Initializes or reinitializes the PRNG with the given SEED.
static const char file_name[]
tests/filesys/base/syn-read.h