Make comment more readable.
[pintos-anon] / src / tests / tests.pm
index 5e34e866a8a30a5fff9dad2bb2e3b3ba0e05d873..b12066640015c52def36b7e5e76bff11a758acde 100644 (file)
@@ -154,7 +154,7 @@ sub compare_output {
     my $ignore_exit_codes = exists $options{IGNORE_EXIT_CODES};
     if ($ignore_exit_codes) {
        delete $options{IGNORE_EXIT_CODES};
-       @output = grep (!/^[a-zA-Z0-9-_]+: exit\(\d+\)$/, @output);
+       @output = grep (!/^[a-zA-Z0-9-_]+: exit\(\-?\d+\)$/, @output);
     }
     my $ignore_user_faults = exists $options{IGNORE_USER_FAULTS};
     if ($ignore_user_faults) {
@@ -444,6 +444,7 @@ sub print_fs {
        }
        print "\n";
     }
+    print "(empty)\n" if !@_;
 }
 
 # normalize_fs (%FS)
@@ -510,7 +511,7 @@ sub flatten_hierarchy {
 sub read_tar {
     my ($archive) = @_;
     my (%content);
-    open (ARCHIVE, '<', $archive) or fail "$archive: open: $1\n";
+    open (ARCHIVE, '<', $archive) or fail "$archive: open: $!\n";
     for (;;) {
        my ($header);
        if ((my $retval = sysread (ARCHIVE, $header, 512)) != 512) {