summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/alternatives.exp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.base/alternatives.exp')
-rw-r--r--testsuite/systemtap.base/alternatives.exp17
1 files changed, 9 insertions, 8 deletions
diff --git a/testsuite/systemtap.base/alternatives.exp b/testsuite/systemtap.base/alternatives.exp
index deaf3bf8..f5dc4513 100644
--- a/testsuite/systemtap.base/alternatives.exp
+++ b/testsuite/systemtap.base/alternatives.exp
@@ -14,11 +14,11 @@
# listed, but that some alternatives are listed.
set local1_script {
- probe kernel.function("sys_getrlimit") { x = $z; }
+ probe kernel.function("vfs_write") { ret = $z; }
}
set struct1_script {
- probe kernel.function("sys_getrlimit") { rlim_cur = $rlim->rlim_cud; }
+ probe kernel.function("vfs_write") { f_pos = $file->f_po; }
}
proc stap_run_alternatives {args} {
@@ -26,10 +26,11 @@ proc stap_run_alternatives {args} {
verbose -log "starting $args"
eval spawn $args
expect {
+ -timeout 60
-re {semantic error: .+ \(alternatives: [a-zA-Z_]} {incr alternatives_found; exp_continue}
-re {[^\r]*\r} { verbose -log $expect_out(0,string); exp_continue }
- eof { }
- timeout { }
+ eof { verbose -log "EOF" }
+ timeout { verbose -log "TIMEOUT" }
}
set results [wait]
verbose -log "wait results: $results"
@@ -37,9 +38,9 @@ proc stap_run_alternatives {args} {
}
set test "LOCAL1"
-set rc [stap_run_alternatives stap -vu -p2 -e $local1_script]
-if {$rc == 1} { pass $test } else { fail "$test ($rc)" }
+set rc [stap_run_alternatives stap -u -p2 -e $local1_script]
+if {$rc >= 1} { pass $test } else { fail "$test ($rc)" }
set test "STRUCT1"
-set rc [stap_run_alternatives stap -vu -p2 -e $struct1_script]
-if {$rc == 1} { pass $test } else { fail "$test ($rc)" }
+set rc [stap_run_alternatives stap -u -p2 -e $struct1_script]
+if {$rc >= 1} { pass $test } else { fail "$test ($rc)" }