X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=grading%2Fuserprog%2Fprep-disk;h=f525b07adc38fbfb6bf21d81d469066a809887f3;hb=9a23b07779a919205f9a355c81b67b629e929575;hp=2a5a9f118db518708ab863e54e09947c85d91cdd;hpb=5f5e3ca7e9d053549bd4c6f55672ae867857ec54;p=pintos-anon diff --git a/grading/userprog/prep-disk b/grading/userprog/prep-disk index 2a5a9f1..f525b07 100755 --- a/grading/userprog/prep-disk +++ b/grading/userprog/prep-disk @@ -2,6 +2,7 @@ use strict; use Getopt::Long; +use POSIX; my ($pintos) = "pintos"; my ($os_disk) = "../../src/userprog/build/os.dsk"; @@ -40,9 +41,15 @@ put_file ("sample.txt") qw (open-normal open-boundary open-twice close-normal close-twice read-normal read-bad-ptr read-boundary read-zero - write-normal write-bad-ptr write-boundary write-zero)); -put_file ("child-simple") if $test eq 'exec-once' or $test eq 'exec-multiple'; + write-normal write-bad-ptr write-boundary write-zero + multi-child-fd)); +put_file ("child-simple") + if grep ($_ eq $test, + qw (exec-once exec-multiple + join-simple join-twice)); put_file ("child-arg") if $test eq 'exec-arg'; +put_file ("child-close") if $test eq 'multi-child-fd'; +put_file ("child-bad") if $test eq 'join-killed'; sub put_file { my ($fn) = @_; @@ -55,5 +62,5 @@ sub put_file { sub xsystem { my ($cmd) = @_; print "$cmd\n"; - system ($cmd) == 0 || die "command failed\n"; + system ($cmd) == 0 or die "command failed\n"; }