-$ rm -rf temp_testdir
-$ mkdir temp_testdir
-$ cd temp_testdir
+$ rm -rf temp_testdir_background
+$ mkdir temp_testdir_background
+$ cd temp_testdir_background
< #include <unistd.h>
< #include <stdlib.h>
$ sleep 2
$ cd ..
-$ rm -rf temp_testdir
+$ rm -rf temp_testdir_background
# 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-bg-set-signal
+$ mkdir temp_testdir-bg-set-signal
-$ cd temp_testdir
+$ cd temp_testdir-bg-set-signal
< #include <stdlib.h>
< int main(void) {
< char *A=NULL;
& ./segfault
$ sleep 1
$ cd ..
-$ rm -rf temp_testdir
+$ rm -rf temp_testdir-bg-set-signal
# This suite builds and uses a program returning 1.
# tesh must detect this condition and report the issue.
-$ rm -rf temp_testdir
-$ mkdir temp_testdir
+$ rm -rf temp_testdir-catch-return
+$ mkdir temp_testdir-catch-return
-$ cd temp_testdir
+$ cd temp_testdir-catch-return
< #include <stdlib.h>
< int main(void) {
< exit(1);
> ||
$ cd ..
-$ rm -rf temp_testdir
+$ rm -rf temp_testdir-catch-return
# 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 <stdlib.h>
< int main(void) {
< char *A=NULL;
> ||
$ cd ..
-$ rm -rf temp_testdir
+$ rm -rf temp_testdir-catch-signal
# This example uses the cd command
-$ rm -rf testdir_temp
-$ mkdir testdir_temp
-$ cd testdir_temp
+$ rm -rf testdir_temp-cd
+$ mkdir testdir_temp-cd
+$ cd testdir_temp-cd
-# Check that there is nothing in the current dir (which must be testdir_temp)
+# Check that there is nothing in the current dir (which must be testdir_temp-cd)
$ ls
# Check that tesh detects properly cd to non-existing directories
> Test suite `(stdin)': NOK (system error)
$ ../tesh --log='log.thresh:info tesh.fmt:%m%n'
-# The next command checks that there is a testdir_temp in the upper directory,
+# The next command checks that there is a testdir_temp-cd in the upper directory,
# ie that mkdir and cd both worked.
-$ test -e ../testdir_temp
+$ test -e ../testdir_temp-cd
$ cd ..
-$ rmdir testdir_temp
+$ rmdir testdir_temp-cd
# This suite builds and uses a program returning 1.
# tesh is instructed of this return code and must not whine.
-$ rm -rf temp_testdir
-$ mkdir temp_testdir
+$ rm -rf temp_testdir-set-return
+$ mkdir temp_testdir-set-return
-$ cd temp_testdir
+$ cd temp_testdir-set-return
< #include <stdlib.h>
< int main(void) {
< exit(1);
! expect return 1
$ ./return1
$ cd ..
-$ rm -rf temp_testdir
+$ rm -rf temp_testdir-set-return
# 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-set-signal
+$ mkdir temp_testdir-set-signal
-$ cd temp_testdir
+$ cd temp_testdir-set-signal
< #include <stdlib.h>
< int main(void) {
< char *A=NULL;
! expect signal SIGSEGV
$ ./segfault
$ cd ..
-$ rm -rf temp_testdir
+$ rm -rf temp_testdir-set-signal
# This suite builds and uses a program returning 1.
# tesh is instructed of this return code and must not whine.
-$ rm -rf temp_testdir
-$ mkdir temp_testdir
+$ rm -rf temp_testdir-setenv
+$ mkdir temp_testdir-setenv
-$ cd temp_testdir
+$ cd temp_testdir-setenv
< #include <string.h>
< #include <stdio.h>
> tesh_test_toto=blah
$ cd ..
-$ rm -rf temp_testdir
+$ rm -rf temp_testdir-setenv