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
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected ([<<'EOF']); (read-normal) begin (read-normal) open "sample.txt" for verification (read-normal) verified contents of "sample.txt" (read-normal) close "sample.txt" (read-normal) end read-normal: exit(0) EOF pass;
10cm
trunk/10cm/pintos/src/tests/userprog/read-normal.ck
Perl
oos
286
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected ([<<'EOF']); (create-null) begin create-null: exit(-1) EOF pass;
10cm
trunk/10cm/pintos/src/tests/userprog/create-null.ck
Perl
oos
139
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected ([<<'EOF']); (read-zero) begin (read-zero) open "sample.txt" (read-zero) end read-zero: exit(0) EOF pass;
10cm
trunk/10cm/pintos/src/tests/userprog/read-zero.ck
Perl
oos
180
/* Passes an invalid pointer to the write system call. The process must be terminated with -1 exit code. */ #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) { int handle; CHECK ((handle = open ("sample.txt")) > 1, "open \"sample.txt\""); write (handle, (char *) 0x10...
10cm
trunk/10cm/pintos/src/tests/userprog/write-bad-ptr.c
C
oos
375
/* Ensure that the executable of a running process cannot be modified, even by a child process. */ #define CHILD_CNT "1" #include "tests/userprog/rox-child.inc"
10cm
trunk/10cm/pintos/src/tests/userprog/rox-child.c
C
oos
165
/* Utility function for tests that try to break system calls by passing them data that crosses from one virtual page to another. */ #include <inttypes.h> #include <round.h> #include <string.h> #include "tests/userprog/boundary.h" static char dst[8192]; /* Returns the beginning of a page. There are at least 20...
10cm
trunk/10cm/pintos/src/tests/userprog/boundary.c
C
oos
789
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']); (bad-read2) begin bad-read2: exit(-1) EOF pass;
10cm
trunk/10cm/pintos/src/tests/userprog/bad-read2.ck
Perl
oos
160
/* Child process run by exec-multiple, exec-one, wait-simple, and wait-twice tests. Just prints a single message and terminates. */ #include <stdio.h> #include "tests/lib.h" const char *test_name = "child-simple"; int main (void) { msg ("run"); return 81; }
10cm
trunk/10cm/pintos/src/tests/userprog/child-simple.c
C
oos
272
/* Invokes a system call with one byte of the system call's argument on a separate page from the rest of the bytes. This must work. */ #include <syscall-nr.h> #include "tests/userprog/boundary.h" #include "tests/lib.h" #include "tests/main.h" void test_main (void) { /* Make one byte of a syscall argument ha...
10cm
trunk/10cm/pintos/src/tests/userprog/sc-boundary-2.c
C
oos
577
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected ([<<'EOF']); (exec-multiple) begin (child-simple) run child-simple: exit(81) (child-simple) run child-simple: exit(81) (child-simple) run child-simple: exit(81) (child-simple) run child-simple: exit(81) (exec-multiple) end exec-multiple: exit(0) ...
10cm
trunk/10cm/pintos/src/tests/userprog/exec-multiple.ck
Perl
oos
330
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected ([<<'EOF']); (exit) begin exit: exit(57) EOF pass;
10cm
trunk/10cm/pintos/src/tests/userprog/exit.ck
Perl
oos
125
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected ([<<'EOF']); (write-normal) begin (write-normal) create "test.txt" (write-normal) open "test.txt" (write-normal) end write-normal: exit(0) EOF pass;
10cm
trunk/10cm/pintos/src/tests/userprog/write-normal.ck
Perl
oos
223
#ifndef TESTS_CKSUM_H #define TESTS_CKSUM_H #include <stddef.h> unsigned long cksum(const void *, size_t); #endif /* tests/cksum.h */
10cm
trunk/10cm/pintos/src/tests/cksum.h
C
oos
137
# -*- makefile -*- include $(patsubst %,$(SRCDIR)/%/Make.tests,$(TEST_SUBDIRS)) PROGS = $(foreach subdir,$(TEST_SUBDIRS),$($(subdir)_PROGS)) TESTS = $(foreach subdir,$(TEST_SUBDIRS),$($(subdir)_TESTS)) EXTRA_GRADES = $(foreach subdir,$(TEST_SUBDIRS),$($(subdir)_EXTRA_GRADES)) OUTPUTS = $(addsuffix .output,$(TESTS) $...
10cm
trunk/10cm/pintos/src/tests/.svn/text-base/Make.tests.svn-base
Makefile
oos
2,138
#! /usr/bin/perl use strict; use warnings; @ARGV == 3 || die; my ($src_dir, $results_file, $grading_file) = @ARGV; # Read pass/file verdicts from $results_file. open (RESULTS, '<', $results_file) || die "$results_file: open: $!\n"; my (%verdicts, %verdict_counts); while (<RESULTS>) { my ($verdict, $test) = /^(pa...
10cm
trunk/10cm/pintos/src/tests/.svn/text-base/make-grade.svn-base
Perl
oos
4,096
/* Creates a 128 kB file and repeatedly shuffles data in it through a memory mapping. */ #include <stdio.h> #include <string.h> #include <syscall.h> #include "tests/arc4.h" #include "tests/cksum.h" #include "tests/lib.h" #include "tests/main.h" #define SIZE (128 * 1024) static char *buf = (char *) 0x10000000; vo...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-shuffle.c
C
oos
858
# -*- perl -*- use strict; use warnings; use tests::tests; sub check_process_death { my ($proc_name) = @_; our ($test); my (@output) = read_text_file ("$test.output"); common_checks ("run", @output); @output = get_core_output ("run", @output); fail "First line of output is not `($proc_name) be...
10cm
trunk/10cm/pintos/src/tests/vm/process_death.pm
Perl
oos
618
/* Maps and unmaps a file and verifies that the mapped region is inaccessible afterward. */ #include <syscall.h> #include "tests/vm/sample.inc" #include "tests/lib.h" #include "tests/main.h" #define ACTUAL ((void *) 0x10000000) void test_main (void) { int handle; mapid_t map; CHECK ((handle = open ("sample...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-unmap.c
C
oos
517
/* Verifies that mapping over the code segment is disallowed. */ #include <stdint.h> #include <round.h> #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) { uintptr_t test_main_page = ROUND_DOWN ((uintptr_t) test_main, 4096); int handle; CHECK ((handle = open ("sample....
10cm
trunk/10cm/pintos/src/tests/vm/mmap-over-code.c
C
oos
465
#ifndef TESTS_VM_PARALLEL_MERGE #define TESTS_VM_PARALLEL_MERGE 1 void parallel_merge (const char *child_name, int exit_status); #endif /* tests/vm/parallel-merge.h */
10cm
trunk/10cm/pintos/src/tests/vm/parallel-merge.h
C
oos
170
/* Try to write to the code segment using a system call. The process must be terminated with -1 exit code. */ #include "tests/lib.h" #include "tests/main.h" void test_main (void) { int handle; CHECK ((handle = open ("sample.txt")) > 1, "open \"sample.txt\""); read (handle, (void *) test_main, 1); fail ("s...
10cm
trunk/10cm/pintos/src/tests/vm/pt-write-code-2.c
C
oos
364
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-exit) begin (child-mm-wrt) begin (child-mm-wrt) create "sample.txt" (child-mm-wrt) open "sample.txt" (child-mm-wrt) mmap "sample.txt" (child-mm-wrt) end (mmap-exit) open "sample.txt" for verification (mm...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-exit.ck
Perl
oos
420
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-over-data) begin (mmap-over-data) open "sample.txt" (mmap-over-data) try to mmap over data segment (mmap-over-data) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/mmap-over-data.ck
Perl
oos
247
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (page-merge-par) begin (page-merge-par) init (page-merge-par) sort chunk 0 (page-merge-par) sort chunk 1 (page-merge-par) sort chunk 2 (page-merge-par) sort chunk 3 (page-merge-par) sort chunk 4 (page-merge-pa...
10cm
trunk/10cm/pintos/src/tests/vm/page-merge-par.ck
Perl
oos
790
#include "tests/main.h" #include "tests/vm/parallel-merge.h" void test_main (void) { parallel_merge ("child-sort", 123); }
10cm
trunk/10cm/pintos/src/tests/vm/page-merge-par.c
C
oos
127
/* Maps the same file into memory twice and verifies that the same data is readable in both. */ #include <string.h> #include <syscall.h> #include "tests/vm/sample.inc" #include "tests/lib.h" #include "tests/main.h" void test_main (void) { char *actual[2] = {(char *) 0x10000000, (char *) 0x20000000}; size_t i; ...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-twice.c
C
oos
742
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (page-parallel) begin (page-parallel) exec "child-linear" (page-parallel) exec "child-linear" (page-parallel) exec "child-linear" (page-parallel) exec "child-linear" (page-parallel) wait for child 0 (page-para...
10cm
trunk/10cm/pintos/src/tests/vm/page-parallel.ck
Perl
oos
439
/* Verifies that mmap'd regions are only written back on munmap if the data was actually modified in memory. */ #include <string.h> #include <syscall.h> #include "tests/vm/sample.inc" #include "tests/lib.h" #include "tests/main.h" void test_main (void) { static const char overwrite[] = "Now is the time for all g...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-clean.c
C
oos
1,663
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-over-stk) begin (mmap-over-stk) open "sample.txt" (mmap-over-stk) try to mmap over stack segment (mmap-over-stk) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/mmap-over-stk.ck
Perl
oos
244
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-misalign) begin (mmap-misalign) open "sample.txt" (mmap-misalign) try to mmap at misaligned address (mmap-misalign) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/mmap-misalign.ck
Perl
oos
247
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (pt-grow-stk-sc) begin (pt-grow-stk-sc) create "sample.txt" (pt-grow-stk-sc) open "sample.txt" (pt-grow-stk-sc) write "sample.txt" (pt-grow-stk-sc) 2nd open "sample.txt" (pt-grow-stk-sc) read "sample.txt" (pt-...
10cm
trunk/10cm/pintos/src/tests/vm/pt-grow-stk-sc.ck
Perl
oos
403
/* Reads from a file into a bad address. The process must be terminated with -1 exit code. */ #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) { int handle; CHECK ((handle = open ("sample.txt")) > 1, "open \"sample.txt\""); read (handle, (char *) &handle - 4096, 1); ...
10cm
trunk/10cm/pintos/src/tests/vm/pt-bad-read.c
C
oos
373
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (page-merge-seq) begin (page-merge-seq) init (page-merge-seq) sort chunk 0 (page-merge-seq) sort chunk 1 (page-merge-seq) sort chunk 2 (page-merge-seq) sort chunk 3 (page-merge-seq) sort chunk 4 (page-merge-se...
10cm
trunk/10cm/pintos/src/tests/vm/page-merge-seq.ck
Perl
oos
764
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected ([<<'EOF']); (pt-write-code2) begin (pt-write-code2) open "sample.txt" pt-write-code2: exit(-1) EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/pt-write-code2.ck
Perl
oos
180
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']); (mmap-zero) begin (mmap-zero) create empty file "empty" (mmap-zero) open "empty" (mmap-zero) mmap "empty" mmap-zero: exit(-1) EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/mmap-zero.ck
Perl
oos
248
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::vm::process_death; check_process_death ('mmap-unmap');
10cm
trunk/10cm/pintos/src/tests/vm/mmap-unmap.ck
Perl
oos
126
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (pt-grow-pusha) begin (pt-grow-pusha) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/pt-grow-pusha.ck
Perl
oos
163
/* This test checks that the stack is properly extended even if the first access to a stack location occurs inside a system call. From Godmar Back. */ #include <string.h> #include <syscall.h> #include "tests/vm/sample.inc" #include "tests/lib.h" #include "tests/main.h" void test_main (void) { int handle; ...
10cm
trunk/10cm/pintos/src/tests/vm/pt-grow-stk-sc.c
C
oos
917
/* Expand the stack by 32 bytes all at once using the PUSHA instruction. This must succeed. */ #include <string.h> #include "tests/arc4.h" #include "tests/cksum.h" #include "tests/lib.h" #include "tests/main.h" void test_main (void) { asm volatile ("movl %%esp, %%eax;" /* Save a copy of the stack p...
10cm
trunk/10cm/pintos/src/tests/vm/pt-grow-pusha.c
C
oos
616
/* Tries to map a zero-length file, which may or may not work but should not terminate the process or crash. Then dereferences the address that we tried to map, and the process must be terminated with -1 exit code. */ #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) ...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-zero.c
C
oos
763
#include "tests/main.h" #include "tests/vm/parallel-merge.h" void test_main (void) { parallel_merge ("child-qsort", 72); }
10cm
trunk/10cm/pintos/src/tests/vm/page-merge-stk.c
C
oos
127
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (page-merge-stk) begin (page-merge-stk) init (page-merge-stk) sort chunk 0 (page-merge-stk) sort chunk 1 (page-merge-stk) sort chunk 2 (page-merge-stk) sort chunk 3 (page-merge-stk) sort chunk 4 (page-merge-st...
10cm
trunk/10cm/pintos/src/tests/vm/page-merge-stk.ck
Perl
oos
790
/* Deletes and closes file that is mapped into memory and verifies that it can still be read through the mapping. */ #include <string.h> #include <syscall.h> #include "tests/vm/sample.inc" #include "tests/lib.h" #include "tests/main.h" void test_main (void) { char *actual = (char *) 0x10000000; int handle; m...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-remove.c
C
oos
1,275
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::vm::process_death; check_process_death ('pt-write-code');
10cm
trunk/10cm/pintos/src/tests/vm/pt-write-code.ck
Perl
oos
129
#include "tests/vm/qsort.h" #include <stdbool.h> #include <debug.h> #include <random.h> /* Picks a pivot for the quicksort from the SIZE bytes in BUF. */ static unsigned char pick_pivot (unsigned char *buf, size_t size) { ASSERT (size >= 1); return buf[random_ulong () % size]; } /* Checks whether the SIZE bytes ...
10cm
trunk/10cm/pintos/src/tests/vm/qsort.c
C
oos
3,265
/* Read from an address 4,096 bytes below the stack pointer. The process must be terminated with -1 exit code. */ #include <string.h> #include "tests/arc4.h" #include "tests/cksum.h" #include "tests/lib.h" #include "tests/main.h" void test_main (void) { asm volatile ("movl -4096(%esp), %eax"); }
10cm
trunk/10cm/pintos/src/tests/vm/pt-grow-bad.c
C
oos
304
/* Verifies that misaligned memory mappings are disallowed. */ #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) { int handle; CHECK ((handle = open ("sample.txt")) > 1, "open \"sample.txt\""); CHECK (mmap (handle, (void *) 0x10001234) == MAP_FAILED, "try to ...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-misalign.c
C
oos
353
/* Verifies that memory mappings at address 0 are disallowed. */ #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) { int handle; CHECK ((handle = open ("sample.txt")) > 1, "open \"sample.txt\""); CHECK (mmap (handle, NULL) == MAP_FAILED, "try to mmap at address 0"); }...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-null.c
C
oos
322
/* Child process of page-parallel. Encrypts 1 MB of zeros, then decrypts it, and ensures that the zeros are back. */ #include <string.h> #include "tests/arc4.h" #include "tests/lib.h" #include "tests/main.h" const char *test_name = "child-linear"; #define SIZE (1024 * 1024) static char buf[SIZE]; int main (in...
10cm
trunk/10cm/pintos/src/tests/vm/child-linear.c
C
oos
754
/* Allocates and writes to a 64 kB object on the stack. This must succeed. */ #include <string.h> #include "tests/arc4.h" #include "tests/cksum.h" #include "tests/lib.h" #include "tests/main.h" void test_main (void) { char stk_obj[65536]; struct arc4 arc4; arc4_init (&arc4, "foobar", 6); memset (stk_obj, ...
10cm
trunk/10cm/pintos/src/tests/vm/pt-big-stk-obj.c
C
oos
444
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']); (mmap-inherit) begin (mmap-inherit) open "sample.txt" (mmap-inherit) mmap "sample.txt" (mmap-inherit) exec "child-inherit" (child-inherit) begin child-inherit: exit(-1) (mmap-inherit) checking that mmap'd fil...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-inherit.ck
Perl
oos
393
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::cksum; use tests::lib; my ($init, @shuffle); if (1) { # Use precalculated values. $init = 3115322833; @shuffle = (1691062564, 1973575879, 1647619479, 96566261, 3885786467, 3022003332, 3614934266, 2704001777, 735775156, 1864109763); } e...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-shuffle.ck
Perl
oos
1,267
/* Verifies that mapping over the stack segment is disallowed. */ #include <stdint.h> #include <round.h> #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) { int handle; uintptr_t handle_page = ROUND_DOWN ((uintptr_t) &handle, 4096); CHECK ((handle = open ("sample.txt"...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-over-stk.c
C
oos
459
/* Mmaps a 128 kB file "sorts" the bytes in it, using quick sort, a multi-pass divide and conquer algorithm. */ #include <debug.h> #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" #include "tests/vm/qsort.h" const char *test_name = "child-qsort-mm"; int main (int argc UNUSED, char *argv[]) { ...
10cm
trunk/10cm/pintos/src/tests/vm/child-qsort-mm.c
C
oos
583
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-overlap) begin (mmap-overlap) open "zeros" once (mmap-overlap) mmap "zeros" (mmap-overlap) open "zeros" again (mmap-overlap) try to mmap "zeros" again (mmap-overlap) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/mmap-overlap.ck
Perl
oos
297
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']); (pt-grow-bad) begin pt-grow-bad: exit(-1) EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/pt-grow-bad.ck
Perl
oos
164
/* Try to write to the code segment. The process must be terminated with -1 exit code. */ #include "tests/lib.h" #include "tests/main.h" void test_main (void) { *(int *) test_main = 0; fail ("writing the code segment succeeded"); }
10cm
trunk/10cm/pintos/src/tests/vm/pt-write-code.c
C
oos
241
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-read) begin (mmap-read) open "sample.txt" (mmap-read) mmap "sample.txt" (mmap-read) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/mmap-read.ck
Perl
oos
215
/* Tries to mmap an invalid fd, which must either fail silently or terminate the process with exit code -1. */ #include <syscall.h> #include "tests/lib.h" #include "tests/main.h" void test_main (void) { CHECK (mmap (0x5678, (void *) 0x10000000) == MAP_FAILED, "try to mmap invalid fd"); }
10cm
trunk/10cm/pintos/src/tests/vm/mmap-bad-fd.c
C
oos
310
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (page-merge-seq) begin (page-merge-seq) init (page-merge-seq) sort chunk 0 (page-merge-seq) sort chunk 1 (page-merge-seq) sort chunk 2 (page-merge-seq) sort chunk 3 (page-merge-seq) sort chunk 4 (page-merge-se...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/page-merge-seq.ck.svn-base
Perl
oos
764
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (pt-big-stk-obj) begin (pt-big-stk-obj) cksum: 3256410166 (pt-big-stk-obj) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/pt-big-stk-obj.ck.svn-base
Perl
oos
200
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-remove) begin (mmap-remove) open "sample.txt" (mmap-remove) mmap "sample.txt" (mmap-remove) remove "sample.txt" (mmap-remove) try to open "sample.txt" (mmap-remove) create "another" (mmap-remove) end EOF...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-remove.ck.svn-base
Perl
oos
327
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-misalign) begin (mmap-misalign) open "sample.txt" (mmap-misalign) try to mmap at misaligned address (mmap-misalign) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-misalign.ck.svn-base
Perl
oos
247
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']); (pt-grow-bad) begin pt-grow-bad: exit(-1) EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/pt-grow-bad.ck.svn-base
Perl
oos
164
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::cksum; use tests::lib; my ($init, @shuffle); if (1) { # Use precalculated values. $init = 3115322833; @shuffle = (1691062564, 1973575879, 1647619479, 96566261, 3885786467, 3022003332, 3614934266, 2704001777, 735775156, 1864109763); } e...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-shuffle.ck.svn-base
Perl
oos
1,267
# -*- makefile -*- tests/vm_TESTS = $(addprefix tests/vm/,pt-grow-stack pt-grow-pusha \ pt-grow-bad pt-big-stk-obj pt-bad-addr pt-bad-read pt-write-code \ pt-write-code2 pt-grow-stk-sc page-linear page-parallel page-merge-seq \ page-merge-par page-merge-stk page-merge-mm page-shuffle mmap-read \ mmap-close mmap-unmap ...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/Make.tests.svn-base
Makefile
oos
5,526
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']); (mmap-zero) begin (mmap-zero) create empty file "empty" (mmap-zero) open "empty" (mmap-zero) mmap "empty" mmap-zero: exit(-1) EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-zero.ck.svn-base
Perl
oos
248
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::vm::process_death; check_process_death ('pt-write-code');
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/pt-write-code.ck.svn-base
Perl
oos
129
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (page-merge-stk) begin (page-merge-stk) init (page-merge-stk) sort chunk 0 (page-merge-stk) sort chunk 1 (page-merge-stk) sort chunk 2 (page-merge-stk) sort chunk 3 (page-merge-stk) sort chunk 4 (page-merge-st...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/page-merge-stk.ck.svn-base
Perl
oos
790
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-over-code) begin (mmap-over-code) open "sample.txt" (mmap-over-code) try to mmap over code segment (mmap-over-code) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-over-code.ck.svn-base
Perl
oos
247
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (pt-grow-stack) begin (pt-grow-stack) cksum: 3424492700 (pt-grow-stack) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/pt-grow-stack.ck.svn-base
Perl
oos
197
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected ([<<'EOF']); (pt-bad-read) begin (pt-bad-read) open "sample.txt" pt-bad-read: exit(-1) EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/pt-bad-read.ck.svn-base
Perl
oos
171
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-over-stk) begin (mmap-over-stk) open "sample.txt" (mmap-over-stk) try to mmap over stack segment (mmap-over-stk) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-over-stk.ck.svn-base
Perl
oos
244
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (page-linear) begin (page-linear) initialize (page-linear) read pass (page-linear) read/modify/write pass one (page-linear) read/modify/write pass two (page-linear) read pass (page-linear) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/page-linear.ck.svn-base
Perl
oos
314
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-over-data) begin (mmap-over-data) open "sample.txt" (mmap-over-data) try to mmap over data segment (mmap-over-data) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-over-data.ck.svn-base
Perl
oos
247
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected ([<<'EOF']); (pt-write-code2) begin (pt-write-code2) open "sample.txt" pt-write-code2: exit(-1) EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/pt-write-code2.ck.svn-base
Perl
oos
180
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-read) begin (mmap-read) open "sample.txt" (mmap-read) mmap "sample.txt" (mmap-read) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-read.ck.svn-base
Perl
oos
215
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (pt-grow-stk-sc) begin (pt-grow-stk-sc) create "sample.txt" (pt-grow-stk-sc) open "sample.txt" (pt-grow-stk-sc) write "sample.txt" (pt-grow-stk-sc) 2nd open "sample.txt" (pt-grow-stk-sc) read "sample.txt" (pt-...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/pt-grow-stk-sc.ck.svn-base
Perl
oos
403
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (page-parallel) begin (page-parallel) exec "child-linear" (page-parallel) exec "child-linear" (page-parallel) exec "child-linear" (page-parallel) exec "child-linear" (page-parallel) wait for child 0 (page-para...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/page-parallel.ck.svn-base
Perl
oos
439
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::vm::process_death; check_process_death ('mmap-unmap');
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-unmap.ck.svn-base
Perl
oos
126
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']); (mmap-inherit) begin (mmap-inherit) open "sample.txt" (mmap-inherit) mmap "sample.txt" (mmap-inherit) exec "child-inherit" (child-inherit) begin child-inherit: exit(-1) (mmap-inherit) checking that mmap'd fil...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-inherit.ck.svn-base
Perl
oos
393
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-close) begin (mmap-close) open "sample.txt" (mmap-close) mmap "sample.txt" (mmap-close) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-close.ck.svn-base
Perl
oos
219
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (pt-grow-pusha) begin (pt-grow-pusha) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/pt-grow-pusha.ck.svn-base
Perl
oos
163
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (page-merge-mm) begin (page-merge-mm) init (page-merge-mm) sort chunk 0 (page-merge-mm) sort chunk 1 (page-merge-mm) sort chunk 2 (page-merge-mm) sort chunk 3 (page-merge-mm) sort chunk 4 (page-merge-mm) sort ...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/page-merge-mm.ck.svn-base
Perl
oos
768
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (page-merge-par) begin (page-merge-par) init (page-merge-par) sort chunk 0 (page-merge-par) sort chunk 1 (page-merge-par) sort chunk 2 (page-merge-par) sort chunk 3 (page-merge-par) sort chunk 4 (page-merge-pa...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/page-merge-par.ck.svn-base
Perl
oos
790
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected ([<<'EOF', <<'EOF']); (mmap-bad-fd) begin (mmap-bad-fd) try to mmap invalid fd (mmap-bad-fd) end mmap-bad-fd: exit(0) EOF (mmap-bad-fd) begin (mmap-bad-fd) try to mmap invalid fd mmap-bad-fd: exit(-1) EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-bad-fd.ck.svn-base
Perl
oos
285
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::cksum; use tests::lib; my ($init, @shuffle); if (1) { # Use precalculated values. $init = 3115322833; @shuffle = (1691062564, 1973575879, 1647619479, 96566261, 3885786467, 3022003332, 3614934266, 2704001777, 735775156, 1864109763); } e...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/page-shuffle.ck.svn-base
Perl
oos
1,178
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-overlap) begin (mmap-overlap) open "zeros" once (mmap-overlap) mmap "zeros" (mmap-overlap) open "zeros" again (mmap-overlap) try to mmap "zeros" again (mmap-overlap) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-overlap.ck.svn-base
Perl
oos
297
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-clean) begin (mmap-clean) open "sample.txt" (mmap-clean) mmap "sample.txt" (mmap-clean) write "sample.txt" (mmap-clean) munmap "sample.txt" (mmap-clean) seek "sample.txt" (mmap-clean) read "sample.txt" (...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-clean.ck.svn-base
Perl
oos
397
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-write) begin (mmap-write) create "sample.txt" (mmap-write) open "sample.txt" (mmap-write) mmap "sample.txt" (mmap-write) compare read data against written data (mmap-write) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-write.ck.svn-base
Perl
oos
304
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-null) begin (mmap-null) open "sample.txt" (mmap-null) try to mmap at address 0 (mmap-null) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-null.ck.svn-base
Perl
oos
222
# -*- perl -*- use strict; use warnings; use tests::tests; sub check_process_death { my ($proc_name) = @_; our ($test); my (@output) = read_text_file ("$test.output"); common_checks ("run", @output); @output = get_core_output ("run", @output); fail "First line of output is not `($proc_name) be...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/process_death.pm.svn-base
Perl
oos
618
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-exit) begin (child-mm-wrt) begin (child-mm-wrt) create "sample.txt" (child-mm-wrt) open "sample.txt" (child-mm-wrt) mmap "sample.txt" (child-mm-wrt) end (mmap-exit) open "sample.txt" for verification (mm...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-exit.ck.svn-base
Perl
oos
420
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (mmap-twice) begin (mmap-twice) open "sample.txt" #0 (mmap-twice) mmap "sample.txt" #0 at 0x10000000 (mmap-twice) open "sample.txt" #1 (mmap-twice) mmap "sample.txt" #1 at 0x20000000 (mmap-twice) compare mmap'...
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/mmap-twice.ck.svn-base
Perl
oos
417
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::vm::process_death; check_process_death ('pt-bad-addr');
10cm
trunk/10cm/pintos/src/tests/vm/.svn/text-base/pt-bad-addr.ck.svn-base
Perl
oos
127
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::vm::process_death; check_process_death ('pt-bad-addr');
10cm
trunk/10cm/pintos/src/tests/vm/pt-bad-addr.ck
Perl
oos
127
# -*- perl -*- use strict; use warnings; use tests::tests; check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']); (page-linear) begin (page-linear) initialize (page-linear) read pass (page-linear) read/modify/write pass one (page-linear) read/modify/write pass two (page-linear) read pass (page-linear) end EOF pass;
10cm
trunk/10cm/pintos/src/tests/vm/page-linear.ck
Perl
oos
314
/* Verifies that memory mappings persist after file close. */ #include <string.h> #include <syscall.h> #include "tests/vm/sample.inc" #include "tests/arc4.h" #include "tests/lib.h" #include "tests/main.h" #define ACTUAL ((void *) 0x10000000) void test_main (void) { int handle; mapid_t map; CHECK ((handle = op...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-close.c
C
oos
585
/* Executes child-mm-wrt and verifies that the writes that should have occurred really did. */ #include <syscall.h> #include "tests/vm/sample.inc" #include "tests/lib.h" #include "tests/main.h" void test_main (void) { pid_t child; /* Make child write file. */ quiet = true; CHECK ((child = exec ("child-mm-...
10cm
trunk/10cm/pintos/src/tests/vm/mmap-exit.c
C
oos
526
/* Encrypts, then decrypts, 2 MB of memory and verifies that the values are as they should be. */ #include <string.h> #include "tests/arc4.h" #include "tests/lib.h" #include "tests/main.h" #define SIZE (2 * 1024 * 1024) static char buf[SIZE]; void test_main (void) { struct arc4 arc4; size_t i; /* Initiali...
10cm
trunk/10cm/pintos/src/tests/vm/page-linear.c
C
oos
949