diff options
author | Dave Brolley <brolley@redhat.com> | 2009-04-27 11:56:15 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-04-27 11:56:15 -0400 |
commit | e84f20287ae21b31c3505dfd0a81176687ad1ec5 (patch) | |
tree | 956005556406fc93e4444ee0d425aafed8e241d0 /testsuite/systemtap.base | |
parent | fb6d28283bd7ea63364a008d32c53687a694642f (diff) | |
parent | 097e4a5b397b9e826453e01caa1f8169886128c5 (diff) | |
download | systemtap-steved-e84f20287ae21b31c3505dfd0a81176687ad1ec5.tar.gz systemtap-steved-e84f20287ae21b31c3505dfd0a81176687ad1ec5.tar.xz systemtap-steved-e84f20287ae21b31c3505dfd0a81176687ad1ec5.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Conflicts:
configure
testsuite/configure
Diffstat (limited to 'testsuite/systemtap.base')
-rw-r--r-- | testsuite/systemtap.base/badkprobe.exp | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/testsuite/systemtap.base/badkprobe.exp b/testsuite/systemtap.base/badkprobe.exp index efc06695..c0815fbe 100644 --- a/testsuite/systemtap.base/badkprobe.exp +++ b/testsuite/systemtap.base/badkprobe.exp @@ -1,14 +1,28 @@ -set script "probe kernel.statement(-1).absolute {} probe timer.s(1) { exit() }" set test "bad kprobe registration" +set script { + probe $1 {} + probe timer.s(1) { exit() } + probe end { println("cleanup ok") } +} if {! [installtest_p]} { untested $test; return } -spawn stap -g -w -e "$script" -expect { - -timeout 60 - -re "^WARNING: probe .*registration error.*" { pass $test } - eof { fail "$test (eof)" } - timeout { fail "$test (timeout)" } +set bad_kprobes { + kernel.statement(-1).absolute + kprobe.statement(-1).absolute + kprobe.function("no_such_function") + kprobe.function("no_such_function").return +} + +foreach bk $bad_kprobes { + set test "bad kprobe registration: $bk" + spawn stap -g -w -e "$script" "$bk" + expect { + -timeout 60 + -re "^WARNING: probe .*registration error.*\r\ncleanup ok" { pass $test } + eof { fail "$test (eof)" } + timeout { fail "$test (timeout)" } + } + catch {close} + catch {wait} } -catch {close} -catch {wait} |