summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2009-02-19 21:57:12 -0500
committerFrank Ch. Eigler <fche@elastic.org>2009-02-19 21:57:12 -0500
commit4c2d0ab0b24baeb500b68cadcf4063eb324c0a27 (patch)
treea51e108c21840d0877122032e7a351c4ec4b767b
parent49e34da0845cf50fdffa955ed6620b8e97b92872 (diff)
downloadsystemtap-steved-4c2d0ab0b24baeb500b68cadcf4063eb324c0a27.tar.gz
systemtap-steved-4c2d0ab0b24baeb500b68cadcf4063eb324c0a27.tar.xz
systemtap-steved-4c2d0ab0b24baeb500b68cadcf4063eb324c0a27.zip
static_uprobes test case cleanup
-rw-r--r--testsuite/ChangeLog5
-rw-r--r--testsuite/systemtap.base/static_uprobes.exp30
2 files changed, 23 insertions, 12 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index 65244185..afb757ae 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-19 Frank Ch. Eigler <fche@elastic.org>
+
+ * systemtap.base/static_uprobes.exp: Standardized pass/fail message
+ strings. Removed "objcopy -R .probe" for C++ test case.
+
2009-02-18 Stan Cox <scox@redhat.com>
* systemtap.base/static_uprobes.exp: Also test without .probes section.
diff --git a/testsuite/systemtap.base/static_uprobes.exp b/testsuite/systemtap.base/static_uprobes.exp
index d80bd0c4..11fec9b1 100644
--- a/testsuite/systemtap.base/static_uprobes.exp
+++ b/testsuite/systemtap.base/static_uprobes.exp
@@ -89,9 +89,9 @@ if {[catch {exec $dtrace -h -s $sup_dpath} res]} {
verbose -log "unable to run $dtrace: $res"
}
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
}
@@ -108,11 +108,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 +121,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 +153,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 +175,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. \ No newline at end of file