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', <<'EOF']);
(close-bad-fd) begin
(close-bad-fd) end
close-bad-fd: exit(0)
EOF
(close-bad-fd) begin
close-bad-fd: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/close-bad-fd.ck.svn-base | Perl | oos | 216 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
our ($test);
my (@output) = read_text_file ("$test.output");
common_checks ("run", @output);
fail "missing 'begin' message\n"
if !grep ($_ eq '(halt) begin', @output);
fail "found 'fail' message--halt didn't really halt\n"
if grep ($_ eq '(halt) fail', @... | 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/halt.ck.svn-base | Perl | oos | 335 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(multi-child-fd) begin
(multi-child-fd) open "sample.txt"
(child-close) begin
(child-close) end
child-close: exit(0)
(multi-child-fd) wait(exec()) = 0
(multi-child-fd) verified contents of "sample.txt"
(multi-child-fd) end
m... | 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/multi-child-fd.ck.svn-base | Perl | oos | 588 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(write-zero) begin
(write-zero) open "sample.txt"
(write-zero) end
write-zero: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/write-zero.ck.svn-base | Perl | oos | 184 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(close-stdin) begin
(close-stdin) end
close-stdin: exit(0)
EOF
(close-stdin) begin
close-stdin: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/close-stdin.ck.svn-base | Perl | oos | 211 |
/* -*- c -*- */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
const char *child_cmd = "child-rox " CHILD_CNT;
int handle;
pid_t child;
char buffer[16];
/* Open child-rox, read from it, write back same data. */
CHECK ((handle = open ("child-rox")) > 1, "open ... | 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/rox-child.inc.svn-base | C | oos | 919 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(write-bad-ptr) begin
(write-bad-ptr) open "sample.txt"
(write-bad-ptr) end
write-bad-ptr: exit(0)
EOF
(write-bad-ptr) begin
(write-bad-ptr) open "sample.txt"
write-bad-ptr: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/write-bad-ptr.ck.svn-base | Perl | oos | 289 |
# -*- 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/.svn/text-base/exit.ck.svn-base | Perl | oos | 125 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(args) begin
(args) argc = 5
(args) argv[0] = 'args-multiple'
(args) argv[1] = 'some'
(args) argv[2] = 'arguments'
(args) argv[3] = 'for'
(args) argv[4] = 'you!'
(args) argv[5] = null
(args) end
args-multiple: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/args-multiple.ck.svn-base | Perl | oos | 315 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(args) begin
(args) argc = 1
(args) argv[0] = 'args-none'
(args) argv[1] = null
(args) end
args-none: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/args-none.ck.svn-base | Perl | oos | 207 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(create-long) begin
(create-long) create("x..."): 0
(create-long) end
create-long: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/create-long.ck.svn-base | Perl | oos | 188 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(exec-bad-ptr) begin
(exec-bad-ptr) end
exec-bad-ptr: exit(0)
EOF
(exec-bad-ptr) begin
exec-bad-ptr: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/exec-bad-ptr.ck.svn-base | Perl | oos | 216 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(wait-killed) begin
(child-bad) begin
child-bad: exit(-1)
(wait-killed) wait(exec()) = -1
(wait-killed) end
wait-killed: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/wait-killed.ck.svn-base | Perl | oos | 226 |
# -*- makefile -*-
tests/%.output: FSDISK = 2
tests/%.output: PUTFILES = $(filter-out os.dsk, $^)
tests/userprog_TESTS = $(addprefix tests/userprog/,args-none \
args-single args-multiple args-many args-dbl-space sc-bad-sp \
sc-bad-arg sc-boundary sc-boundary-2 halt exit create-normal \
create-empty create-null cre... | 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/Make.tests.svn-base | Makefile | oos | 7,935 |
# -*- 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/.svn/text-base/create-null.ck.svn-base | Perl | oos | 139 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(args) begin
(args) argc = 23
(args) argv[0] = 'args-many'
(args) argv[1] = 'a'
(args) argv[2] = 'b'
(args) argv[3] = 'c'
(args) argv[4] = 'd'
(args) argv[5] = 'e'
(args) argv[6] = 'f'
(args) argv[7] = 'g'
(args) argv[8] = 'h'
(args)... | 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/args-many.ck.svn-base | Perl | oos | 684 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(create-normal) begin
(create-normal) create quux.dat
(create-normal) end
create-normal: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/create-normal.ck.svn-base | Perl | oos | 194 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(open-null) begin
(open-null) end
open-null: exit(0)
EOF
(open-null) begin
open-null: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/open-null.ck.svn-base | Perl | oos | 201 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(args) begin
(args) argc = 2
(args) argv[0] = 'args-single'
(args) argv[1] = 'onearg'
(args) argv[2] = null
(args) end
args-single: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/args-single.ck.svn-base | Perl | oos | 237 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']);
(bad-read) begin
bad-read: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/bad-read.ck.svn-base | Perl | oos | 158 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(sc-bad-arg) begin
sc-bad-arg: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/sc-bad-arg.ck.svn-base | Perl | oos | 137 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF', <<'EOF', <<'EOF']);
(exec-missing) begin
load: no-such-file: open failed
(exec-missing) exec("no-such-file"): -1
(exec-missing) end
exec-missing: exit(0)
EOF
(exec-missing) begin
(exec-missing) exec("no-such-file"): -1
(exec-m... | 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/exec-missing.ck.svn-base | Perl | oos | 686 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(exec-arg) begin
(args) begin
(args) argc = 2
(args) argv[0] = 'child-args'
(args) argv[1] = 'childarg'
(args) argv[2] = null
(args) end
child-args: exit(0)
(exec-arg) end
exec-arg: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/exec-arg.ck.svn-base | Perl | oos | 287 |
# -*- 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/.svn/text-base/write-normal.ck.svn-base | Perl | oos | 223 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']);
(bad-jump2) begin
bad-jump2: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/bad-jump2.ck.svn-base | Perl | oos | 160 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(close-twice) begin
(close-twice) open "sample.txt"
(close-twice) close "sample.txt"
(close-twice) close "sample.txt" again
(close-twice) end
close-twice: exit(0)
EOF
(close-twice) begin
(close-twice) open "sample.txt"
(clos... | 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/close-twice.ck.svn-base | Perl | oos | 419 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(create-empty) begin
(create-empty) create(""): 0
(create-empty) end
create-empty: exit(0)
EOF
(create-empty) begin
create-empty: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/create-empty.ck.svn-base | Perl | oos | 245 |
# -*- 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/.svn/text-base/read-zero.ck.svn-base | Perl | oos | 180 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(read-bad-fd) begin
(read-bad-fd) end
read-bad-fd: exit(0)
EOF
(read-bad-fd) begin
read-bad-fd: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/read-bad-fd.ck.svn-base | Perl | oos | 211 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(close-normal) begin
(close-normal) open "sample.txt"
(close-normal) close "sample.txt"
(close-normal) end
close-normal: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/close-normal.ck.svn-base | Perl | oos | 226 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(rox-child) begin
(rox-child) open "child-rox"
(rox-child) read "child-rox"
(rox-child) write "child-rox"
(rox-child) exec "child-rox 1"
(child-rox) begin
(child-rox) try to write "child-rox"
(child-rox) try to write "child-rox"
(chi... | 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/rox-child.ck.svn-base | Perl | oos | 427 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(sc-boundary-2) begin
sc-boundary-2: exit(67)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/sc-boundary-2.ck.svn-base | Perl | oos | 143 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(open-twice) begin
(open-twice) open "sample.txt" once
(open-twice) open "sample.txt" again
(open-twice) end
open-twice: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/open-twice.ck.svn-base | Perl | oos | 226 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(close-stdout) begin
(close-stdout) end
close-stdout: exit(0)
EOF
(close-stdout) begin
close-stdout: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/close-stdout.ck.svn-base | Perl | oos | 216 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(open-missing) begin
(open-missing) end
open-missing: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/open-missing.ck.svn-base | Perl | oos | 159 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(wait-twice) begin
(child-simple) run
child-simple: exit(81)
(wait-twice) wait(exec()) = 81
(wait-twice) wait(exec()) = -1
(wait-twice) end
wait-twice: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/wait-twice.ck.svn-base | Perl | oos | 257 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(wait-bad-pid) begin
(wait-bad-pid) end
wait-bad-pid: exit(0)
EOF
(wait-bad-pid) begin
wait-bad-pid: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/wait-bad-pid.ck.svn-base | Perl | oos | 216 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(write-boundary) begin
(write-boundary) open "sample.txt"
(write-boundary) end
write-boundary: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/write-boundary.ck.svn-base | Perl | oos | 200 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(open-empty) begin
(open-empty) end
open-empty: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/open-empty.ck.svn-base | Perl | oos | 153 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(create-bad-ptr) begin
create-bad-ptr: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/create-bad-ptr.ck.svn-base | Perl | oos | 145 |
# -*- 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/.svn/text-base/exec-multiple.ck.svn-base | Perl | oos | 330 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(wait-simple) begin
(child-simple) run
child-simple: exit(81)
(wait-simple) wait(exec()) = 81
(wait-simple) end
wait-simple: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/wait-simple.ck.svn-base | Perl | oos | 230 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']);
(bad-write2) begin
bad-write2: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/bad-write2.ck.svn-base | Perl | oos | 162 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']);
(bad-write) begin
bad-write: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/bad-write.ck.svn-base | Perl | oos | 160 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(exec-once) begin
(child-simple) run
child-simple: exit(81)
(exec-once) end
exec-once: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/exec-once.ck.svn-base | Perl | oos | 192 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(rox-multichild) begin
(rox-multichild) open "child-rox"
(rox-multichild) read "child-rox"
(rox-multichild) write "child-rox"
(rox-multichild) exec "child-rox 5"
(child-rox) begin
(child-rox) try to write "child-rox"
(child-rox) exec... | 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/rox-multichild.ck.svn-base | Perl | oos | 1,103 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(multi-recurse) begin 15
(multi-recurse) exec("multi-recurse 14")
(multi-recurse) begin 14
(multi-recurse) exec("multi-recurse 13")
(multi-recurse) begin 13
(multi-recurse) exec("multi-recurse 12")
(multi-recurse) begin 12
(multi-rec... | 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/multi-recurse.ck.svn-base | Perl | oos | 1,824 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(sc-boundary) begin
sc-boundary: exit(42)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/sc-boundary.ck.svn-base | Perl | oos | 139 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(args) begin
(args) argc = 3
(args) argv[0] = 'args-dbl-space'
(args) argv[1] = 'two'
(args) argv[2] = 'spaces!'
(args) argv[3] = null
(args) end
args-dbl-space: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/args-dbl-space.ck.svn-base | Perl | oos | 267 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(read-boundary) begin
(read-boundary) open "sample.txt"
(read-boundary) end
read-boundary: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/read-boundary.ck.svn-base | Perl | oos | 196 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(write-stdin) begin
(write-stdin) end
write-stdin: exit(0)
EOF
(write-stdin) begin
write-stdin: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/write-stdin.ck.svn-base | Perl | oos | 211 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(write-bad-fd) begin
(write-bad-fd) end
write-bad-fd: exit(0)
EOF
(write-bad-fd) begin
write-bad-fd: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/write-bad-fd.ck.svn-base | Perl | oos | 216 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(create-exists) begin
(create-exists) create quux.dat
(create-exists) create warble.dat
(create-exists) try to re-create quux.dat
(create-exists) create baffle.dat
(create-exists) try to re-create quux.dat
(create-exists) end
create-... | 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/create-exists.ck.svn-base | Perl | oos | 346 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(read-bad-ptr) begin
(read-bad-ptr) open "sample.txt"
(read-bad-ptr) end
read-bad-ptr: exit(0)
EOF
(read-bad-ptr) begin
(read-bad-ptr) open "sample.txt"
read-bad-ptr: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/read-bad-ptr.ck.svn-base | Perl | oos | 282 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(read-stdout) begin
(read-stdout) end
read-stdout: exit(0)
EOF
(read-stdout) begin
read-stdout: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/read-stdout.ck.svn-base | Perl | oos | 211 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(sc-bad-sp) begin
sc-bad-sp: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/sc-bad-sp.ck.svn-base | Perl | oos | 135 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(create-bound) begin
(create-bound) create("quux.dat"): 1
(create-bound) end
create-bound: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/create-bound.ck.svn-base | Perl | oos | 196 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(open-boundary) begin
(open-boundary) open "sample.txt"
(open-boundary) end
open-boundary: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/open-boundary.ck.svn-base | Perl | oos | 196 |
# -*- 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/.svn/text-base/bad-read2.ck.svn-base | Perl | oos | 160 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']);
(bad-jump) begin
bad-jump: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/bad-jump.ck.svn-base | Perl | oos | 158 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(open-bad-ptr) begin
(open-bad-ptr) end
open-bad-ptr: exit(0)
EOF
(open-bad-ptr) begin
open-bad-ptr: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/open-bad-ptr.ck.svn-base | Perl | oos | 216 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(open-normal) begin
(open-normal) end
open-normal: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/open-normal.ck.svn-base | Perl | oos | 156 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
system call!
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/null.ck.svn-base | Perl | oos | 110 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(rox-simple) begin
(rox-simple) open "rox-simple"
(rox-simple) read "rox-simple"
(rox-simple) try to write "rox-simple"
(rox-simple) end
rox-simple: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/.svn/text-base/rox-simple.ck.svn-base | Perl | oos | 254 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(multi-child-fd) begin
(multi-child-fd) open "sample.txt"
(child-close) begin
(child-close) end
child-close: exit(0)
(multi-child-fd) wait(exec()) = 0
(multi-child-fd) verified contents of "sample.txt"
(multi-child-fd) end
m... | 10cm | trunk/10cm/pintos/src/tests/userprog/multi-child-fd.ck | Perl | oos | 588 |
/* This program attempts to write to kernel memory.
This should terminate the process with a -1 exit code. */
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
*(int *)0xC0000000 = 42;
fail ("should have exited with -1");
}
| 10cm | trunk/10cm/pintos/src/tests/userprog/bad-write2.c | C | oos | 256 |
/* Creates an ordinary empty file. */
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
CHECK (create ("quux.dat", 0), "create quux.dat");
}
| 10cm | trunk/10cm/pintos/src/tests/userprog/create-normal.c | C | oos | 167 |
/* Wait for a subprocess to finish, twice.
The first call must wait in the usual way and return the exit code.
The second wait call must return -1 immediately. */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
pid_t child = exec ("child-simple");
msg ("wait(exec... | 10cm | trunk/10cm/pintos/src/tests/userprog/wait-twice.c | C | oos | 391 |
/* Child process run by multi-child-fd test.
Attempts to close the file descriptor passed as the first
command-line argument. This is invalid, because file
descriptors are not inherited in Pintos. Two results are
allowed: either the system call should return without taking
any action, or the kernel sh... | 10cm | trunk/10cm/pintos/src/tests/userprog/child-close.c | C | oos | 703 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']);
(bad-write) begin
bad-write: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/bad-write.ck | Perl | oos | 160 |
/* Tests argument passing to child processes. */
#include <syscall.h>
#include "tests/main.h"
void
test_main (void)
{
wait (exec ("child-args childarg"));
}
| 10cm | trunk/10cm/pintos/src/tests/userprog/exec-arg.c | C | oos | 162 |
# -*- makefile -*-
tests/%.output: FSDISK = 2
tests/%.output: PUTFILES = $(filter-out os.dsk, $^)
tests/userprog_TESTS = $(addprefix tests/userprog/,args-none \
args-single args-multiple args-many args-dbl-space sc-bad-sp \
sc-bad-arg sc-boundary sc-boundary-2 halt exit create-normal \
create-empty create-null cre... | 10cm | trunk/10cm/pintos/src/tests/userprog/Make.tests | Makefile | oos | 7,935 |
/* Invokes a system call with the system call number and its
argument on separate pages. This must work. */
#include <syscall-nr.h>
#include "tests/userprog/boundary.h"
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
/* Put a syscall number at the end of one page
and its argument at... | 10cm | trunk/10cm/pintos/src/tests/userprog/sc-boundary.c | C | oos | 555 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(exec-bad-ptr) begin
(exec-bad-ptr) end
exec-bad-ptr: exit(0)
EOF
(exec-bad-ptr) begin
exec-bad-ptr: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/exec-bad-ptr.ck | Perl | oos | 216 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(wait-killed) begin
(child-bad) begin
child-bad: exit(-1)
(wait-killed) wait(exec()) = -1
(wait-killed) end
wait-killed: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/wait-killed.ck | Perl | oos | 226 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(create-bad-ptr) begin
create-bad-ptr: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/create-bad-ptr.ck | Perl | oos | 145 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(rox-simple) begin
(rox-simple) open "rox-simple"
(rox-simple) read "rox-simple"
(rox-simple) try to write "rox-simple"
(rox-simple) end
rox-simple: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/rox-simple.ck | Perl | oos | 254 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(open-twice) begin
(open-twice) open "sample.txt" once
(open-twice) open "sample.txt" again
(open-twice) end
open-twice: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/open-twice.ck | Perl | oos | 226 |
/* Wait for a process that will be killed for bad behavior. */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
msg ("wait(exec()) = %d", wait (exec ("child-bad")));
}
| 10cm | trunk/10cm/pintos/src/tests/userprog/wait-killed.c | C | oos | 216 |
/* Prints the command-line arguments.
This program is used for all of the args-* tests. Grading is
done differently for each of the args-* tests based on the
output. */
#include "tests/lib.h"
int
main (int argc, char *argv[])
{
int i;
test_name = "args";
msg ("begin");
msg ("argc = %d", argc);
... | 10cm | trunk/10cm/pintos/src/tests/userprog/args.c | C | oos | 489 |
/* This program attempts to execute code at address 0, which is not mapped.
This should terminate the process with a -1 exit code. */
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
msg ("Congratulations - you have successfully called NULL: %d",
((int (*)(void))NULL)());
fail (... | 10cm | trunk/10cm/pintos/src/tests/userprog/bad-jump.c | C | oos | 353 |
/* Reads data spanning two pages in virtual address space,
which must succeed. */
#include <string.h>
#include <syscall.h>
#include "tests/userprog/boundary.h"
#include "tests/userprog/sample.inc"
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
int handle;
int byte_cnt;
char *buffer;
... | 10cm | trunk/10cm/pintos/src/tests/userprog/read-boundary.c | C | oos | 803 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(write-zero) begin
(write-zero) open "sample.txt"
(write-zero) end
write-zero: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/write-zero.ck | Perl | oos | 184 |
/* Tries to close an invalid fd, which must either fail silently
or terminate with exit code -1. */
#include <syscall.h>
#include "tests/main.h"
void
test_main (void)
{
close (0x20101234);
}
| 10cm | trunk/10cm/pintos/src/tests/userprog/close-bad-fd.c | C | oos | 199 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(open-normal) begin
(open-normal) end
open-normal: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/open-normal.ck | Perl | oos | 156 |
/* Ensure that the executable of a running process cannot be
modified, even in the presence of multiple children. */
#define CHILD_CNT "5"
#include "tests/userprog/rox-child.inc"
| 10cm | trunk/10cm/pintos/src/tests/userprog/rox-multichild.c | C | oos | 183 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(exec-arg) begin
(args) begin
(args) argc = 2
(args) argv[0] = 'child-args'
(args) argv[1] = 'childarg'
(args) argv[2] = null
(args) end
child-args: exit(0)
(exec-arg) end
exec-arg: exit(0)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/exec-arg.ck | Perl | oos | 287 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
(args) begin
(args) argc = 23
(args) argv[0] = 'args-many'
(args) argv[1] = 'a'
(args) argv[2] = 'b'
(args) argv[3] = 'c'
(args) argv[4] = 'd'
(args) argv[5] = 'e'
(args) argv[6] = 'f'
(args) argv[7] = 'g'
(args) argv[8] = 'h'
(args)... | 10cm | trunk/10cm/pintos/src/tests/userprog/args-many.ck | Perl | oos | 684 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(close-twice) begin
(close-twice) open "sample.txt"
(close-twice) close "sample.txt"
(close-twice) close "sample.txt" again
(close-twice) end
close-twice: exit(0)
EOF
(close-twice) begin
(close-twice) open "sample.txt"
(clos... | 10cm | trunk/10cm/pintos/src/tests/userprog/close-twice.ck | Perl | oos | 419 |
/* Executes and waits for a single child process. */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
wait (exec ("child-simple"));
}
| 10cm | trunk/10cm/pintos/src/tests/userprog/exec-once.c | C | oos | 182 |
/* Executes and waits for multiple child processes. */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
wait (exec ("child-simple"));
wait (exec ("child-simple"));
wait (exec ("child-simple"));
wait (exec ("child-simple"));
}
| 10cm | trunk/10cm/pintos/src/tests/userprog/exec-multiple.c | C | oos | 280 |
/* Try writing to fd 0 (stdin),
which may just fail or terminate the process with -1 exit
code. */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
char buf = 123;
write (0, &buf, 1);
}
| 10cm | trunk/10cm/pintos/src/tests/userprog/write-stdin.c | C | oos | 243 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected (IGNORE_USER_FAULTS => 1, [<<'EOF']);
(bad-jump2) begin
bad-jump2: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/bad-jump2.ck | Perl | oos | 160 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(write-bad-ptr) begin
(write-bad-ptr) open "sample.txt"
(write-bad-ptr) end
write-bad-ptr: exit(0)
EOF
(write-bad-ptr) begin
(write-bad-ptr) open "sample.txt"
write-bad-ptr: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/write-bad-ptr.ck | Perl | oos | 289 |
/* Tries to open a file with the empty string as its name. */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
int handle = open ("");
if (handle != -1)
fail ("open() returned %d instead of -1", handle);
}
| 10cm | trunk/10cm/pintos/src/tests/userprog/open-empty.c | C | oos | 260 |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(read-bad-fd) begin
(read-bad-fd) end
read-bad-fd: exit(0)
EOF
(read-bad-fd) begin
read-bad-fd: exit(-1)
EOF
pass;
| 10cm | trunk/10cm/pintos/src/tests/userprog/read-bad-fd.ck | Perl | oos | 211 |
/* Waits for an invalid pid. This may fail or terminate the
process with -1 exit code. */
#include <syscall.h>
#include "tests/main.h"
void
test_main (void)
{
wait ((pid_t) 0x0c020301);
}
| 10cm | trunk/10cm/pintos/src/tests/userprog/wait-bad-pid.c | C | oos | 197 |
/* Open a file. */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
int handle = open ("sample.txt");
if (handle < 2)
fail ("open() returned %d", handle);
}
| 10cm | trunk/10cm/pintos/src/tests/userprog/open-normal.c | C | oos | 211 |
/* Executes itself recursively to the depth indicated by the
first command-line argument. */
#include <debug.h>
#include <stdlib.h>
#include <stdio.h>
#include <syscall.h>
#include "tests/lib.h"
const char *test_name = "multi-recurse";
int
main (int argc UNUSED, char *argv[])
{
int n = atoi (argv[1]);
msg (... | 10cm | trunk/10cm/pintos/src/tests/userprog/multi-recurse.c | C | oos | 749 |
char sample[] = {
"\"Amazing Electronic Fact: If you scuffed your feet long enough without\n"
" touching anything, you would build up so many electrons that your\n"
" finger would explode! But this is nothing to worry about unless you\n"
" have carpeting.\" --Dave Barry\n"
};
| 10cm | trunk/10cm/pintos/src/tests/userprog/sample.inc | PHP | oos | 287 |