X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/72a105702165975d1702e64af7d28b60eb311672..b60e90a0d13919269803386169e3da3aa8697f79:/tools/tesh2/examples/catch-signal.tesh?ds=sidebyside diff --git a/tools/tesh2/examples/catch-signal.tesh b/tools/tesh2/examples/catch-signal.tesh index 874155d56f..c2e425d8bc 100644 --- a/tools/tesh2/examples/catch-signal.tesh +++ b/tools/tesh2/examples/catch-signal.tesh @@ -1,23 +1,29 @@ -#! ./tesh -# This suite builds and uses a program raising a segfault, ie a program dying -# of SIGSEV. tesh must detect this condition and report the issue. - -$ rm -rf temp_testdir -$ mkdir temp_testdir - -$ cd temp_testdir -< #include -< int main(void) { -< char *A=NULL; -< *A = 1; -< } -$ Cat > segfault.c - -$ gcc -o segfault segfault.c - -! expect return $EUNXPSIG -< $ ./segfault -$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" - -$ cd .. -$ rm -rf temp_testdir +#! ./tesh +# This suite builds and uses a program raising a segfault, ie a program dying +# of SIGSEV. tesh must detect this condition and report the issue. + +$ rm -rf temp_testdir +$ mkdir temp_testdir + +$ cd temp_testdir +< #include +< int main(void) { +< char *A=NULL; +< *A = 1; +< } +$ cat > segfault.c + +$ gcc -o segfault segfault.c + +! expect return $EUNXPSIG +< $ ./segfault +$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" +> Test unit from stdin +> [stdin:1] ./segfault +> [stdin:1] `./segfault' : NOK (unexpected signal `SIGSEGV' caught) +> Output of so far: +> || +> Test unit `stdin': NOK ( unexpected signal caught) + +$ cd .. +$ rm -rf temp_testdir