diff options
author | Tim Moore <timoore@redhat.com> | 2009-10-27 19:50:06 +0100 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-10-27 19:50:06 +0100 |
commit | f70d5f6b702e8da5c6affb3f34836c466b01f1b9 (patch) | |
tree | 46954ea80adcd97d18e21ecd1357b075d97f7e50 /testsuite/systemtap.base/onoffprobe.exp | |
parent | 8447d5545aa58965a5f47d604e14e97e673d1cd9 (diff) | |
parent | 618a8a634b37da88b67a49beec7282634bff3efe (diff) | |
download | systemtap-steved-f70d5f6b702e8da5c6affb3f34836c466b01f1b9.tar.gz systemtap-steved-f70d5f6b702e8da5c6affb3f34836c466b01f1b9.tar.xz systemtap-steved-f70d5f6b702e8da5c6affb3f34836c466b01f1b9.zip |
Merge branch 'master' of ssh://sourceware.org/git/systemtap
Diffstat (limited to 'testsuite/systemtap.base/onoffprobe.exp')
-rw-r--r-- | testsuite/systemtap.base/onoffprobe.exp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/testsuite/systemtap.base/onoffprobe.exp b/testsuite/systemtap.base/onoffprobe.exp index 1b39dab5..c6d83d5d 100644 --- a/testsuite/systemtap.base/onoffprobe.exp +++ b/testsuite/systemtap.base/onoffprobe.exp @@ -10,9 +10,27 @@ proc advance {} { global expect_out global ok global modname + set procfs_file "/proc/systemtap/$modname/switch" + pass "$test $expect_out(1,string)" + + # If this is the first time, wait until the procfs file exists + # (for up to 10 seconds). + if {$ok == 0} { + set i 0 + while {![file exists $procfs_file]} { + sleep 1 + incr i + if {$i >= 10} { break } + } + # If the procfs file still doesn't exist, fail. + if {![file exists $procfs_file]} { + fail "$test (missing procfs file)" + } + } + incr ok - exec echo $ok > /proc/systemtap/$modname/switch + if {[file exists $procfs_file]} { exec echo $ok > $procfs_file } exec echo dummy > /dev/null exp_continue } |