summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorStan Cox <scox@redhat.com>2009-04-16 10:25:05 -0400
committerStan Cox <scox@redhat.com>2009-04-16 10:25:05 -0400
commitbd4b874d5a57aff23809617b19501da94885da8f (patch)
treed3dc06d9e2f1d5aaca59667af37f91c714e5cf7d /testsuite
parent9d4518784bedd11e8563c999658f307c5c01b3a3 (diff)
downloadsystemtap-steved-bd4b874d5a57aff23809617b19501da94885da8f.tar.gz
systemtap-steved-bd4b874d5a57aff23809617b19501da94885da8f.tar.xz
systemtap-steved-bd4b874d5a57aff23809617b19501da94885da8f.zip
Use iterate_over_srcfile_lines for function("func@file:N").label
* tapsets.cxx (dwflpp::iterate_over_labels): Renamed from iterate_over_cu_labels, method signature simplified. (query_srcfile_label): New. (query_cu): Use above. * labels.exp: New tests for above.
Diffstat (limited to 'testsuite')
-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 }