X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Ftests%2Fuserprog%2Fno-vm%2Fmulti-oom.ck;h=59a0bcd5324c899fc093a7fd24505d615d4ba778;hp=7ed5cc86defbe41c3c2d5658269cd226097a9f7f;hb=2f9044505b2103fb0f165341fcbeb3104289572e;hpb=36beb03eba5009ca7054a9b32b966bf211e839b8 diff --git a/src/tests/userprog/no-vm/multi-oom.ck b/src/tests/userprog/no-vm/multi-oom.ck index 7ed5cc8..59a0bcd 100644 --- a/src/tests/userprog/no-vm/multi-oom.ck +++ b/src/tests/userprog/no-vm/multi-oom.ck @@ -2,42 +2,9 @@ use strict; use warnings; use tests::tests; - -our ($test); -my (@output) = read_text_file ("$test.output"); -common_checks ("run", @output); - -@output = get_core_output ("run", @output); -my ($n) = 0; -while (my ($m) = $output[0] =~ /^\(multi-oom\) begin (\d+)$/) { - fail "Child process $m started out of order.\n" if $m != $n; - $n = $m + 1; - shift @output; -} -fail "Only $n child process(es) started.\n" if $n < 15; - -# There could be a death notice for a process that didn't get -# fully loaded, and/or notices from the loader. -while (@output > 0 - && ($output[0] =~ /^multi-oom: exit\(-1\)$/ - || $output[0] =~ /^load: /)) { - shift @output; -} - -while (--$n >= 0) { - fail "Output ended unexpectedly before process $n finished.\n" - if @output < 2; - - local ($_); - chomp ($_ = shift @output); - fail "Found '$_' expecting 'end' message.\n" if !/^\(multi-oom\) end/; - fail "Child process $n ended out of order.\n" - if !/^\(multi-oom\) end $n$/; - - chomp ($_ = shift @output); - fail "Kernel didn't print proper exit message for process $n.\n" - if !/^multi-oom: exit\($n\)$/; -} -fail "Spurious output at end: '$output[0]'.\n" if @output; - +check_expected (IGNORE_USER_FAULTS => 1, IGNORE_EXIT_CODES => 1, [<<'EOF']); +(multi-oom) begin +(multi-oom) success. program forked 10 times. +(multi-oom) end +EOF pass;