6 my ($pintos) = "pintos";
7 my ($os_disk) = "../../src/userprog/build/os.dsk";
11 GetOptions ("os-disk=s" => \$os_disk,
12 "fs-disk=s" => \$fs_disk,
14 "help" => sub { usage (0) })
15 or die "option parsing failed; use --help for help\n";
17 if (!defined ($test)) {
18 die "test name expected; use --help for help\n"
21 } elsif (@ARGV != 0) {
22 die "can't have non-option arg with --test\n";
25 $fs_disk = "$test.dsk" if !defined $fs_disk;
28 print STDERR "$os_disk: stat: $!\n";
29 print STDERR "perhaps you should `make' in ../../src/userprog?\n";
36 xsystem ("$pintos make-disk '$fs_disk' 2");
38 put_file ("sample.txt")
40 qw (open-normal open-boundary open-twice
41 close-normal close-twice
42 read-normal read-bad-ptr read-boundary read-zero
43 write-normal write-bad-ptr write-boundary write-zero));
44 put_file ("child-simple") if $test eq 'exec-once' or $test eq 'exec-multiple';
45 put_file ("child-arg") if $test eq 'exec-arg';
49 my ($cmd) = "$pintos -v --os-disk='$os_disk' --fs-disk='$fs_disk' put";
50 $cmd .= " -f", $formatted = 1 if !$formatted;
58 system ($cmd) == 0 || die "command failed\n";