X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=grading%2Fthreads%2Frun-tests;h=534621187ac141ee454913cf0577c612c5a518e6;hp=1e718a93b6b151179b33556aa8ab8144165e154e;hb=2cfc156c39840ce7f1cda6b473de1322691a8a0b;hpb=63bae7d91cfdc5d6f73b52702ecb6dcca515496c diff --git a/grading/threads/run-tests b/grading/threads/run-tests index 1e718a9..5346211 100755 --- a/grading/threads/run-tests +++ b/grading/threads/run-tests @@ -22,9 +22,6 @@ our (%result); our ($action); parse_cmd_line qw (alarm-single alarm-multiple alarm-zero alarm-negative - join-simple - join-quick join-multiple join-nested - join-dummy join-invalid join-no priority-preempt priority-fifo priority-donate-one priority-donate-multiple priority-donate-nest mlfqs-on mlfqs-off); @@ -160,55 +157,6 @@ sub grade_alarm_negative { die "Crashed in timer_sleep()\n" if !grep (/^Success\.$/, @output); } -sub grade_join_invalid { - my (@output) = @_; - verify_common (@output); - grep (/Testing invalid join/, @output) or die "Test didn't start\n"; - grep (/Invalid join test done/, @output) or die "Test didn't complete\n"; -} - -sub grade_join_no { - my (@output) = @_; - verify_common (@output); - grep (/Testing no join/, @output) or die "Test didn't start\n"; - grep (/No join test done/, @output) or die "Test didn't complete\n"; -} - -sub grade_join_multiple { - my (@output) = @_; - - verify_common (@output); - my (@t); - $t[4] = $t[5] = $t[6] = -1; - local ($_); - foreach (@output) { - my ($idx) = /^Thread (\d+)/ or next; - my ($iter) = /iteration (\d+)$/; - $iter = 5 if /done!$/; - die "Malformed output\n" if !defined $iter; - if ($idx == 6) { - die "Thread 6 started before either other thread finished\n" - if $t[4] < 5 && $t[5] < 5; - die "Thread 6 started before thread 4 finished\n" - if $t[4] < 5; - die "Thread 6 started before thread 5 finished\n" - if $t[5] < 5; - } - die "Thread $idx out of order output\n" if $t[$idx] != $iter - 1; - $t[$idx] = $iter; - } - - my ($err) = ""; - for my $idx (4, 5, 6) { - if ($t[$idx] == -1) { - $err .= "Thread $idx did not run at all\n"; - } elsif ($t[$idx] != 5) { - $err .= "Thread $idx only completed $t[$idx] iterations\n"; - } - } - die $err if $err ne ''; -} - sub grade_priority_fifo { my (@output) = @_;