summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2010-02-02 08:28:16 -0500
committerDave Brolley <brolley@redhat.com>2010-02-02 08:28:16 -0500
commit743757687f9c09bf9ef84b576bc0aa0fc19dea4c (patch)
treebe77bd3f7d03be09774a25f7260182941e99907a /testsuite
parent241443ad36a5a2cacb9e8e6f12f808d304835f2a (diff)
parentcc57beca8d9d168ef42edb1f8b43f594105dfdf2 (diff)
downloadsystemtap-steved-743757687f9c09bf9ef84b576bc0aa0fc19dea4c.tar.gz
systemtap-steved-743757687f9c09bf9ef84b576bc0aa0fc19dea4c.tar.xz
systemtap-steved-743757687f9c09bf9ef84b576bc0aa0fc19dea4c.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/buildok/hwbkpt.stp14
-rw-r--r--testsuite/lib/systemtap.exp2
-rw-r--r--testsuite/systemtap.base/array_string.exp45
-rw-r--r--testsuite/systemtap.base/global_end.exp3
-rw-r--r--testsuite/systemtap.base/global_end.stp4
-rw-r--r--testsuite/systemtap.base/overflow-get_argv.exp5
-rw-r--r--testsuite/systemtap.base/overflow-get_argv.stp62
-rw-r--r--testsuite/systemtap.base/procfs_write.exp135
-rw-r--r--testsuite/systemtap.examples/index.html3
-rw-r--r--testsuite/systemtap.examples/index.txt9
-rw-r--r--testsuite/systemtap.examples/keyword-index.html3
-rw-r--r--testsuite/systemtap.examples/keyword-index.txt9
-rw-r--r--testsuite/systemtap.examples/profiling/fntimes.meta6
-rwxr-xr-xtestsuite/systemtap.examples/profiling/fntimes.stp30
-rw-r--r--testsuite/systemtap.exelib/lib.stp4
-rw-r--r--testsuite/systemtap.exelib/lib.tcl12
-rw-r--r--testsuite/systemtap.exelib/libmarkunamestack.stp4
-rw-r--r--testsuite/systemtap.exelib/libmarkunamestack.tcl4
18 files changed, 339 insertions, 15 deletions
diff --git a/testsuite/buildok/hwbkpt.stp b/testsuite/buildok/hwbkpt.stp
new file mode 100755
index 00000000..ac1a6f9c
--- /dev/null
+++ b/testsuite/buildok/hwbkpt.stp
@@ -0,0 +1,14 @@
+#! stap -wp4
+
+probe
+%(CONFIG_PERF_EVENTS=="y" && CONFIG_HAVE_HW_BREAKPOINT=="y" %?
+ kernel.data("pid_max").write
+%:
+ never
+%) {}
+probe
+%(CONFIG_PERF_EVENTS=="y" && CONFIG_HAVE_HW_BREAKPOINT=="y" %?
+ kernel.data("pid_max").rw
+%:
+ never
+%) {}
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp
index e0e01bcc..03170081 100644
--- a/testsuite/lib/systemtap.exp
+++ b/testsuite/lib/systemtap.exp
@@ -153,7 +153,7 @@ proc setup_server {} {
exec chmod 666 $logfile
# Try to find or start the server.
- set server_pid [exec stap-start-server --log=$logfile]
+ set server_pid [exec env STAP_PR11197_OVERRIDE=1 stap-start-server --log=$logfile]
if { "$server_pid" == "" } then {
print "Cannot start a systemtap server"
set server_pid 0
diff --git a/testsuite/systemtap.base/array_string.exp b/testsuite/systemtap.base/array_string.exp
new file mode 100644
index 00000000..92df1149
--- /dev/null
+++ b/testsuite/systemtap.base/array_string.exp
@@ -0,0 +1,45 @@
+# PR 11220. Make sure we can store large strings in arrays.
+
+if {![installtest_p]} { untested $test; return }
+
+set test "ARRAY_STRING"
+
+set test_script {
+ global str
+ global str_array[1]
+
+ probe begin {
+ str = " 0:123456789+123456789+123456789+123456789+123456789+123456789 1:123456789+123456789+123456789+123456789+123456789+123456789 2:123456789+123456789+123456789+123456789+123456789+123456789 3:123456789+123456789+123456789+123456789+123456789+123456789 4:123456789+123456789+123456789+123456789+123456789+123456789 5:123456789+123456789+123456789+123456789+123456789+123456789 6:123456789+123456789+123456789+123456789+123456789+123456789 7:123456789+123456789+123456789+123456789+123456789+123456789"
+ str_array[0] = str
+ printf("systemtap starting probe\n")
+ }
+
+ probe end {
+ printf("systemtap ending probe\n")
+ if (strlen(str) < 500) {
+ printf("string str is too short: %d\n", strlen(str))
+ printf("%s\n", str)
+ }
+ if (strlen(str) == strlen(str_array[0])) {
+ printf("string lengths match\n")
+ }
+ else {
+ printf("string lengths *don't* match\n")
+ printf("str: %d\n", strlen(str))
+ printf("str_array[0]: %d\n", strlen(str_array[0]))
+ }
+ if (str_array[0] == str) {
+ printf("strings match\n")
+ }
+ else {
+ printf("strings *don't* match!\n")
+ printf("str: %s\n", str)
+ printf("str_array[0]: %s\n", str_array[0])
+ }
+ }
+}
+
+set output "string lengths match\r\nstrings match\r\n"
+
+# Set MAXSTRINGLEN to 512 to be sure we're testing what we intend.
+stap_run $test no_load $output -DMAXSTRINGLEN=512 -e $test_script
diff --git a/testsuite/systemtap.base/global_end.exp b/testsuite/systemtap.base/global_end.exp
index d245212f..9d9c8d9b 100644
--- a/testsuite/systemtap.base/global_end.exp
+++ b/testsuite/systemtap.base/global_end.exp
@@ -19,6 +19,7 @@ expect {
-re {epsilon."one",1. @count=0x4 @min=0x1 @max=0x4 @sum=0xa @avg=0x2} { incr ok; exp_continue }
-re {epsilon."two",2. @count=0x4 @min=0xa @max=0x28 @sum=0x64 @avg=0x19} { incr ok; exp_continue }
-re {phi @count=0x4 @min=0x1 @max=0x4 @sum=0xa @avg=0x2} { incr ok; exp_continue }
+ -re {var=0x1} { incr ok; exp_continue }
timeout { fail "$test (timeout)" }
eof { }
}
@@ -32,4 +33,4 @@ expect {
-re {Avg time = [1-9]} { incr ok; exp_continue }
}
-if {$ok == 12} { pass "$test ($ok)" } { fail "$test ($ok)" }
+if {$ok == 13} { pass "$test ($ok)" } { fail "$test ($ok)" }
diff --git a/testsuite/systemtap.base/global_end.stp b/testsuite/systemtap.base/global_end.stp
index 4a5baff7..1f707d54 100644
--- a/testsuite/systemtap.base/global_end.stp
+++ b/testsuite/systemtap.base/global_end.stp
@@ -1,4 +1,4 @@
-global alpha, beta, gamma, iota, epsilon, phi
+global alpha, beta, gamma, iota, epsilon, phi, var
probe begin {
gamma = "abcdefghijklmnopqrstuvwxyz"
@@ -29,6 +29,8 @@ probe begin {
epsilon["two",2] <<< 20
epsilon["two",2] <<< 30
epsilon["two",2] <<< 40
+
+ var++
}
probe timer.ms(100) {
diff --git a/testsuite/systemtap.base/overflow-get_argv.exp b/testsuite/systemtap.base/overflow-get_argv.exp
new file mode 100644
index 00000000..ac7fddc5
--- /dev/null
+++ b/testsuite/systemtap.base/overflow-get_argv.exp
@@ -0,0 +1,5 @@
+# PR11234: __get_argv can overflow its return buffer
+
+set test "overflow-get_argv"
+
+stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string -g -c "/bin/true /usr/bin/*"
diff --git a/testsuite/systemtap.base/overflow-get_argv.stp b/testsuite/systemtap.base/overflow-get_argv.stp
new file mode 100644
index 00000000..159ef4a8
--- /dev/null
+++ b/testsuite/systemtap.base/overflow-get_argv.stp
@@ -0,0 +1,62 @@
+// PR11234: __get_argv can overflow its return buffer
+
+// __get_argv has a signature like this:
+// struct function___get_argv_locals {
+// int64_t a;
+// int64_t first;
+// string_t __retvalue;
+// } function___get_argv;
+//
+// These functions are meant to have an overlap such that we can tell if
+// __get_argv overran its __retvalue.
+//
+// int64_t x;
+// int64_t y;
+// string_t z;
+// string_t __retvalue;
+//
+// NB: __retvalue[0] always gets cleared on call, but the rest should be
+// untouched, so we can use it as a sentinal.
+
+function clear:string(x:long, y:long, z:string) %{
+ memset(THIS->__retvalue, 0, MAXSTRINGLEN);
+%}
+
+function check:string(x:long, y:long, z:string) %{
+ int i, bad = 0;
+ for (i=1; i<MAXSTRINGLEN; ++i)
+ if (THIS->__retvalue[i])
+ ++bad;
+
+ if (bad)
+ snprintf(THIS->__retvalue, MAXSTRINGLEN, "%d non-zero bytes", bad);
+ else
+ strlcpy(THIS->__retvalue, "ok", MAXSTRINGLEN);
+%}
+
+global result = "untested"
+
+probe syscall.execve {
+ if (pid() != target())
+ next
+
+ clear(0, 0, "")
+ foo = __get_argv($argv, 0)
+ result = check(0, 0, "")
+
+ // ensure that foo isn't optimized away
+ if (foo == "foo")
+ next
+}
+
+probe begin {
+ println("systemtap starting probe")
+}
+
+probe end {
+ println("systemtap ending probe")
+ if (result == "ok")
+ println("systemtap test success")
+ else
+ println("systemtap test failure: ", result)
+}
diff --git a/testsuite/systemtap.base/procfs_write.exp b/testsuite/systemtap.base/procfs_write.exp
new file mode 100644
index 00000000..5bb35532
--- /dev/null
+++ b/testsuite/systemtap.base/procfs_write.exp
@@ -0,0 +1,135 @@
+# PR 11223. Make sure we can handle large amounts of procfs write data.
+
+set test "PROCFS_WRITE"
+
+if {![installtest_p]} { untested $test; return }
+
+proc proc_write_value { test path value} {
+ if [catch {open $path WRONLY} channel] {
+ fail "$test $channel"
+ } else {
+ puts $channel $value
+ close $channel
+ pass "$test wrote $value"
+ }
+}
+
+# This test string is ~4224 bytes long (66 lines of 64 chars). The
+# procfs kernel system will use a buffer of 4K. Our string of ~4224
+# should take around 9 trips through the write function (4224 chars /
+# 512 bytes per systemtap string = ~9 trips).
+#
+# The kernel reuses the 4K buffer for the 9th trip and doesn't null
+# terminate the string. Instead, it tells consumers how many bytes
+# are present.
+#
+# We want to make sure we can handle > 4K worth of data properly.
+set test_string \
+" 0:12345678901234567890123456789012345678901234567890123456789
+ 1:12345678901234567890123456789012345678901234567890123456789
+ 2:12345678901234567890123456789012345678901234567890123456789
+ 3:12345678901234567890123456789012345678901234567890123456789
+ 4:12345678901234567890123456789012345678901234567890123456789
+ 5:12345678901234567890123456789012345678901234567890123456789
+ 6:12345678901234567890123456789012345678901234567890123456789
+ 7:12345678901234567890123456789012345678901234567890123456789
+ 8:12345678901234567890123456789012345678901234567890123456789
+ 9:12345678901234567890123456789012345678901234567890123456789
+ 10:12345678901234567890123456789012345678901234567890123456789
+ 11:12345678901234567890123456789012345678901234567890123456789
+ 12:12345678901234567890123456789012345678901234567890123456789
+ 13:12345678901234567890123456789012345678901234567890123456789
+ 14:12345678901234567890123456789012345678901234567890123456789
+ 15:12345678901234567890123456789012345678901234567890123456789
+ 16:12345678901234567890123456789012345678901234567890123456789
+ 17:12345678901234567890123456789012345678901234567890123456789
+ 18:12345678901234567890123456789012345678901234567890123456789
+ 19:12345678901234567890123456789012345678901234567890123456789
+ 20:12345678901234567890123456789012345678901234567890123456789
+ 21:12345678901234567890123456789012345678901234567890123456789
+ 22:12345678901234567890123456789012345678901234567890123456789
+ 23:12345678901234567890123456789012345678901234567890123456789
+ 24:12345678901234567890123456789012345678901234567890123456789
+ 25:12345678901234567890123456789012345678901234567890123456789
+ 26:12345678901234567890123456789012345678901234567890123456789
+ 27:12345678901234567890123456789012345678901234567890123456789
+ 28:12345678901234567890123456789012345678901234567890123456789
+ 29:12345678901234567890123456789012345678901234567890123456789
+ 30:12345678901234567890123456789012345678901234567890123456789
+ 31:12345678901234567890123456789012345678901234567890123456789
+ 32:12345678901234567890123456789012345678901234567890123456789
+ 33:12345678901234567890123456789012345678901234567890123456789
+ 34:12345678901234567890123456789012345678901234567890123456789
+ 35:12345678901234567890123456789012345678901234567890123456789
+ 36:12345678901234567890123456789012345678901234567890123456789
+ 37:12345678901234567890123456789012345678901234567890123456789
+ 38:12345678901234567890123456789012345678901234567890123456789
+ 39:12345678901234567890123456789012345678901234567890123456789
+ 40:12345678901234567890123456789012345678901234567890123456789
+ 41:12345678901234567890123456789012345678901234567890123456789
+ 42:12345678901234567890123456789012345678901234567890123456789
+ 43:12345678901234567890123456789012345678901234567890123456789
+ 44:12345678901234567890123456789012345678901234567890123456789
+ 45:12345678901234567890123456789012345678901234567890123456789
+ 46:12345678901234567890123456789012345678901234567890123456789
+ 47:12345678901234567890123456789012345678901234567890123456789
+ 48:12345678901234567890123456789012345678901234567890123456789
+ 49:12345678901234567890123456789012345678901234567890123456789
+ 50:12345678901234567890123456789012345678901234567890123456789
+ 51:12345678901234567890123456789012345678901234567890123456789
+ 52:12345678901234567890123456789012345678901234567890123456789
+ 53:12345678901234567890123456789012345678901234567890123456789
+ 54:12345678901234567890123456789012345678901234567890123456789
+ 55:12345678901234567890123456789012345678901234567890123456789
+ 56:12345678901234567890123456789012345678901234567890123456789
+ 57:12345678901234567890123456789012345678901234567890123456789
+ 58:12345678901234567890123456789012345678901234567890123456789
+ 59:12345678901234567890123456789012345678901234567890123456789
+ 60:12345678901234567890123456789012345678901234567890123456789
+ 61:12345678901234567890123456789012345678901234567890123456789
+ 62:12345678901234567890123456789012345678901234567890123456789
+ 63:12345678901234567890123456789012345678901234567890123456789
+ 64:12345678901234567890123456789012345678901234567890123456789
+ 65:12345678901234567890123456789012345678901234567890123456789
+ 66:12345678901234567890123456789012345678901234567890123456789"
+
+# Now we need the version of the above string that expect will look
+# for. So, we need to convert all '\n' to '\r\n' and add a trailing
+# '\r\n'.
+regsub -all {\n} $test_string {\r\n} test_string2
+set test_string2 "$test_string2\\r\\n"
+
+proc proc_write_test {} {
+ global test test_string
+ set path "/proc/systemtap/$test/command"
+
+ proc_write_value $test $path $test_string
+ return 0;
+}
+
+set systemtap_write_script {
+ global iteration = 0
+ global saved_value[20]
+
+ probe procfs("command").write {
+ saved_value[iteration] = $value
+ iteration++
+ }
+
+ probe begin {
+ printf("systemtap starting probe\n")
+ }
+
+ probe end {
+ printf("systemtap ending probe\n")
+ for (i = 0; i < iteration; i++) {
+ printf("%s", saved_value[i])
+ }
+ }
+}
+
+# We're forcing the MAXSTRINGLEN to be 512 chars to make sure we know
+# what we're testing.
+stap_run $test proc_write_test $test_string2 -DMAXSTRINGLEN=512 \
+ -e $systemtap_write_script -m $test
+exec /bin/rm -f ${test}.ko
diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html
index 5b4ef659..294c6991 100644
--- a/testsuite/systemtap.examples/index.html
+++ b/testsuite/systemtap.examples/index.html
@@ -211,6 +211,9 @@ keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <br>
<li><a href="process/wait4time.stp">process/wait4time.stp</a> - Trace Time Spent in wait4 Syscalls<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#WAIT4">WAIT4</a> <br>
<p>The script watches each wait4 syscall on the system. At the end of each wait4 syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in parentheses, the "wait4:" key, the duration of the wait and the PID that the wait4 was waiting for. If the waited for PID is not specified , it is "-1".</p></li>
+<li><a href="profiling/fntimes.stp">profiling/fntimes.stp</a> - Show functions taking longer than usual<br>
+keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <br>
+<p>The fntimes.stp script monitors the execution time history of a given function family (assumed non-recursive). Each time (beyond a warmup interval) is then compared to the historical maximum. If it exceeds a certain threshold (250%), a message is printed.</p></li>
<li><a href="profiling/functioncallcount.stp">profiling/functioncallcount.stp</a> - Count Times Functions Called<br>
keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#FUNCTIONS">FUNCTIONS</a> <br>
<p>The functioncallcount.stp script takes one argument, a list of functions to probe. The script will run and count the number of times that each of the functions on the list is called. On exit the script will print a sorted list from most frequently to least frequently called function.</p></li>
diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt
index 48494841..ebcd17a3 100644
--- a/testsuite/systemtap.examples/index.txt
+++ b/testsuite/systemtap.examples/index.txt
@@ -526,6 +526,15 @@ keywords: syscall wait4
waiting for. If the waited for PID is not specified , it is "-1".
+profiling/fntimes.stp - Show functions taking longer than usual
+keywords: profiling
+
+ The fntimes.stp script monitors the execution time history of a given
+ function family (assumed non-recursive). Each time (beyond a warmup
+ interval) is then compared to the historical maximum. If it exceeds
+ a certain threshold (250%), a message is printed.
+
+
profiling/functioncallcount.stp - Count Times Functions Called
keywords: profiling functions
diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html
index c33c56ef..39d29031 100644
--- a/testsuite/systemtap.examples/keyword-index.html
+++ b/testsuite/systemtap.examples/keyword-index.html
@@ -333,6 +333,9 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PRO
<li><a href="process/pf2.stp">process/pf2.stp</a> - Profile kernel functions<br>
keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <br>
<p>The pf2.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top ten kernel functions with samples.</p></li>
+<li><a href="profiling/fntimes.stp">profiling/fntimes.stp</a> - Show functions taking longer than usual<br>
+keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <br>
+<p>The fntimes.stp script monitors the execution time history of a given function family (assumed non-recursive). Each time (beyond a warmup interval) is then compared to the historical maximum. If it exceeds a certain threshold (250%), a message is printed.</p></li>
<li><a href="profiling/functioncallcount.stp">profiling/functioncallcount.stp</a> - Count Times Functions Called<br>
keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#FUNCTIONS">FUNCTIONS</a> <br>
<p>The functioncallcount.stp script takes one argument, a list of functions to probe. The script will run and count the number of times that each of the functions on the list is called. On exit the script will print a sorted list from most frequently to least frequently called function.</p></li>
diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt
index 4a9d5ccb..96ad06bd 100644
--- a/testsuite/systemtap.examples/keyword-index.txt
+++ b/testsuite/systemtap.examples/keyword-index.txt
@@ -697,6 +697,15 @@ keywords: profiling
samples.
+profiling/fntimes.stp - Show functions taking longer than usual
+keywords: profiling
+
+ The fntimes.stp script monitors the execution time history of a given
+ function family (assumed non-recursive). Each time (beyond a warmup
+ interval) is then compared to the historical maximum. If it exceeds
+ a certain threshold (250%), a message is printed.
+
+
profiling/functioncallcount.stp - Count Times Functions Called
keywords: profiling functions
diff --git a/testsuite/systemtap.examples/profiling/fntimes.meta b/testsuite/systemtap.examples/profiling/fntimes.meta
new file mode 100644
index 00000000..4b4ff1ed
--- /dev/null
+++ b/testsuite/systemtap.examples/profiling/fntimes.meta
@@ -0,0 +1,6 @@
+title: Show functions taking longer than usual
+name: fntimes.stp
+keywords: profiling
+description: The fntimes.stp script monitors the execution time history of a given function family (assumed non-recursive). Each time (beyond a warmup interval) is then compared to the historical maximum. If it exceeds a certain threshold (250%), a message is printed.
+test_check: stap -p4 fntimes.stp 'kernel.function("sys_*")'
+test_installcheck: stap fntimes.stp 'kernel.function("sys_*")' -c "sleep 7"
diff --git a/testsuite/systemtap.examples/profiling/fntimes.stp b/testsuite/systemtap.examples/profiling/fntimes.stp
new file mode 100755
index 00000000..e9daac77
--- /dev/null
+++ b/testsuite/systemtap.examples/profiling/fntimes.stp
@@ -0,0 +1,30 @@
+#! /usr/bin/stap
+
+# usage: fntimes.stp FUNCTIONPROBE
+# e.g. fntimes.stp 'module("ext4").function("*")'
+
+global mincount = 100 # training: beneath this number of hits, only collect data
+global note_percent = 250 # percent beyond maximum-so-far to generate report for
+function time() { return gettimeofday_us() } # time measurement function
+
+global times, entry
+
+probe $1.call {
+ entry[probefunc(),tid()] = time()
+}
+
+probe $1.return {
+ pf=probefunc()
+ tid=tid()
+ if ([pf,tid] in entry) { # seen function entry?
+ t = time()-entry[pf,tid] # t: elapsed time
+ delete entry[pf,tid]
+ if (@count(times[pf]) >= mincount
+ && t >= @max(times[pf]) * note_percent / 100) { # also consider @avg()
+ printf("function %s well over %s time (%d vs %d)\n",
+ pf, "maximum", t, @max(times[pf]))
+ # also consider: print_backtrace()
+ }
+ times[pf] <<< t # (increments @count, updates @max)
+ }
+}
diff --git a/testsuite/systemtap.exelib/lib.stp b/testsuite/systemtap.exelib/lib.stp
index 0151282e..3fdc6db9 100644
--- a/testsuite/systemtap.exelib/lib.stp
+++ b/testsuite/systemtap.exelib/lib.stp
@@ -6,7 +6,7 @@ probe process(@1).function("main") {
}
probe process(@1).function("main_func") {
- printf("main_func\n");
+ printf("main_func %d\n", $foo);
}
probe process(@2).function("lib_main") {
@@ -14,5 +14,5 @@ probe process(@2).function("lib_main") {
}
probe process(@2).function("lib_func") {
- printf("lib_func\n");
+ printf("lib_func %d\n", $bar);
}
diff --git a/testsuite/systemtap.exelib/lib.tcl b/testsuite/systemtap.exelib/lib.tcl
index c5b7402a..a33290b1 100644
--- a/testsuite/systemtap.exelib/lib.tcl
+++ b/testsuite/systemtap.exelib/lib.tcl
@@ -1,11 +1,11 @@
set ::result_string {main
-main_func
-main_func
-main_func
+main_func 3
+main_func 2
+main_func 1
lib_main
-lib_func
-lib_func
-lib_func}
+lib_func 3
+lib_func 2
+lib_func 1}
# Only run on make installcheck
if {! [installtest_p]} { untested "lib-$testname"; return }
diff --git a/testsuite/systemtap.exelib/libmarkunamestack.stp b/testsuite/systemtap.exelib/libmarkunamestack.stp
index 0efbae0e..5ee229df 100644
--- a/testsuite/systemtap.exelib/libmarkunamestack.stp
+++ b/testsuite/systemtap.exelib/libmarkunamestack.stp
@@ -7,7 +7,7 @@ probe process(@1).function("main") {
}
probe process(@1).function("main_func") {
- printf("main_func\n");
+ printf("main_func: %d\n", $foo);
}
probe process(@2).function("lib_main") {
@@ -15,7 +15,7 @@ probe process(@2).function("lib_main") {
}
probe process(@2).function("lib_func") {
- printf("lib_func\n");
+ printf("lib_func: %d\n", $bar);
}
#mark
diff --git a/testsuite/systemtap.exelib/libmarkunamestack.tcl b/testsuite/systemtap.exelib/libmarkunamestack.tcl
index 55dc10ee..20111b3f 100644
--- a/testsuite/systemtap.exelib/libmarkunamestack.tcl
+++ b/testsuite/systemtap.exelib/libmarkunamestack.tcl
@@ -47,9 +47,9 @@ expect {
# lib
-re {^main\r\n} {incr lib; exp_continue}
- -re {^main_func\r\n} {incr lib; exp_continue}
+ -re {^main_func: [1-3]\r\n} {incr lib; exp_continue}
-re {^lib_main\r\n} {incr lib; exp_continue}
- -re {^lib_func\r\n} {incr lib; exp_continue}
+ -re {^lib_func: [1-3]\r\n} {incr lib; exp_continue}
# mark
-re {^main_count: [1-3]\r\n} {incr mark; exp_continue}