Get rid of unnecessary barrier. Improve comment.
[pintos-anon] / grading / userprog / prep-disk
index 182c561460e9005b41054ba42ff3e3f5d501b641..39d078eba540b0e82a950eafe47dfb4b1bc6b161 100755 (executable)
@@ -2,6 +2,7 @@
 
 use strict;
 use Getopt::Long;
+use POSIX;
 
 my ($pintos) = "pintos";
 my ($os_disk) = "../../src/userprog/build/os.dsk";
@@ -40,7 +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));
+                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
+                wait-simple wait-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 'wait-killed';
 
 sub put_file {
     my ($fn) = @_;
@@ -53,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";
 }