Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
8229a7a377d26abf9ed79e230fe0acbd85fc5e00
[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 $ ../tesh --enable-coverage
20 > Enable coverage
21 > Test suite from stdin
22 > [(stdin):1] perl segfault.pl
23 > Test suite `(stdin)': NOK (<(stdin):1> got signal SIGSEGV)
24 > <(stdin):1> No output so far.
25
26 $ cd ..
27 $ rm -rf temp_testdir-catch-signal