code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
/* -*- c -*- */ #include <syscall.h> #include <stdio.h> #include "tests/filesys/seq-test.h" #include "tests/lib.h" #include "tests/main.h" static char buf[512]; static size_t return_block_size (void) { return sizeof buf; } void test_main (void) { size_t i; #ifdef DIRECTORY CHECK (mkdir (DIRECTORY), "mkdi...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/grow-dir.inc.svn-base
C
oos
769
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (grow-two-files) begin (grow-two-files) create "a" (grow-two-files) create "b" (grow-two-files) open "a" (grow-two-files) open "b" (grow-two-files) write "a" and "b" alternately (grow-two-fi...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/grow-two-files.ck.svn-base
Perl
oos
617
# -*- perl -*- use strict; use warnings; use tests::tests; check_archive ({"xyzzy" => {}}); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/dir-open-persistence.ck.svn-base
Perl
oos
98
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (dir-mkdir) begin (dir-mkdir) mkdir "a" (dir-mkdir) create "a/b" (dir-mkdir) chdir "a" (dir-mkdir) open "b" (dir-mkdir) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/dir-mkdir.ck.svn-base
Perl
oos
245
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; my ($fs); $fs->{"file$_"} = [random_bytes (512)] foreach 0...49; check_archive ($fs); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/grow-root-lg-persistence.ck.svn-base
Perl
oos
170
# -*- perl -*- use strict; use warnings; use tests::tests; check_archive ({"blargle" => ['']}); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/grow-create-persistence.ck.svn-base
Perl
oos
102
# -*- perl -*- use strict; use warnings; use tests::tests; my ($cwd_removable) = check_expected (IGNORE_EXIT_CODES => 1, {NO => <<'EOF', YES => <<'EOF'}); (dir-rm-cwd) begin (dir-rm-cwd) open "/" (dir-rm-cwd) mkdir "a" (dir-rm-cwd) open "/a" (dir-rm-cwd) verify "/a" is empty (dir-rm-cwd) "/" and "/a" must hav...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/dir-rm-cwd.ck.svn-base
Perl
oos
1,590
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected ([<<'EOF', <<'EOF']); (dir-open) begin (dir-open) mkdir "xyzzy" (dir-open) open "xyzzy" (dir-open) write "xyzzy" (dir-open) write "xyzzy" (must return -1, actually -1) (dir-open) end dir-open: exit(0) EOF (dir-open) begin (dir-open) mkdir "xyzzy"...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/dir-open.ck.svn-base
Perl
oos
399
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (dir-mk-tree) begin (dir-mk-tree) creating /0/0/0/0 through /3/2/2/3... (dir-mk-tree) open "/0/2/0/3" (dir-mk-tree) close "/0/2/0/3" (dir-mk-tree) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/dir-mk-tree.ck.svn-base
Perl
oos
272
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; check_archive ({"testme" => [random_bytes (72943)]}); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/grow-seq-lg-persistence.ck.svn-base
Perl
oos
138
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (dir-under-file) begin (dir-under-file) create "abc" (dir-under-file) mkdir "abc" (must return false) (dir-under-file) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/dir-under-file.ck.svn-base
Perl
oos
244
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (dir-rm-root) begin (dir-rm-root) remove "/" (must fail) (dir-rm-root) create "/a" (dir-rm-root) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/dir-rm-root.ck.svn-base
Perl
oos
222
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (grow-root-sm) begin (grow-root-sm) creating and checking "file0" (grow-root-sm) creating and checking "file1" (grow-root-sm) creating and checking "file2" (grow-root-sm) creating and checki...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/grow-root-sm.ck.svn-base
Perl
oos
1,090
# -*- perl -*- use strict; use warnings; use tests::tests; check_archive ({"abc" => {}}); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/dir-over-file-persistence.ck.svn-base
Perl
oos
96
# -*- perl -*- use strict; use warnings; use tests::tests; check_archive ({"a" => ["\0" x 243]}); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/dir-rm-root-persistence.ck.svn-base
Perl
oos
104
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (dir-rm-tree) begin (dir-rm-tree) creating /0/0/0/0 through /3/2/2/3... (dir-rm-tree) open "/0/2/0/3" (dir-rm-tree) close "/0/2/0/3" (dir-rm-tree) removing /0/0/0/0 through /3/2/2/3... (dir-rm-tree) open "/3/0...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/dir-rm-tree.ck.svn-base
Perl
oos
371
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; check_archive ({"child-syn-rw" => "tests/filesys/extended/child-syn-rw", "logfile" => [random_bytes (8 * 512)]}); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/syn-rw-persistence.ck.svn-base
Perl
oos
200
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (grow-sparse) begin (grow-sparse) create "testfile" (grow-sparse) open "testfile" (grow-sparse) seek "testfile" (grow-sparse) write "testfile" (grow-sparse) close "testfile" (grow-sparse) open "testfile" for v...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/grow-sparse.ck.svn-base
Perl
oos
437
/* -*- c -*- */ #include "tests/filesys/seq-test.h" #include "tests/main.h" static char buf[TEST_SIZE]; static size_t return_block_size (void) { return 1234; } void test_main (void) { seq_test ("testme", buf, sizeof buf, 0, return_block_size, NULL); }
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/grow-seq.inc.svn-base
C
oos
286
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (grow-tell) begin (grow-tell) create "foobar" (grow-tell) open "foobar" (grow-tell) writing "foobar" (grow-tell) close "foobar" (grow-tell) open "foobar" for verification (grow-tell) verifie...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/grow-tell.ck.svn-base
Perl
oos
396
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (syn-rw) begin (syn-rw) create "logfile" (syn-rw) open "logfile" (syn-rw) exec child 1 of 4: "child-syn-rw 0" (syn-rw) exec child 2 of 4: "child-syn-rw 1" (syn-rw) exec child 3 of 4: "child-...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/.svn/text-base/syn-rw.ck.svn-base
Perl
oos
618
# -*- perl -*- use strict; use warnings; use tests::tests; check_archive ({}); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/dir-empty-name-persistence.ck
Perl
oos
85
/* Child process for syn-rw. Reads from a file created by our parent process, which is growing it. We loop until we've read the whole file successfully. Many iterations through the loop will return 0 bytes, because the file has not grown in the meantime. That is, we are "busy waiting" for the file to ...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/child-syn-rw.c
C
oos
1,497
/* Library function for creating a tree of directories. */ #include <stdio.h> #include <syscall.h> #include "tests/filesys/extended/mk-tree.h" #include "tests/lib.h" static void do_mkdir (const char *format, ...) PRINTF_FORMAT (1, 2); static void do_touch (const char *format, ...) PRINTF_FORMAT (1, 2); void make_tre...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/mk-tree.c
C
oos
1,508
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; check_archive ({"child-syn-rw" => "tests/filesys/extended/child-syn-rw", "logfile" => [random_bytes (8 * 512)]}); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/syn-rw-persistence.ck
Perl
oos
200
# -*- makefile -*- raw_tests = dir-empty-name dir-mk-tree dir-mkdir dir-open \ dir-over-file dir-rm-cwd dir-rm-parent dir-rm-root dir-rm-tree \ dir-rmdir dir-under-file dir-vine grow-create grow-dir-lg \ grow-file-size grow-root-lg grow-root-sm grow-seq-lg grow-seq-sm \ grow-sparse grow-tell grow-two-files syn-rw ...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/Make.tests
Makefile
oos
2,359
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (dir-rmdir) begin (dir-rmdir) mkdir "a" (dir-rmdir) rmdir "a" (dir-rmdir) chdir "a" (must return false) (dir-rmdir) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/dir-rmdir.ck
Perl
oos
241
/* -*- c -*- */ #include "tests/filesys/seq-test.h" #include "tests/main.h" static char buf[TEST_SIZE]; static size_t return_block_size (void) { return 1234; } void test_main (void) { seq_test ("testme", buf, sizeof buf, 0, return_block_size, NULL); }
10cm
trunk/10cm/pintos/src/tests/filesys/extended/grow-seq.inc
C
oos
286
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (syn-rw) begin (syn-rw) create "logfile" (syn-rw) open "logfile" (syn-rw) exec child 1 of 4: "child-syn-rw 0" (syn-rw) exec child 2 of 4: "child-syn-rw 1" (syn-rw) exec child 3 of 4: "child-...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/syn-rw.ck
Perl
oos
618
/* Checks that growing a file updates the file position correctly. */ #include <syscall.h> #include "tests/filesys/seq-test.h" #include "tests/lib.h" #include "tests/main.h" static char buf[2134]; static size_t return_block_size (void) { return 37; } static void check_tell (int fd, long ofs) { long pos = t...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/grow-tell.c
C
oos
574
/* Tries to create a file with the same name as an existing directory, which must return failure. */ #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) { CHECK (mkdir ("abc"), "mkdir \"abc\""); CHECK (!create ("abc", 0), "create \"abc\" (must return false)"); }
10cm
trunk/10cm/pintos/src/tests/filesys/extended/dir-over-file.c
C
oos
311
/* -*- c -*- */ #include <syscall.h> #include <stdio.h> #include "tests/filesys/seq-test.h" #include "tests/lib.h" #include "tests/main.h" static char buf[512]; static size_t return_block_size (void) { return sizeof buf; } void test_main (void) { size_t i; #ifdef DIRECTORY CHECK (mkdir (DIRECTORY), "mkdi...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/grow-dir.inc
C
oos
769
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; my ($fs); $fs->{"file$_"} = [random_bytes (512)] foreach 0...49; check_archive ($fs); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/grow-root-lg-persistence.ck
Perl
oos
170
/* Try to remove the root directory. This must fail. */ #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) { CHECK (!remove ("/"), "remove \"/\" (must fail)"); CHECK (create ("/a", 243), "create \"/a\""); }
10cm
trunk/10cm/pintos/src/tests/filesys/extended/dir-rm-root.c
C
oos
256
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; check_archive ({"testme" => [random_bytes (5678)]}); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/grow-seq-sm-persistence.ck
Perl
oos
137
# -*- perl -*- use strict; use warnings; use tests::tests; check_archive ({"a" => {"b" => {}}}); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/dir-rm-parent-persistence.ck
Perl
oos
103
/* Creates and removes a directory, then makes sure that it's really gone. */ #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) { CHECK (mkdir ("a"), "mkdir \"a\""); CHECK (remove ("a"), "rmdir \"a\""); CHECK (!chdir ("a"), "chdir \"a\" (must return false)"); }
10cm
trunk/10cm/pintos/src/tests/filesys/extended/dir-rmdir.c
C
oos
314
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (dir-rm-root) begin (dir-rm-root) remove "/" (must fail) (dir-rm-root) create "/a" (dir-rm-root) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/dir-rm-root.ck
Perl
oos
222
/* Grows a file from 0 bytes to 5,678 bytes, 1,234 bytes at a time. */ #define TEST_SIZE 5678 #include "tests/filesys/extended/grow-seq.inc"
10cm
trunk/10cm/pintos/src/tests/filesys/extended/grow-seq-sm.c
C
oos
145
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected ([<<'EOF', <<'EOF']); (dir-open) begin (dir-open) mkdir "xyzzy" (dir-open) open "xyzzy" (dir-open) write "xyzzy" (dir-open) write "xyzzy" (must return -1, actually -1) (dir-open) end dir-open: exit(0) EOF (dir-open) begin (dir-open) mkdir "xyzzy"...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/dir-open.ck
Perl
oos
399
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (grow-file-size) begin (grow-file-size) create "testfile" (grow-file-size) open "testfile" (grow-file-size) writing "testfile" (grow-file-size) close "testfile" (grow-file-size) open "testfi...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/grow-file-size.ck
Perl
oos
455
/* Opens a directory, then tries to write to it, which must fail. */ #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) { int fd; int retval; CHECK (mkdir ("xyzzy"), "mkdir \"xyzzy\""); CHECK ((fd = open ("xyzzy")) > 1, "open \"xyzzy\""); msg ("write \"xyzzy\""...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/dir-open.c
C
oos
451
/* Grows a file from 0 bytes to 2,134 bytes, 37 bytes at a time, and checks that the file's size is reported correctly at each step. */ #include <syscall.h> #include "tests/filesys/seq-test.h" #include "tests/lib.h" #include "tests/main.h" static char buf[2134]; static size_t return_block_size (void) { retu...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/grow-file-size.c
C
oos
657
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; my ($fs); $fs->{"file$_"} = [random_bytes (512)] foreach 0...19; check_archive ($fs); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/grow-root-sm-persistence.ck
Perl
oos
170
/* Tests mkdir(). */ #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) { CHECK (mkdir ("a"), "mkdir \"a\""); CHECK (create ("a/b", 512), "create \"a/b\""); CHECK (chdir ("a"), "chdir \"a\""); CHECK (open ("b") > 1, "open \"b\""); }
10cm
trunk/10cm/pintos/src/tests/filesys/extended/dir-mkdir.c
C
oos
284
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (grow-tell) begin (grow-tell) create "foobar" (grow-tell) open "foobar" (grow-tell) writing "foobar" (grow-tell) close "foobar" (grow-tell) open "foobar" for verification (grow-tell) verifie...
10cm
trunk/10cm/pintos/src/tests/filesys/extended/grow-tell.ck
Perl
oos
396
# -*- perl -*- use strict; use warnings; use tests::tests; check_archive ({'a' => {'b' => ["\0" x 512]}}); pass;
10cm
trunk/10cm/pintos/src/tests/filesys/extended/dir-mkdir-persistence.ck
Perl
oos
113
/* -*- c -*- */ #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" static char buf[TEST_SIZE]; void test_main (void) { const char *file_name = "blargle"; CHECK (create (file_name, TEST_SIZE), "create \"%s\"", file_name); check_file (file_name, buf, TEST_SIZE); }
10cm
trunk/10cm/pintos/src/tests/filesys/.svn/text-base/create.inc.svn-base
C
oos
290
/* 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 <random.h> #include <stdio.h> #include <stdlib.h> #include <syscall.h> #include ...
10cm
trunk/10cm/pintos/src/tests/filesys/base/child-syn-read.c
C
oos
971
/* Tests that create properly zeros out the contents of a fairly small file. */ #define TEST_SIZE 5678 #include "tests/filesys/create.inc"
10cm
trunk/10cm/pintos/src/tests/filesys/base/sm-create.c
C
oos
143
/* 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 <random.h> #include <stdio.h> #include <string.h> #include <syscall.h> #include "tests/filesys/seq-test.h" #include "tests/lib.h"...
10cm
trunk/10cm/pintos/src/tests/filesys/base/2011_prj5_test.c
C
oos
1,625
/* 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 <random.h> #include <stdio.h> #include <string.h> #include <syscall.h> #include "tests/filesys/base/syn-write.h" #include "tests/...
10cm
trunk/10cm/pintos/src/tests/filesys/base/syn-write.c
C
oos
858
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (sm-full) begin (sm-full) create "quux" (sm-full) open "quux" (sm-full) writing "quux" (sm-full) close "quux" (sm-full) open "quux" for verification (sm-full) verified contents of "quux" (sm-full) close "quux"...
10cm
trunk/10cm/pintos/src/tests/filesys/base/sm-full.ck
Perl
oos
345
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (lg-full) begin (lg-full) create "quux" (lg-full) open "quux" (lg-full) writing "quux" (lg-full) close "quux" (lg-full) open "quux" for verification (lg-full) verified contents of "quux" (lg-full) close "quux"...
10cm
trunk/10cm/pintos/src/tests/filesys/base/lg-full.ck
Perl
oos
345
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (syn-read) begin (syn-read) create "data" (syn-read) open "data" (syn-read) write "data" (syn-read) close "data" (syn-read) exec child 1 of 10: "child-syn-read 0" (syn-read) exec child 2 of 10: "child-syn-read...
10cm
trunk/10cm/pintos/src/tests/filesys/base/syn-read.ck
Perl
oos
1,331
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (lg-seq-random) begin (lg-seq-random) create "nibble" (lg-seq-random) open "nibble" (lg-seq-random) writing "nibble" (lg-seq-random) close "nibble" (lg-seq-random) open "nibble" for verification (lg-seq-random...
10cm
trunk/10cm/pintos/src/tests/filesys/base/lg-seq-random.ck
Perl
oos
413
/* Writes out the contents of a fairly small file all at once, and then reads it back to make sure that it was written properly. */ #define TEST_SIZE 5678 #include "tests/filesys/base/full.inc"
10cm
trunk/10cm/pintos/src/tests/filesys/base/sm-full.c
C
oos
201
#ifndef TESTS_FILESYS_BASE_SYN_READ_H #define TESTS_FILESYS_BASE_SYN_READ_H #define BUF_SIZE 1024 static const char file_name[] = "data"; #endif /* tests/filesys/base/syn-read.h */
10cm
trunk/10cm/pintos/src/tests/filesys/base/syn-read.h
C
oos
183
/* Writes out the content of a fairly small file in random order, then reads it back in random order to verify that it was written properly. */ #define BLOCK_SIZE 13 #define TEST_SIZE (13 * 123) #include "tests/filesys/base/random.inc"
10cm
trunk/10cm/pintos/src/tests/filesys/base/sm-random.c
C
oos
243
/* Child process for syn-read test. Writes into part of a test file. Other processes will be writing into other parts at the same time. */ #include <random.h> #include <stdlib.h> #include <syscall.h> #include "tests/lib.h" #include "tests/filesys/base/syn-write.h" char buf[BUF_SIZE]; int main (int argc, char ...
10cm
trunk/10cm/pintos/src/tests/filesys/base/child-syn-wrt.c
C
oos
799
/* Writes out a fairly large file sequentially, one fixed-size block at a time, then reads it back to verify that it was written properly. */ #define TEST_SIZE 75678 #define BLOCK_SIZE 513 #include "tests/filesys/base/seq-block.inc"
10cm
trunk/10cm/pintos/src/tests/filesys/base/lg-seq-block.c
C
oos
240
/* Tests that create properly zeros out the contents of a fairly large file. */ #define TEST_SIZE 75678 #include "tests/filesys/create.inc"
10cm
trunk/10cm/pintos/src/tests/filesys/base/lg-create.c
C
oos
144
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (syn-write) begin (syn-write) create "stuff" (syn-write) exec child 1 of 10: "child-syn-wrt 0" (syn-write) exec child 2 of 10: "child-syn-wrt 1" (syn-write) exec child 3 of 10: "child-syn-wrt 2" (syn-write) ex...
10cm
trunk/10cm/pintos/src/tests/filesys/base/syn-write.ck
Perl
oos
1,324
/* Verifies that a deleted file may still be written to and read from. */ #include <random.h> #include <string.h> #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" char buf1[1234]; char buf2[1234]; void test_main (void) { const char *file_name = "deleteme"; int fd; CHECK (create (file_...
10cm
trunk/10cm/pintos/src/tests/filesys/base/syn-remove.c
C
oos
833
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (sm-seq-block) begin (sm-seq-block) create "noodle" (sm-seq-block) open "noodle" (sm-seq-block) writing "noodle" (sm-seq-block) close "noodle" (sm-seq-block) open "noodle" for verification (sm-seq-block) verif...
10cm
trunk/10cm/pintos/src/tests/filesys/base/sm-seq-block.ck
Perl
oos
404
/* Writes out the contents of a fairly large file all at once, and then reads it back to make sure that it was written properly. */ #define TEST_SIZE 75678 #include "tests/filesys/base/full.inc"
10cm
trunk/10cm/pintos/src/tests/filesys/base/lg-full.c
C
oos
202
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (sm-seq-random) begin (sm-seq-random) create "nibble" (sm-seq-random) open "nibble" (sm-seq-random) writing "nibble" (sm-seq-random) close "nibble" (sm-seq-random) open "nibble" for verification (sm-seq-random...
10cm
trunk/10cm/pintos/src/tests/filesys/base/sm-seq-random.ck
Perl
oos
413
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (lg-seq-random) begin (lg-seq-random) create "nibble" (lg-seq-random) open "nibble" (lg-seq-random) writing "nibble" (lg-seq-random) close "nibble" (lg-seq-random) open "nibble" for verification (lg-seq-random...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/lg-seq-random.ck.svn-base
Perl
oos
413
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (lg-random) begin (lg-random) create "bazzle" (lg-random) open "bazzle" (lg-random) write "bazzle" in random order (lg-random) read "bazzle" in random order (lg-random) close "bazzle" (lg-random) end EOF pass;...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/lg-random.ck.svn-base
Perl
oos
321
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (lg-create) begin (lg-create) create "blargle" (lg-create) open "blargle" for verification (lg-create) verified contents of "blargle" (lg-create) close "blargle" (lg-create) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/lg-create.ck.svn-base
Perl
oos
299
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (sm-full) begin (sm-full) create "quux" (sm-full) open "quux" (sm-full) writing "quux" (sm-full) close "quux" (sm-full) open "quux" for verification (sm-full) verified contents of "quux" (sm-full) close "quux"...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/sm-full.ck.svn-base
Perl
oos
345
# -*- makefile -*- tests/filesys/base_TESTS = $(addprefix tests/filesys/base/,lg-create \ lg-full lg-random lg-seq-block lg-seq-random sm-create sm-full \ sm-random sm-seq-block sm-seq-random syn-read syn-remove syn-write 2011_prj5_test) tests/filesys/base_PROGS = $(tests/filesys/base_TESTS) $(addprefix \ tests/file...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/Make.tests.svn-base
Makefile
oos
766
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (lg-seq-block) begin (lg-seq-block) create "noodle" (lg-seq-block) open "noodle" (lg-seq-block) writing "noodle" (lg-seq-block) close "noodle" (lg-seq-block) open "noodle" for verification (lg-seq-block) verif...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/lg-seq-block.ck.svn-base
Perl
oos
404
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (sm-create) begin (sm-create) create "blargle" (sm-create) open "blargle" for verification (sm-create) verified contents of "blargle" (sm-create) close "blargle" (sm-create) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/sm-create.ck.svn-base
Perl
oos
299
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (lg-full) begin (lg-full) create "quux" (lg-full) open "quux" (lg-full) writing "quux" (lg-full) close "quux" (lg-full) open "quux" for verification (lg-full) verified contents of "quux" (lg-full) close "quux"...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/lg-full.ck.svn-base
Perl
oos
345
/* -*- c -*- */ #include <random.h> #include <stdio.h> #include <string.h> #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" #if TEST_SIZE % BLOCK_SIZE != 0 #error TEST_SIZE must be a multiple of BLOCK_SIZE #endif #define BLOCK_CNT (TEST_SIZE / BLOCK_SIZE) char buf[TEST_SIZE]; int order[BLOCK_CNT]...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/random.inc.svn-base
C
oos
1,480
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (syn-read) begin (syn-read) create "data" (syn-read) open "data" (syn-read) write "data" (syn-read) close "data" (syn-read) exec child 1 of 10: "child-syn-read 0" (syn-read) exec child 2 of 10: "child-syn-read...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/syn-read.ck.svn-base
Perl
oos
1,331
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (sm-random) begin (sm-random) create "bazzle" (sm-random) open "bazzle" (sm-random) write "bazzle" in random order (sm-random) read "bazzle" in random order (sm-random) close "bazzle" (sm-random) end EOF pass;...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/sm-random.ck.svn-base
Perl
oos
321
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (sm-seq-block) begin (sm-seq-block) create "noodle" (sm-seq-block) open "noodle" (sm-seq-block) writing "noodle" (sm-seq-block) close "noodle" (sm-seq-block) open "noodle" for verification (sm-seq-block) verif...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/sm-seq-block.ck.svn-base
Perl
oos
404
/* -*- c -*- */ #include "tests/filesys/seq-test.h" #include "tests/main.h" static char buf[TEST_SIZE]; static size_t return_block_size (void) { return BLOCK_SIZE; } void test_main (void) { seq_test ("noodle", buf, sizeof buf, sizeof buf, return_block_size, NULL); }
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/seq-block.inc.svn-base
C
oos
301
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (syn-write) begin (syn-write) create "stuff" (syn-write) exec child 1 of 10: "child-syn-wrt 0" (syn-write) exec child 2 of 10: "child-syn-wrt 1" (syn-write) exec child 3 of 10: "child-syn-wrt 2" (syn-write) ex...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/syn-write.ck.svn-base
Perl
oos
1,324
/* -*- c -*- */ #include "tests/filesys/seq-test.h" #include "tests/main.h" static char buf[TEST_SIZE]; static size_t return_test_size (void) { return TEST_SIZE; } void test_main (void) { seq_test ("quux", buf, sizeof buf, sizeof buf, return_test_size, NULL); }
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/full.inc.svn-base
C
oos
296
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (sm-seq-random) begin (sm-seq-random) create "nibble" (sm-seq-random) open "nibble" (sm-seq-random) writing "nibble" (sm-seq-random) close "nibble" (sm-seq-random) open "nibble" for verification (sm-seq-random...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/sm-seq-random.ck.svn-base
Perl
oos
413
/* -*- c -*- */ #include <random.h> #include "tests/filesys/seq-test.h" #include "tests/main.h" static char buf[TEST_SIZE]; static size_t return_random (void) { return random_ulong () % 1031 + 1; } void test_main (void) { random_init (-1); seq_test ("nibble", buf, sizeof buf, sizeof buf, ...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/seq-random.inc.svn-base
C
oos
349
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (syn-remove) begin (syn-remove) create "deleteme" (syn-remove) open "deleteme" (syn-remove) remove "deleteme" (syn-remove) write "deleteme" (syn-remove) seek "deleteme" to 0 (syn-remove) read "deleteme" (syn-r...
10cm
trunk/10cm/pintos/src/tests/filesys/base/.svn/text-base/syn-remove.ck.svn-base
Perl
oos
371
/* -*- c -*- */ #include <random.h> #include "tests/filesys/seq-test.h" #include "tests/main.h" static char buf[TEST_SIZE]; static size_t return_random (void) { return random_ulong () % 1031 + 1; } void test_main (void) { random_init (-1); seq_test ("nibble", buf, sizeof buf, sizeof buf, ...
10cm
trunk/10cm/pintos/src/tests/filesys/base/seq-random.inc
C
oos
349
/* Spawns 10 child processes, all of which read from the same file and make sure that the contents are what they should be. */ #include <random.h> #include <stdio.h> #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" #include "tests/filesys/base/syn-read.h" static char buf[BUF_SIZE]; #define C...
10cm
trunk/10cm/pintos/src/tests/filesys/base/syn-read.c
C
oos
785
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (lg-create) begin (lg-create) create "blargle" (lg-create) open "blargle" for verification (lg-create) verified contents of "blargle" (lg-create) close "blargle" (lg-create) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/filesys/base/lg-create.ck
Perl
oos
299
#ifndef TESTS_FILESYS_BASE_SYN_WRITE_H #define TESTS_FILESYS_BASE_SYN_WRITE_H #define CHILD_CNT 10 #define CHUNK_SIZE 512 #define BUF_SIZE (CHILD_CNT * CHUNK_SIZE) static const char file_name[] = "stuff"; #endif /* tests/filesys/base/syn-write.h */
10cm
trunk/10cm/pintos/src/tests/filesys/base/syn-write.h
C
oos
251
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (sm-random) begin (sm-random) create "bazzle" (sm-random) open "bazzle" (sm-random) write "bazzle" in random order (sm-random) read "bazzle" in random order (sm-random) close "bazzle" (sm-random) end EOF pass;...
10cm
trunk/10cm/pintos/src/tests/filesys/base/sm-random.ck
Perl
oos
321
/* -*- c -*- */ #include "tests/filesys/seq-test.h" #include "tests/main.h" static char buf[TEST_SIZE]; static size_t return_test_size (void) { return TEST_SIZE; } void test_main (void) { seq_test ("quux", buf, sizeof buf, sizeof buf, return_test_size, NULL); }
10cm
trunk/10cm/pintos/src/tests/filesys/base/full.inc
C
oos
296
# -*- makefile -*- tests/filesys/base_TESTS = $(addprefix tests/filesys/base/,lg-create \ lg-full lg-random lg-seq-block lg-seq-random sm-create sm-full \ sm-random sm-seq-block sm-seq-random syn-read syn-remove syn-write 2011_prj5_test) tests/filesys/base_PROGS = $(tests/filesys/base_TESTS) $(addprefix \ tests/file...
10cm
trunk/10cm/pintos/src/tests/filesys/base/Make.tests
Makefile
oos
766
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (lg-seq-block) begin (lg-seq-block) create "noodle" (lg-seq-block) open "noodle" (lg-seq-block) writing "noodle" (lg-seq-block) close "noodle" (lg-seq-block) open "noodle" for verification (lg-seq-block) verif...
10cm
trunk/10cm/pintos/src/tests/filesys/base/lg-seq-block.ck
Perl
oos
404
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (sm-create) begin (sm-create) create "blargle" (sm-create) open "blargle" for verification (sm-create) verified contents of "blargle" (sm-create) close "blargle" (sm-create) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/filesys/base/sm-create.ck
Perl
oos
299
/* Writes out a fairly small file sequentially, one fixed-size block at a time, then reads it back to verify that it was written properly. */ #define TEST_SIZE 5678 #define BLOCK_SIZE 513 #include "tests/filesys/base/seq-block.inc"
10cm
trunk/10cm/pintos/src/tests/filesys/base/sm-seq-block.c
C
oos
239
/* -*- c -*- */ #include <random.h> #include <stdio.h> #include <string.h> #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" #if TEST_SIZE % BLOCK_SIZE != 0 #error TEST_SIZE must be a multiple of BLOCK_SIZE #endif #define BLOCK_CNT (TEST_SIZE / BLOCK_SIZE) char buf[TEST_SIZE]; int order[BLOCK_CNT]...
10cm
trunk/10cm/pintos/src/tests/filesys/base/random.inc
C
oos
1,480
/* Writes out a fairly large file sequentially, one random-sized block at a time, then reads it back to verify that it was written properly. */ #define TEST_SIZE 75678 #include "tests/filesys/base/seq-random.inc"
10cm
trunk/10cm/pintos/src/tests/filesys/base/lg-seq-random.c
C
oos
220
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (syn-remove) begin (syn-remove) create "deleteme" (syn-remove) open "deleteme" (syn-remove) remove "deleteme" (syn-remove) write "deleteme" (syn-remove) seek "deleteme" to 0 (syn-remove) read "deleteme" (syn-r...
10cm
trunk/10cm/pintos/src/tests/filesys/base/syn-remove.ck
Perl
oos
371
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (lg-random) begin (lg-random) create "bazzle" (lg-random) open "bazzle" (lg-random) write "bazzle" in random order (lg-random) read "bazzle" in random order (lg-random) close "bazzle" (lg-random) end EOF pass;...
10cm
trunk/10cm/pintos/src/tests/filesys/base/lg-random.ck
Perl
oos
321
/* Writes out a fairly large file sequentially, one random-sized block at a time, then reads it back to verify that it was written properly. */ #define TEST_SIZE 5678 #include "tests/filesys/base/seq-random.inc"
10cm
trunk/10cm/pintos/src/tests/filesys/base/sm-seq-random.c
C
oos
219