summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/ChangeLog5
-rw-r--r--testsuite/systemtap.base/static_uprobes.exp39
-rw-r--r--testsuite/systemtap.base/static_uprobes.stp15
3 files changed, 48 insertions, 11 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index 24f0cbdd..df7a24f9 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-26 Stan Cox <scox@redhat.com>
+
+ * systemtap.base/static_uprobes.exp: Check debuginfo static uprobes.
+ * systemtap.base/static_uprobes.stp: Check debuginfo static uprobes.
+
2008-11-21 Frank Ch. Eigler <fche@elastic.org>
PR5689.
diff --git a/testsuite/systemtap.base/static_uprobes.exp b/testsuite/systemtap.base/static_uprobes.exp
index 75e8fd21..2e1c41e1 100644
--- a/testsuite/systemtap.base/static_uprobes.exp
+++ b/testsuite/systemtap.base/static_uprobes.exp
@@ -55,7 +55,6 @@ if { $res != "" } {
}
set ok 0
-set env(SYSTEMTAP_SDT) 1
spawn stap -c $sup_exepath $srcdir/$subdir/static_uprobes.stp
expect {
-timeout 180
@@ -65,6 +64,42 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
+
+# Now do a debuginfo style probe of the above test
+
+set fp [open "[pwd]/static_uprobes.sh" "w"]
+puts $fp "
+ed $sup_srcpath <<HERE
+1a
+#define USE_STAP_DEBUGINFO_PROBE 1
+.
+w
+q
+HERE
+"
+close $fp
+spawn sh [pwd]/static_uprobes.sh
+
+set sup_flags "additional_flags=-iquote$env(SYSTEMTAP_RUNTIME) additional_flags=-g additional_flags=$env(SYSTEMTAP_RUNTIME)/sduprobes.c"
+set res [target_compile $sup_srcpath $sup_exepath executable $sup_flags]
+if { $res != "" } {
+ verbose "target_compile failed: $res" 2
+ fail "unable to compile $sup_srcpath"
+ return
+} else {
+ pass "compiling $sup_srcpath"
+}
+
+spawn stap -c $sup_exepath $srcdir/$subdir/static_uprobes.stp
+expect {
+ -timeout 180
+ -re {In label1 probe} { incr ok; exp_continue }
+ -re {In label2 probe 0x2} { incr ok; exp_continue }
+ -re {In label3 probe 0x3 0x[0-9a-f][0-9a-f]} { incr ok; exp_continue }
+ timeout { fail "$test (timeout)" }
+ eof { }
+}
+
wait
-if {$ok == 3} { pass "$test" } { fail "$test (Got $ok Expected 3)" }
+if {$ok == 6} { pass "$test" } { fail "$test (Got $ok Expected 3)" }
diff --git a/testsuite/systemtap.base/static_uprobes.stp b/testsuite/systemtap.base/static_uprobes.stp
index 25e64a37..b9de197e 100644
--- a/testsuite/systemtap.base/static_uprobes.stp
+++ b/testsuite/systemtap.base/static_uprobes.stp
@@ -1,17 +1,14 @@
-probe process("tstlabel.x").mark("label1")
+probe process("static_uprobes.x").mark("label1")
{
- probe_str=user_string($probe)
- printf("In %s probe\n", probe_str)
+ printf("In label1 probe\n")
}
-probe process("tstlabel.x").mark("label2")
+probe process("static_uprobes.x").mark("label2")
{
- probe_str=user_string($probe)
- printf("In %s probe %#x\n", probe_str, $arg1)
+ printf("In label2 probe %#x\n", $arg1)
}
-probe process("tstlabel.x").mark("label3")
+probe process("static_uprobes.x").mark("label3")
{
- probe_str=user_string($probe)
- printf("In %s probe %#x %#x\n", probe_str, $arg1, $arg2)
+ printf("In label3 probe %#x %#x\n", $arg1, $arg2)
}