From 4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 27 Mar 2012 11:51:08 +0200 Subject: reorganize file structure to match the upstream requirements --- pintos-progos/tests/filesys/base/syn-write.c | 31 ---------------------------- 1 file changed, 31 deletions(-) delete mode 100644 pintos-progos/tests/filesys/base/syn-write.c (limited to 'pintos-progos/tests/filesys/base/syn-write.c') diff --git a/pintos-progos/tests/filesys/base/syn-write.c b/pintos-progos/tests/filesys/base/syn-write.c deleted file mode 100644 index 1439862..0000000 --- a/pintos-progos/tests/filesys/base/syn-write.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Spawns several child processes to write out different parts of - the contents of a file and waits for them to finish. Then - reads back the file and verifies its contents. */ - -#include -#include -#include -#include -#include "tests/filesys/base/syn-write.h" -#include "tests/lib.h" -#include "tests/main.h" - -char buf1[BUF_SIZE]; -char buf2[BUF_SIZE]; - -void -test_main (void) -{ - pid_t children[CHILD_CNT]; - int fd; - - CHECK (create (file_name, sizeof buf1), "create \"%s\"", file_name); - - exec_children ("child-syn-wrt", children, CHILD_CNT); - wait_children (children, CHILD_CNT); - - CHECK ((fd = open (file_name)) > 1, "open \"%s\"", file_name); - CHECK (read (fd, buf1, sizeof buf1) > 0, "read \"%s\"", file_name); - random_bytes (buf2, sizeof buf2); - compare_bytes (buf1, buf2, sizeof buf1, 0, file_name); -} -- cgit v1.2.3