diff options
| author | Felipe Boeira <felipe.boeira@liu.se> | 2019-01-08 18:39:03 +0100 |
|---|---|---|
| committer | Felipe Boeira <felipe.boeira@liu.se> | 2019-01-08 18:39:03 +0100 |
| commit | d4522b8e9854178473adcea0fbb84f23f6e744bd (patch) | |
| tree | fbcf620617c5023154eba3f965b3a982daa64a47 /src/tests/vm/process_death.pm | |
| download | pintos-d4522b8e9854178473adcea0fbb84f23f6e744bd.tar.gz | |
Initial commit
Diffstat (limited to 'src/tests/vm/process_death.pm')
| -rw-r--r-- | src/tests/vm/process_death.pm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tests/vm/process_death.pm b/src/tests/vm/process_death.pm new file mode 100644 index 0000000..52039a1 --- /dev/null +++ b/src/tests/vm/process_death.pm @@ -0,0 +1,22 @@ +# -*- perl -*- +use strict; +use warnings; +use tests::tests; + +sub check_process_death { + my ($proc_name) = @_; + our ($test); + my (@output) = read_text_file ("$test.output"); + + common_checks ("run", @output); + @output = get_core_output ("run", @output); + fail "First line of output is not `($proc_name) begin' message.\n" + if $output[0] ne "($proc_name) begin"; + fail "Output missing '$proc_name: exit(-1)' message.\n" + if !grep ("$proc_name: exit(-1)" eq $_, @output); + fail "Output contains '($proc_name) end' message.\n" + if grep (/\($proc_name\) end/, @output); + pass; +} + +1; |
