mirror of
git://sourceware.org/git/glibc.git
synced 2025-02-23 13:09:58 +08:00
posix: Add cleanup on the trap list for globtest.sh
This patch prevents lingering files for SIGSEGV failures by adding a cleanup handler on trap handler. Checked on x86_64-linux-gnu. * posix/globtest.sh: Add cleanup routine on trap 0.
This commit is contained in:
parent
b6a6622209
commit
4fee33f8c1
@ -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>
|
2017-04-11 Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
|
||||||
|
|
||||||
* sysdeps/powerpc/powerpc64/multiarch/memcmp-power4.S: Define the
|
* sysdeps/powerpc/powerpc64/multiarch/memcmp-power4.S: Define the
|
||||||
|
@ -47,7 +47,12 @@ testout=${common_objpfx}posix/globtest-out
|
|||||||
rm -rf $testdir $testout
|
rm -rf $testdir $testout
|
||||||
mkdir $testdir
|
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 1 > $testdir/file1
|
||||||
echo 2 > $testdir/file2
|
echo 2 > $testdir/file2
|
||||||
@ -811,8 +816,6 @@ if test $failed -ne 0; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test $result -eq 0; then
|
if test $result -eq 0; then
|
||||||
chmod 777 $testdir/noread
|
|
||||||
rm -fr $testdir $testout
|
|
||||||
echo "All OK." > $logfile
|
echo "All OK." > $logfile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user