summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/systemtap.base/uprobes_exe.c8
-rw-r--r--testsuite/systemtap.base/uprobes_lib.c3
-rw-r--r--testsuite/systemtap.base/uprobes_lib.exp13
-rw-r--r--testsuite/systemtap.base/uprobes_lib.stp10
4 files changed, 23 insertions, 11 deletions
diff --git a/testsuite/systemtap.base/uprobes_exe.c b/testsuite/systemtap.base/uprobes_exe.c
index 447434c6..b4811335 100644
--- a/testsuite/systemtap.base/uprobes_exe.c
+++ b/testsuite/systemtap.base/uprobes_exe.c
@@ -15,13 +15,15 @@ int lib_main (void);
void
main_func (int foo)
{
- ; // nothing here...
+ if (foo > 1)
+ main_func (foo - 1);
+ else
+ lib_main();
}
int
main (int argc, char *argv[], char *envp[])
{
- main_func(1);
- lib_main();
+ main_func (3);
return 0;
}
diff --git a/testsuite/systemtap.base/uprobes_lib.c b/testsuite/systemtap.base/uprobes_lib.c
index c9d70625..25297b6b 100644
--- a/testsuite/systemtap.base/uprobes_lib.c
+++ b/testsuite/systemtap.base/uprobes_lib.c
@@ -10,7 +10,8 @@
void
lib_func (int bar)
{
- ; // nothing here...
+ if (bar > 1)
+ lib_func (bar - 1);
}
void
diff --git a/testsuite/systemtap.base/uprobes_lib.exp b/testsuite/systemtap.base/uprobes_lib.exp
index 63ef957a..313c01b6 100644
--- a/testsuite/systemtap.base/uprobes_lib.exp
+++ b/testsuite/systemtap.base/uprobes_lib.exp
@@ -29,11 +29,14 @@ if { $res != "" } {
pass "$test compile $testsrc"
}
-# XXX main_func needs another/extra test. Disabled for now.
-# Enable (and in uprobes_lib.stp) after PR9940 is fixed.
-# set ::result_string {main_func
-# lib_func}
-set ::result_string {lib_func}
+set ::result_string {main
+main_func
+main_func
+main_func
+lib_main
+lib_func
+lib_func
+lib_func}
# Only run on make installcheck
if {! [installtest_p]} { untested "$test"; return }
diff --git a/testsuite/systemtap.base/uprobes_lib.stp b/testsuite/systemtap.base/uprobes_lib.stp
index bc6cc249..459351a4 100644
--- a/testsuite/systemtap.base/uprobes_lib.stp
+++ b/testsuite/systemtap.base/uprobes_lib.stp
@@ -1,8 +1,14 @@
-/* - Not activated probe... Seems always skipped?
+probe process("uprobes_exe").function("main") {
+ printf("main\n");
+}
+
probe process("uprobes_exe").function("main_func") {
printf("main_func\n");
}
-*/
+
+probe process("libuprobes_lib.so").function("lib_main") {
+ printf("lib_main\n");
+}
probe process("libuprobes_lib.so").function("lib_func") {
printf("lib_func\n");