Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
1d47102460f348fb4b854b36dd124f484fc21dcc
[simgrid.git] / tools / tesh / catch-signal.tesh
1 #! ./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 $ rm -rf temp_testdir-catch-signal
6 $ mkdir temp_testdir-catch-signal
7
8 $ cd temp_testdir-catch-signal
9 < kill 'SEGV', $$;
10 $ mkfile segfault.pl
11
12 p Check that we notice when SEGV is raised
13 ! expect signal SIGSEGV
14 $ perl segfault.pl
15
16 p Check that we return the expected return value on SEGV
17 ! expect return 15
18 < $ perl segfault.pl
19 $ perl ${bindir:=.}/tesh
20 > Test suite from stdin
21 > [(stdin):1] perl segfault.pl
22 > Test suite `(stdin)': NOK (<(stdin):1> got signal SIGSEGV)
23 > <(stdin):1> No output so far.
24
25 $ cd ..
26 $ rm -rf temp_testdir-catch-signal