diff options
author | David Smith <dsmith@redhat.com> | 2009-02-18 14:34:46 -0600 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2009-02-18 14:34:46 -0600 |
commit | fed285ce2dbd2f5fc38a80771216247ca4e26227 (patch) | |
tree | 8c2434b751611ba350d73c1efecaed84f4f5b999 | |
parent | 2aa2ccb83142c3bf98ac8ee1558a0ee72dff3a1f (diff) | |
download | systemtap-steved-fed285ce2dbd2f5fc38a80771216247ca4e26227.tar.gz systemtap-steved-fed285ce2dbd2f5fc38a80771216247ca4e26227.tar.xz systemtap-steved-fed285ce2dbd2f5fc38a80771216247ca4e26227.zip |
Better testcase cleanup.
2009-02-18 David Smith <dsmith@redhat.com>
* systemtap.base/labels.exp: Better cleanup.
-rw-r--r-- | testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | testsuite/systemtap.base/labels.exp | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 1c3693c0..e9e40a1f 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-02-18 David Smith <dsmith@redhat.com> + + * systemtap.base/labels.exp: Better cleanup. + 2009-02-17 Frank Ch. Eigler <fche@elastic.org> * systemtap.base/static_uprobes.exp: Handle $srcdir != $builddir. diff --git a/testsuite/systemtap.base/labels.exp b/testsuite/systemtap.base/labels.exp index 6c62d576..9c92d69c 100644 --- a/testsuite/systemtap.base/labels.exp +++ b/testsuite/systemtap.base/labels.exp @@ -34,7 +34,8 @@ ptr_inited: " close $fp -set fp [open "[pwd]/labels.stp" "w"] +set label_stppath "[pwd]/labels.stp" +set fp [open $label_stppath "w"] puts $fp " probe process(\"labels.x\").function(\"main*@labels.c\").label(\"init_*\") {printf (\"VARS %s\\n\",\$\$vars)} probe process(\"labels.x\").function(\"main*@labels.c\").label(\"ptr_inited\") {printf (\"VARS %s\\n\",\$\$vars)} @@ -47,13 +48,14 @@ set res [target_compile $label_srcpath $label_exepath executable $label_flags] if { $res != "" } { verbose "target_compile failed: $res" 2 fail "compiling labels.c -g" + catch {exec rm -f $label_srcpath $label_stppath} return } else { pass "compiling labels.c -g" } -verbose -log "spawn stap -c $label_exepath [pwd]/labels.stp" -spawn stap -c $label_exepath [pwd]/labels.stp +verbose -log "spawn stap -c $label_exepath $label_stppath" +spawn stap -c $label_exepath $label_stppath expect { -timeout 180 @@ -65,3 +67,4 @@ expect { wait if {$ok == 1} { pass "$test" } { fail "$test ($ok)" } +catch {exec rm -f $label_srcpath $label_stppath $label_exepath} |