Fix bogus return value from `pintos' utility when calling Bochs
[pintos-anon] / grading / lib / Pintos / Grading.pm
index 7e5ec67fb008f7fc5ad06353b1f2c9ae574eb98f..860720c0750e3bf5e6a526e431bbb9cad04c56c8 100644 (file)
@@ -345,12 +345,9 @@ sub xsystem {
            print "Child terminated with signal $signal\n";
        }
 
-       my ($exp_status) = !defined ($options{EXPECT}) ? 0 : $options{EXPECT};
-       $result = WIFEXITED ($status) && WEXITSTATUS ($status) == $exp_status
-           ? "ok" : "error";
+       $result = $status == 0 ? "ok" : "error";
     }
 
-
     if ($result eq 'error' && defined $options{DIE}) {
        my ($msg) = $options{DIE};
        if (defined ($log)) {
@@ -402,7 +399,6 @@ sub get_test_result {
 
 sub run_pintos {
     my ($cmd_line, %args) = @_;
-    $args{EXPECT} = 1 unless defined $args{EXPECT};
     my ($retval) = xsystem ($cmd_line, %args);
     return 'ok' if $retval eq 'ok';
     return "Timed out after $args{TIMEOUT} seconds" if $retval eq 'timeout';