summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorddomingo <ddomingo@redhat.com>2008-11-28 06:46:44 +1000
committerddomingo <ddomingo@redhat.com>2008-11-28 06:46:44 +1000
commite4f531a369df3fb680fa4c31c7b4127fa889cf34 (patch)
tree95214dc666fecb0522448a2a6a5329cd81742d05 /testsuite
parentad970c8448ceeb844846251d994b5946e68be184 (diff)
parent708ce1f3a663fc765d589a7547c906d05791e5e1 (diff)
downloadsystemtap-steved-e4f531a369df3fb680fa4c31c7b4127fa889cf34.tar.gz
systemtap-steved-e4f531a369df3fb680fa4c31c7b4127fa889cf34.tar.xz
systemtap-steved-e4f531a369df3fb680fa4c31c7b4127fa889cf34.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
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
-rw-r--r--testsuite/systemtap.syscall/ChangeLog5
-rw-r--r--testsuite/systemtap.syscall/forkwait.c2
5 files changed, 54 insertions, 12 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)
}
diff --git a/testsuite/systemtap.syscall/ChangeLog b/testsuite/systemtap.syscall/ChangeLog
index 7cb97dff..e3a1f8de 100644
--- a/testsuite/systemtap.syscall/ChangeLog
+++ b/testsuite/systemtap.syscall/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-27 Mark Wielaard <mjw@redhat.com>
+
+ * forkwait.c: clone (CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD)
+ is just fork ().
+
2008-10-04 Mark Wielaard <mjw@redhat.com>
* access.c: sys_access() calls through to sys_faccessat().
diff --git a/testsuite/systemtap.syscall/forkwait.c b/testsuite/systemtap.syscall/forkwait.c
index ffc98708..bf7516f6 100644
--- a/testsuite/systemtap.syscall/forkwait.c
+++ b/testsuite/systemtap.syscall/forkwait.c
@@ -12,7 +12,7 @@ int main ()
int status;
child = fork();
- // clone (CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD) = NNNN
+ // fork () = NNNN
if (!child) {
int i = 0xfffff;
while (i > 0) i--;