Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[tesh] global pgid: unique value -> list
[simgrid.git] / tools / tesh / catch-signal.tesh
1 #!/usr/bin/env tesh
2 # This suite builds and uses a program raising a segfault, ie a program dying
3 # of SIGSEV. tesh must detect this condition and report the issue.
4
5 ! output ignore
6 $ cmake -E remove_directory temp_testdir-catch-signal
7
8 $ mkdir temp_testdir-catch-signal
9
10 $ cd temp_testdir-catch-signal
11
12 < kill 'SEGV', $$;
13 $ mkfile segfault.pl
14
15 p Check that we notice when SEGV is raised
16 ! expect signal SIGSEGV
17 $ perl segfault.pl
18
19 p Check that we return the expected return value on SEGV
20 ! expect return 11
21 < $ perl segfault.pl
22 $ ${bindir:=.}/tesh
23 > Test suite from stdin
24 > [(stdin):1] perl segfault.pl
25 > Test suite `(stdin)': NOK (<(stdin):1> got signal SIGSEGV)
26
27 $ cd ..
28
29 ! output ignore
30 $ cmake -E remove_directory temp_testdir-catch-signal