Added more userprog tests, mostly relating to boundary conditions
[pintos-anon] / src / tests / userprog / Make.tests
1 # -*- makefile -*-
2
3 tests/%.output: FILESYSSOURCE = --filesys-size=2
4 tests/%.output: PUTFILES = $(filter-out kernel.bin loader.bin, $^)
5
6 tests/userprog_TESTS = $(addprefix tests/userprog/,args-none            \
7 args-single args-multiple args-many args-dbl-space sc-bad-sp            \
8 sc-bad-arg sc-boundary sc-boundary-2 sc-boundary-3 halt exit            \
9 create-normal create-empty create-null create-bad-ptr create-long       \
10 create-exists create-bound open-normal open-missing open-boundary       \
11 open-empty open-null open-bad-ptr open-twice close-normal               \
12 close-twice close-stdin close-stdout close-bad-fd read-normal           \
13 read-bad-ptr read-boundary read-zero read-stdout read-bad-fd            \
14 write-normal write-bad-ptr write-boundary write-zero write-stdin        \
15 write-bad-fd exec-once exec-arg exec-bound exec-bound-2                 \
16 exec-bound-3 exec-multiple exec-missing exec-bad-ptr wait-simple        \
17 wait-twice wait-killed wait-bad-pid multi-recurse multi-child-fd        \
18 rox-simple rox-child rox-multichild bad-read bad-write bad-read2        \
19 bad-write2 bad-jump bad-jump2)
20
21 tests/userprog_PROGS = $(tests/userprog_TESTS) $(addprefix \
22 tests/userprog/,child-simple child-args child-bad child-close child-rox)
23
24 tests/userprog/args-none_SRC = tests/userprog/args.c
25 tests/userprog/args-single_SRC = tests/userprog/args.c
26 tests/userprog/args-multiple_SRC = tests/userprog/args.c
27 tests/userprog/args-many_SRC = tests/userprog/args.c
28 tests/userprog/args-dbl-space_SRC = tests/userprog/args.c
29 tests/userprog/sc-bad-sp_SRC = tests/userprog/sc-bad-sp.c tests/main.c
30 tests/userprog/sc-bad-arg_SRC = tests/userprog/sc-bad-arg.c tests/main.c
31 tests/userprog/bad-read_SRC = tests/userprog/bad-read.c tests/main.c
32 tests/userprog/bad-write_SRC = tests/userprog/bad-write.c tests/main.c
33 tests/userprog/bad-jump_SRC = tests/userprog/bad-jump.c tests/main.c
34 tests/userprog/bad-read2_SRC = tests/userprog/bad-read2.c tests/main.c
35 tests/userprog/bad-write2_SRC = tests/userprog/bad-write2.c tests/main.c
36 tests/userprog/bad-jump2_SRC = tests/userprog/bad-jump2.c tests/main.c
37 tests/userprog/sc-boundary_SRC = tests/userprog/sc-boundary.c           \
38 tests/userprog/boundary.c tests/main.c
39 tests/userprog/sc-boundary-2_SRC = tests/userprog/sc-boundary-2.c       \
40 tests/userprog/boundary.c tests/main.c
41 tests/userprog/sc-boundary-3_SRC = tests/userprog/sc-boundary-3.c       \
42 tests/userprog/boundary.c tests/main.c
43 tests/userprog/halt_SRC = tests/userprog/halt.c tests/main.c
44 tests/userprog/exit_SRC = tests/userprog/exit.c tests/main.c
45 tests/userprog/create-normal_SRC = tests/userprog/create-normal.c tests/main.c
46 tests/userprog/create-empty_SRC = tests/userprog/create-empty.c tests/main.c
47 tests/userprog/create-null_SRC = tests/userprog/create-null.c tests/main.c
48 tests/userprog/create-bad-ptr_SRC = tests/userprog/create-bad-ptr.c     \
49 tests/main.c
50 tests/userprog/create-long_SRC = tests/userprog/create-long.c tests/main.c
51 tests/userprog/create-exists_SRC = tests/userprog/create-exists.c tests/main.c
52 tests/userprog/create-bound_SRC = tests/userprog/create-bound.c \
53 tests/userprog/boundary.c tests/main.c
54 tests/userprog/open-normal_SRC = tests/userprog/open-normal.c tests/main.c
55 tests/userprog/open-missing_SRC = tests/userprog/open-missing.c tests/main.c
56 tests/userprog/open-boundary_SRC = tests/userprog/open-boundary.c       \
57 tests/userprog/boundary.c tests/main.c
58 tests/userprog/open-empty_SRC = tests/userprog/open-empty.c tests/main.c
59 tests/userprog/open-null_SRC = tests/userprog/open-null.c tests/main.c
60 tests/userprog/open-bad-ptr_SRC = tests/userprog/open-bad-ptr.c tests/main.c
61 tests/userprog/open-twice_SRC = tests/userprog/open-twice.c tests/main.c
62 tests/userprog/close-normal_SRC = tests/userprog/close-normal.c tests/main.c
63 tests/userprog/close-twice_SRC = tests/userprog/close-twice.c tests/main.c
64 tests/userprog/close-stdin_SRC = tests/userprog/close-stdin.c tests/main.c
65 tests/userprog/close-stdout_SRC = tests/userprog/close-stdout.c tests/main.c
66 tests/userprog/close-bad-fd_SRC = tests/userprog/close-bad-fd.c tests/main.c
67 tests/userprog/read-normal_SRC = tests/userprog/read-normal.c tests/main.c
68 tests/userprog/read-bad-ptr_SRC = tests/userprog/read-bad-ptr.c tests/main.c
69 tests/userprog/read-boundary_SRC = tests/userprog/read-boundary.c       \
70 tests/userprog/boundary.c tests/main.c
71 tests/userprog/read-zero_SRC = tests/userprog/read-zero.c tests/main.c
72 tests/userprog/read-stdout_SRC = tests/userprog/read-stdout.c tests/main.c
73 tests/userprog/read-bad-fd_SRC = tests/userprog/read-bad-fd.c tests/main.c
74 tests/userprog/write-normal_SRC = tests/userprog/write-normal.c tests/main.c
75 tests/userprog/write-bad-ptr_SRC = tests/userprog/write-bad-ptr.c tests/main.c
76 tests/userprog/write-boundary_SRC = tests/userprog/write-boundary.c     \
77 tests/userprog/boundary.c tests/main.c
78 tests/userprog/write-zero_SRC = tests/userprog/write-zero.c tests/main.c
79 tests/userprog/write-stdin_SRC = tests/userprog/write-stdin.c tests/main.c
80 tests/userprog/write-bad-fd_SRC = tests/userprog/write-bad-fd.c tests/main.c
81 tests/userprog/exec-once_SRC = tests/userprog/exec-once.c tests/main.c
82 tests/userprog/exec-arg_SRC = tests/userprog/exec-arg.c tests/main.c
83 tests/userprog/exec-bound_SRC = tests/userprog/exec-bound.c       \
84 tests/userprog/boundary.c  tests/main.c
85 tests/userprog/exec-bound-2_SRC = tests/userprog/exec-bound-2.c         \
86 tests/userprog/boundary.c  tests/main.c
87 tests/userprog/exec-bound-3_SRC = tests/userprog/exec-bound-3.c         \
88 tests/userprog/boundary.c  tests/main.c
89 tests/userprog/exec-multiple_SRC = tests/userprog/exec-multiple.c tests/main.c
90 tests/userprog/exec-missing_SRC = tests/userprog/exec-missing.c tests/main.c
91 tests/userprog/exec-bad-ptr_SRC = tests/userprog/exec-bad-ptr.c tests/main.c
92 tests/userprog/wait-simple_SRC = tests/userprog/wait-simple.c tests/main.c
93 tests/userprog/wait-twice_SRC = tests/userprog/wait-twice.c tests/main.c
94 tests/userprog/wait-killed_SRC = tests/userprog/wait-killed.c tests/main.c
95 tests/userprog/wait-bad-pid_SRC = tests/userprog/wait-bad-pid.c tests/main.c
96 tests/userprog/multi-recurse_SRC = tests/userprog/multi-recurse.c
97 tests/userprog/multi-child-fd_SRC = tests/userprog/multi-child-fd.c     \
98 tests/main.c
99 tests/userprog/rox-simple_SRC = tests/userprog/rox-simple.c tests/main.c
100 tests/userprog/rox-child_SRC = tests/userprog/rox-child.c tests/main.c
101 tests/userprog/rox-multichild_SRC = tests/userprog/rox-multichild.c     \
102 tests/main.c
103
104 tests/userprog/child-simple_SRC = tests/userprog/child-simple.c
105 tests/userprog/child-args_SRC = tests/userprog/args.c
106 tests/userprog/child-bad_SRC = tests/userprog/child-bad.c tests/main.c
107 tests/userprog/child-close_SRC = tests/userprog/child-close.c
108 tests/userprog/child-rox_SRC = tests/userprog/child-rox.c
109
110 $(foreach prog,$(tests/userprog_PROGS),$(eval $(prog)_SRC += tests/lib.c))
111
112 tests/userprog/args-single_ARGS = onearg
113 tests/userprog/args-multiple_ARGS = some arguments for you!
114 tests/userprog/args-many_ARGS = a b c d e f g h i j k l m n o p q r s t u v
115 tests/userprog/args-dbl-space_ARGS = two  spaces!
116 tests/userprog/multi-recurse_ARGS = 15
117
118 tests/userprog/open-normal_PUTFILES += tests/userprog/sample.txt
119 tests/userprog/open-boundary_PUTFILES += tests/userprog/sample.txt
120 tests/userprog/open-twice_PUTFILES += tests/userprog/sample.txt
121 tests/userprog/close-normal_PUTFILES += tests/userprog/sample.txt
122 tests/userprog/close-twice_PUTFILES += tests/userprog/sample.txt
123 tests/userprog/read-normal_PUTFILES += tests/userprog/sample.txt
124 tests/userprog/read-bad-ptr_PUTFILES += tests/userprog/sample.txt
125 tests/userprog/read-boundary_PUTFILES += tests/userprog/sample.txt
126 tests/userprog/read-zero_PUTFILES += tests/userprog/sample.txt
127 tests/userprog/write-normal_PUTFILES += tests/userprog/sample.txt
128 tests/userprog/write-bad-ptr_PUTFILES += tests/userprog/sample.txt
129 tests/userprog/write-boundary_PUTFILES += tests/userprog/sample.txt
130 tests/userprog/write-zero_PUTFILES += tests/userprog/sample.txt
131 tests/userprog/multi-child-fd_PUTFILES += tests/userprog/sample.txt
132
133 tests/userprog/exec-once_PUTFILES += tests/userprog/child-simple
134 tests/userprog/exec-multiple_PUTFILES += tests/userprog/child-simple
135 tests/userprog/wait-simple_PUTFILES += tests/userprog/child-simple
136 tests/userprog/wait-twice_PUTFILES += tests/userprog/child-simple
137
138 tests/userprog/exec-arg_PUTFILES += tests/userprog/child-args
139 tests/userprog/exec-bound_PUTFILES += tests/userprog/child-args
140 tests/userprog/multi-child-fd_PUTFILES += tests/userprog/child-close
141 tests/userprog/wait-killed_PUTFILES += tests/userprog/child-bad
142 tests/userprog/rox-child_PUTFILES += tests/userprog/child-rox
143 tests/userprog/rox-multichild_PUTFILES += tests/userprog/child-rox