diff options
| author | manuel <manuel@mausz.at> | 2012-03-26 12:54:45 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2012-03-26 12:54:45 +0200 |
| commit | b5f0874cd96ee2a62aabc645b9626c2749cb6a01 (patch) | |
| tree | 1262e4bbe0634de6650be130c36e0538240f4cbf /pintos-progos/tests/vm/process_death.pm | |
| download | progos-b5f0874cd96ee2a62aabc645b9626c2749cb6a01.tar.gz progos-b5f0874cd96ee2a62aabc645b9626c2749cb6a01.tar.bz2 progos-b5f0874cd96ee2a62aabc645b9626c2749cb6a01.zip | |
initial pintos checkin
Diffstat (limited to 'pintos-progos/tests/vm/process_death.pm')
| -rw-r--r-- | pintos-progos/tests/vm/process_death.pm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pintos-progos/tests/vm/process_death.pm b/pintos-progos/tests/vm/process_death.pm new file mode 100644 index 0000000..52039a1 --- /dev/null +++ b/pintos-progos/tests/vm/process_death.pm | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # -*- perl -*- | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | use tests::tests; | ||
| 5 | |||
| 6 | sub check_process_death { | ||
| 7 | my ($proc_name) = @_; | ||
| 8 | our ($test); | ||
| 9 | my (@output) = read_text_file ("$test.output"); | ||
| 10 | |||
| 11 | common_checks ("run", @output); | ||
| 12 | @output = get_core_output ("run", @output); | ||
| 13 | fail "First line of output is not `($proc_name) begin' message.\n" | ||
| 14 | if $output[0] ne "($proc_name) begin"; | ||
| 15 | fail "Output missing '$proc_name: exit(-1)' message.\n" | ||
| 16 | if !grep ("$proc_name: exit(-1)" eq $_, @output); | ||
| 17 | fail "Output contains '($proc_name) end' message.\n" | ||
| 18 | if grep (/\($proc_name\) end/, @output); | ||
| 19 | pass; | ||
| 20 | } | ||
| 21 | |||
| 22 | 1; | ||
