diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/buildok/thirtyone.stp | 1 | ||||
-rw-r--r-- | testsuite/systemtap.base/badkprobe.exp | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/testsuite/buildok/thirtyone.stp b/testsuite/buildok/thirtyone.stp index 8a97d84f..5f2f2da6 100755 --- a/testsuite/buildok/thirtyone.stp +++ b/testsuite/buildok/thirtyone.stp @@ -1,4 +1,5 @@ #! stap -p4 +probe kprobe.function("sys_stat") {} probe kprobe.function("sys_open") {} probe kernel.function("sys_close") {} 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)" } } |