diff options
author | David Smith <dsmith@redhat.com> | 2009-08-28 13:59:27 -0500 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2009-08-28 13:59:27 -0500 |
commit | 342489f500c1fb1877c9e25aa13547d58d34ce92 (patch) | |
tree | df1012b3892ceee03d90621bc530750ac20b9980 | |
parent | 4f0cf2b3b7d8e6e69a39e57beeae7e88794e35d0 (diff) | |
download | systemtap-steved-342489f500c1fb1877c9e25aa13547d58d34ce92.tar.gz systemtap-steved-342489f500c1fb1877c9e25aa13547d58d34ce92.tar.xz systemtap-steved-342489f500c1fb1877c9e25aa13547d58d34ce92.zip |
Added test for pr10568.
* testsuite/systemtap.base/alias_tapset.exp: New file.
* testsuite/systemtap.base/alias_tapset.stp: Ditto.
* testsuite/systemtap.base/alias_tapset/tapset_test.stp: Ditto.
-rw-r--r-- | testsuite/systemtap.base/alias_tapset.exp | 33 | ||||
-rw-r--r-- | testsuite/systemtap.base/alias_tapset.stp | 2 | ||||
-rw-r--r-- | testsuite/systemtap.base/alias_tapset/tapset_test.stp | 8 |
3 files changed, 43 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/alias_tapset.exp b/testsuite/systemtap.base/alias_tapset.exp new file mode 100644 index 00000000..479da384 --- /dev/null +++ b/testsuite/systemtap.base/alias_tapset.exp @@ -0,0 +1,33 @@ +# This testcase is based on pr10568. It ensures that when an alias +# causes a tapset file to be included, the entire files gets included. + +set test alias_tapset + +set never_found 0 +set kernel_function_found 0 +set timer_found 0 + +set cmd "stap -p2 -I $srcdir/$subdir/${test} $srcdir/$subdir/${test}.stp" +verbose -log "running $cmd" +eval spawn $cmd +expect { + -timeout 60 + -re {^never.+\r\n} { incr never_found; exp_continue } + -re {^kernel.function.+\r\n} { incr kernel_function_found; exp_continue } + -re {^timer.+\r\n} { incr timer_found; exp_continue } + -re {^.+\r\n} { + # ignore output we're not interested in + exp_continue } + timeout { verbose -log "TIMEOUT" } +} +catch { close } + +# get the return code of the process +set rc [lindex [wait -i $spawn_id] 3] + +if { $rc == 0 && $never_found == 1 && $kernel_function_found == 1 + && $timer_found == 1 } { + pass $test +} else { + fail "$test ($rc, $never_found, $kernel_function_found, $timer_found)" +} diff --git a/testsuite/systemtap.base/alias_tapset.stp b/testsuite/systemtap.base/alias_tapset.stp new file mode 100644 index 00000000..88b3ad3e --- /dev/null +++ b/testsuite/systemtap.base/alias_tapset.stp @@ -0,0 +1,2 @@ +probe tapset_test.foo { } + diff --git a/testsuite/systemtap.base/alias_tapset/tapset_test.stp b/testsuite/systemtap.base/alias_tapset/tapset_test.stp new file mode 100644 index 00000000..a644d636 --- /dev/null +++ b/testsuite/systemtap.base/alias_tapset/tapset_test.stp @@ -0,0 +1,8 @@ +global _reads + +probe tapset_test.foo = never { next } + +probe syscall.read { _reads++ } + +probe timer.s(5) { printf("%d\n", _reads) } + |