X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/86051ed1b66342bae0e21fd6643e66331ac2c07d..207d979f2e7cdd306dd4a90e9df5476e0fb972a8:/tools/tesh/catch-signal.tesh?ds=sidebyside diff --git a/tools/tesh/catch-signal.tesh b/tools/tesh/catch-signal.tesh index 4fc075402e..c9f9fec146 100644 --- a/tools/tesh/catch-signal.tesh +++ b/tools/tesh/catch-signal.tesh @@ -2,25 +2,27 @@ # 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 +$ rm -rf temp_testdir-catch-signal +$ mkdir temp_testdir-catch-signal -$ cd temp_testdir +$ cd temp_testdir-catch-signal < #include < int main(void) { < char *A=NULL; < *A = 1; < } -$ cat > segfault.c +$ mkfile segfault.c $ gcc -o segfault segfault.c ! expect return 15 < $ ./segfault -$ ../tesh -> [0.000000] [tesh/INFO] Test suite from stdin -> [0.000000] [tesh/INFO] [stdin:1] ./segfault -> [0.000000] run_context.c:350: [tesh/ERROR] Child "./segfault" got signal SIGSEGV. +$ ../tesh --log='log.thresh:info tesh.fmt:%m%n' +> Test suite from stdin +> [stdin:1] ./segfault +> Test suite `(stdin)': NOK ( got signal SIGSEGV) +> Output of so far: +> || $ cd .. -$ rm -rf temp_testdir +$ rm -rf temp_testdir-catch-signal