summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/badkprobe.exp
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-05-22 18:01:18 -0700
committerJosh Stone <jistone@redhat.com>2009-05-22 18:12:47 -0700
commitb350f56b13f4e5acd5744cd71e4b26343aae8e6b (patch)
treecad8a3794b8fc50728445ca6589aea6e27ec919c /testsuite/systemtap.base/badkprobe.exp
parentdec6cf8fd4da55ac0fd4c711b3eebc48ee9eda75 (diff)
downloadsystemtap-steved-b350f56b13f4e5acd5744cd71e4b26343aae8e6b.tar.gz
systemtap-steved-b350f56b13f4e5acd5744cd71e4b26343aae8e6b.tar.xz
systemtap-steved-b350f56b13f4e5acd5744cd71e4b26343aae8e6b.zip
PR10190: Suppress warnings for optional kprobes
When a kernel.function or kprobe.function fails in registration, we usually print a WARNING and move on. With this patch, kprobes that have the optional '?' flag will not print any WARNING.
Diffstat (limited to 'testsuite/systemtap.base/badkprobe.exp')
-rw-r--r--testsuite/systemtap.base/badkprobe.exp15
1 files changed, 14 insertions, 1 deletions
diff --git a/testsuite/systemtap.base/badkprobe.exp b/testsuite/systemtap.base/badkprobe.exp
index c0815fbe..96ad5a3b 100644
--- a/testsuite/systemtap.base/badkprobe.exp
+++ b/testsuite/systemtap.base/badkprobe.exp
@@ -19,7 +19,20 @@ foreach bk $bad_kprobes {
spawn stap -g -w -e "$script" "$bk"
expect {
-timeout 60
- -re "^WARNING: probe .*registration error.*\r\ncleanup ok" { pass $test }
+ -re "^WARNING: probe .*registration error.*\r\ncleanup ok\r\n" { pass $test }
+ eof { fail "$test (eof)" }
+ timeout { fail "$test (timeout)" }
+ }
+ catch {close}
+ catch {wait}
+}
+
+foreach bk $bad_kprobes {
+ set test "bad optional kprobe registration: $bk"
+ spawn stap -g -w -e "$script" "$bk ?"
+ expect {
+ -timeout 60
+ -re "^cleanup ok\r\n" { pass $test }
eof { fail "$test (eof)" }
timeout { fail "$test (timeout)" }
}