From: David Smith Date: Tue, 6 Jul 2010 18:53:14 +0000 (-0500) Subject: Make sure the syscall test script cleans up all temporary directories. X-Git-Tag: release-1.3~94 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=84c9dbe3a1658e4db54c4afc2d11406246331fdd;p=systemtap.git Make sure the syscall test script cleans up all temporary directories. * testsuite/systemtap.syscall/test.tcl (run_one_test): Make sure temporary directories are cleaned up in error cases. --- diff --git a/testsuite/systemtap.syscall/test.tcl b/testsuite/systemtap.syscall/test.tcl index 3043b838b..f57ddff3a 100755 --- a/testsuite/systemtap.syscall/test.tcl +++ b/testsuite/systemtap.syscall/test.tcl @@ -32,15 +32,18 @@ proc run_one_test {filename flags bits suite} { set testname [file tail [string range $filename 0 end-2]] if {[catch {exec mktemp -d [pwd]/staptestXXXXXX} syscall_dir]} { - puts stderr "Failed to create temporary directory: $syscall_dir" + send_log "$bits-bit $testname $suite : Failed to create temporary directory: $syscall_dir" + untested "$bits-bit $testname $suite" syscall_cleanup + return } set res [target_compile $filename $syscall_dir/$testname executable $flags] if { $res != "" } { - send_log "$bits-bit $testname $suite : no corresponding devel environment found\n" - untested "$bits-bit $testname $suite" - return + send_log "$bits-bit $testname $suite : no corresponding devel environment found\n" + untested "$bits-bit $testname $suite" + syscall_cleanup + return } set sys_prog "[file dirname [file normalize $filename]]/${test_script}"