7 my ($pintos) = "pintos";
8 my ($os_disk) = "../../src/userprog/build/os.dsk";
12 GetOptions ("os-disk=s" => \$os_disk,
13 "fs-disk=s" => \$fs_disk,
15 "help" => sub { usage (0) })
16 or die "option parsing failed; use --help for help\n";
18 if (!defined ($test)) {
19 die "test name expected; use --help for help\n"
22 } elsif (@ARGV != 0) {
23 die "can't have non-option arg with --test\n";
26 $fs_disk = "$test.dsk" if !defined $fs_disk;
29 print STDERR "$os_disk: stat: $!\n";
30 print STDERR "perhaps you should `make' in ../../src/userprog?\n";
37 xsystem ("$pintos make-disk '$fs_disk' 2");
39 put_file ("sample.txt")
41 qw (open-normal open-boundary open-twice
42 close-normal close-twice
43 read-normal read-bad-ptr read-boundary read-zero
44 write-normal write-bad-ptr write-boundary write-zero
46 put_file ("child-simple")
48 qw (exec-once exec-multiple
49 wait-simple wait-twice));
50 put_file ("child-arg") if $test eq 'exec-arg';
51 put_file ("child-close") if $test eq 'multi-child-fd';
52 put_file ("child-bad") if $test eq 'wait-killed';
56 my ($cmd) = "$pintos -v --os-disk='$os_disk' --fs-disk='$fs_disk' put";
57 $cmd .= " -f", $formatted = 1 if !$formatted;
65 system ($cmd) == 0 or die "command failed\n";