diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | posix/globtest.sh | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index a99770606c..cde07e124d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2017-04-11 Adhemerval Zanella <adhemerval.zanella@linaro.org> + + * posix/globtest.sh: Add cleanup routine on trap 0. + 2017-04-11 Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com> * sysdeps/powerpc/powerpc64/multiarch/memcmp-power4.S: Define the diff --git a/posix/globtest.sh b/posix/globtest.sh index f9cc80b4b5..73f7ae31cc 100755 --- a/posix/globtest.sh +++ b/posix/globtest.sh @@ -47,7 +47,12 @@ testout=${common_objpfx}posix/globtest-out rm -rf $testdir $testout mkdir $testdir -trap 'chmod 777 $testdir/noread; rm -fr $testdir $testout' 1 2 3 15 +cleanup() { + chmod 777 $testdir/noread + rm -fr $testdir $testout +} + +trap cleanup 0 HUP INT QUIT TERM echo 1 > $testdir/file1 echo 2 > $testdir/file2 @@ -811,8 +816,6 @@ if test $failed -ne 0; then fi if test $result -eq 0; then - chmod 777 $testdir/noread - rm -fr $testdir $testout echo "All OK." > $logfile fi |