summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/labels.exp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.base/labels.exp')
-rw-r--r--testsuite/systemtap.base/labels.exp31
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/labels.exp b/testsuite/systemtap.base/labels.exp
index 88ed4619..79e3f483 100644
--- a/testsuite/systemtap.base/labels.exp
+++ b/testsuite/systemtap.base/labels.exp
@@ -55,11 +55,42 @@ if { $res != "" } {
pass "compiling labels.c -g"
}
+# line number error
+
+set ok 0
+spawn stap -l "process(\"$label_exepath\").function(\"foo@${label_srcpath}:10\").label(\"*\")"
+
+wait
+expect {
+ -timeout 180
+ -re {no match while resolving probe point} { incr ok; exp_continue }
+ timeout { fail "$test (timeout)" }
+ eof { }
+}
+
+if {$ok == 1} { pass "$test :N .label" } { fail "$test :N .label $ok" }
+
+# line number
+
+set ok 0
+spawn stap -l "process(\"$label_exepath\").function(\"foo@${label_srcpath}:4\").label(\"*\")"
+
+wait
+expect {
+ -timeout 180
+ -re {process.*function.*labels.c:5...label..init_an_int} { incr ok; exp_continue }
+ timeout { fail "$test (timeout)" }
+ eof { }
+}
+
+if {$ok == 1} { pass "$test :N .label" } { fail "$test :N .label $ok" }
+
# list of labels
spawn stap -l "process(\"$label_exepath\").function(\"*\").label(\"*\")"
wait
+set ok 0
expect {
-timeout 180
-re {process.*function.*labels.c:5...label..init_an_int.*process.*function.*labels.c:16...label..init_an_int.*process.*function.*labels.c:18...label..init_an_int_again} { incr ok; exp_continue }