diff options
author | Dave Brolley <brolley@redhat.com> | 2009-11-03 16:22:36 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-11-03 16:22:36 -0500 |
commit | 899b66209b0146560f0efc33efe58a4be3577df3 (patch) | |
tree | 7b64764b917c359a99d0adcf6c68a2d73cd52be7 /testsuite/systemtap.base/onoffprobe.exp | |
parent | d4ad7984018ff769cbb662342be7e501632c0bea (diff) | |
parent | 89651893a8ec51ee4d77ddfd57019e350ad7b169 (diff) | |
download | systemtap-steved-899b66209b0146560f0efc33efe58a4be3577df3.tar.gz systemtap-steved-899b66209b0146560f0efc33efe58a4be3577df3.tar.xz systemtap-steved-899b66209b0146560f0efc33efe58a4be3577df3.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Conflicts:
Makefile.in
configure
doc/Makefile.in
doc/SystemTap_Tapset_Reference/Makefile.in
grapher/Makefile.in
testsuite/configure
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 } |