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
}
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"
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}
-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 {
-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