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/child-syn-read.c | 44 ----------------------- 1 file changed, 44 deletions(-) delete mode 100644 pintos-progos/tests/filesys/base/child-syn-read.c (limited to 'pintos-progos/tests/filesys/base/child-syn-read.c') diff --git a/pintos-progos/tests/filesys/base/child-syn-read.c b/pintos-progos/tests/filesys/base/child-syn-read.c deleted file mode 100644 index 77a5e26..0000000 --- a/pintos-progos/tests/filesys/base/child-syn-read.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Child process for syn-read test. - Reads the contents of a test file a byte at a time, in the - hope that this will take long enough that we can get a - significant amount of contention in the kernel file system - code. */ - -#include -#include -#include -#include -#include "tests/lib.h" -#include "tests/filesys/base/syn-read.h" - -const char *test_name = "child-syn-read"; - -static char buf[BUF_SIZE]; - -int -main (int argc, const char *argv[]) -{ - int child_idx; - int fd; - size_t i; - - quiet = true; - - CHECK (argc == 2, "argc must be 2, actually %d", argc); - child_idx = atoi (argv[1]); - - random_init (0); - random_bytes (buf, sizeof buf); - - CHECK ((fd = open (file_name)) > 1, "open \"%s\"", file_name); - for (i = 0; i < sizeof buf; i++) - { - char c; - CHECK (read (fd, &c, 1) > 0, "read \"%s\"", file_name); - compare_bytes (&c, buf + i, 1, i, file_name); - } - close (fd); - - return child_idx; -} - -- cgit v1.2.3