Logo AND Algorithmique Numérique Distribuée

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