summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/static_uprobes.exp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.base/static_uprobes.exp')
-rw-r--r--testsuite/systemtap.base/static_uprobes.exp33
1 files changed, 19 insertions, 14 deletions
diff --git a/testsuite/systemtap.base/static_uprobes.exp b/testsuite/systemtap.base/static_uprobes.exp
index d80bd0c4..c76d4805 100644
--- a/testsuite/systemtap.base/static_uprobes.exp
+++ b/testsuite/systemtap.base/static_uprobes.exp
@@ -88,16 +88,15 @@ if {[installtest_p]} {
if {[catch {exec $dtrace -h -s $sup_dpath} res]} {
verbose -log "unable to run $dtrace: $res"
}
+catch {exec rm -f $sup_dpath}
if {[file exists $sup_hpath]} then {
- pass "generating $sup_hpath"
+ pass "$test generating header"
} else {
- fail "generating $sup_hpath"
+ fail "$test generating header"
catch {exec rm -f $sup_srcpath $sup_hpath $sup_stppath}
return
}
-catch {exec rm -f $sup_dpath}
-
if {[installtest_p]} {
set sdtdir $env(SYSTEMTAP_INCLUDES)
} else {
@@ -108,11 +107,11 @@ set sup_flags "additional_flags=-I$sdtdir additional_flags=-g additional_flags=-
set res [target_compile $sup_srcpath $sup_exepath executable $sup_flags]
if { $res != "" } {
verbose "target_compile failed: $res" 2
- fail "compiling $sup_srcpath -g"
+ fail "$test compiling C -g"
catch {exec rm -f $sup_srcpath $sup_hpath $sup_stppath}
return
} else {
- pass "compiling $sup_srcpath -g"
+ pass "$test compiling C -g"
}
spawn mv $sup_srcpath "[pwd]/static_uprobes.cc"
@@ -121,11 +120,11 @@ set sup_flags "$sup_flags c++"
set res [target_compile $sup_srcpath $supcplus_exepath executable $sup_flags]
if { $res != "" } {
verbose "target_compile failed: $res" 2
- fail "compiling $sup_srcpath -g"
+ fail "$test compiling C++ -g"
catch {exec rm -f $sup_srcpath $sup_exepath $sup_hpath $sup_stppath}
return
} else {
- pass "compiling $sup_srcpath -g"
+ pass "$test compiling C++ -g"
}
if {![installtest_p]} {untested $test; return}
@@ -153,17 +152,19 @@ expect {
-re {In test_probe_0 probe 0x3} { incr ok; exp_continue }
-re {In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]} { incr ok; exp_continue }
-re {In test_probe_4 dtrace probe 0x4} { incr ok; exp_continue }
- timeout { fail "$test (timeout)" }
+ timeout { fail "$test C (timeout)" }
eof { }
}
wait
-if {$ok == 4} { pass "$test" } { fail "$test ($ok)" }
+if {$ok == 4} { pass "$test C" } { fail "$test C ($ok)" }
set ok 0
-spawn objcopy -R .probes $supcplus_exepath $sup_exepath
+# spawn objcopy -R .probes $supcplus_exepath $sup_exepath
+verbose -log "cp $supcplus_exepath $sup_exepath"
+spawn cp $supcplus_exepath $sup_exepath
verbose -log "spawn stap -c $sup_exepath $sup_stppath"
spawn stap -c $sup_exepath $sup_stppath
expect {
@@ -173,11 +174,15 @@ expect {
-re {In test_probe_0 probe 0x3} { incr ok; exp_continue }
-re {In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]} { incr ok; exp_continue }
-re {In test_probe_4 dtrace probe 0x4} { incr ok; exp_continue }
- timeout { fail "$test (timeout)" }
+ timeout { fail "$test C++ (timeout)" }
eof { }
}
wait
-if {$ok == 4} { pass "$test" } { fail "$test ($ok)" }
-catch {exec rm -f $sup_srcpath $sup_exepath $supcplus_exepath $sup_hpath $sup_stppath}
+if {$ok == 4} { pass "$test C++" } { fail "$test C++ ($ok)" }
+
+# catch {exec rm -f $sup_srcpath $sup_exepath $supcplus_exepath $sup_hpath $sup_stppath}
+
+# It's not so important to clean up, and it's unhelpful if
+# one needs to diagnose a test failure.