eof { }
}
wait
-if {$ok1 == 4 && $ok2 == 3 && $ko == 0} then {
+if {$ok1 == 5 && $ok2 == 3 && $ko == 0} then {
pass "$test ($ok1 $ok2 $ko)"
} else {
fail "$test ($ok1 $ok2 $ko)"
-timeout 30
-re {^ERROR: MAXACTION[^\r\n]*\r\n} { incr ok; exp_continue }
-re {^WARNING: Number of errors[^\r\n]*\r\n} { incr ok; exp_continue }
- -re {^Warning:[^\r\n]* exited with status:[^\r\n]*\r\n} {incr ok; exp_continue }
+ -re {^WARNING:[^\r\n]* exited with status:[^\r\n]*\r\n} {incr ok; exp_continue }
-re {^Pass 5: run failed[^\r\n]*\r\n} { incr ok; exp_continue }
-re {^OK[^\r\n]*\r\n} { incr ok; exp_continue }
-re {^KO[^\r\n]*\r\n} { incr ko; exp_continue }
-timeout 30
-re {^ERROR: MAXACTION[^\r\n]*\r\n} { incr ok; exp_continue }
-re {^WARNING: Number of errors[^\r\n]*\r\n} { incr ok; exp_continue }
- -re {^Warning:[^\r\n]* exited with status:[^\r\n]*\r\n} {incr ok; exp_continue }
+ -re {^WARNING:[^\r\n]* exited with status:[^\r\n]*\r\n} {incr ok; exp_continue }
-re {^Pass 5: run failed[^\r\n]*\r\n} { incr ok; exp_continue }
-re {^OK[^\r\n]*\r\n} { incr ok; exp_continue }
-re {^KO[^\r\n]*\r\n} { incr ko; exp_continue }
int
main (int argc, char *argv[], char *envp[])
{
- return func(42);
+// Note: Passing to srand to force evaluation of func().
+ srand(func(42));
+ return 0;
}
return
}
-set cmd [concat stap -c $testexe $teststp]
+set cmd [concat stap -wc $testexe $teststp]
send_log "cmd: $cmd\n"
catch {eval exec $cmd} output
send_log "cmd output: $output\n"
set ::result_string $output
# Sanity check, just run again...
-stap_run3 $test-run-two $testpath/$test.stp -c $testexe
+stap_run3 $test-run-two -w $testpath/$test.stp -c $testexe
# create a script based on the given statements,
# probe all of them individually.
puts $fp "}"
}
close $fp
-stap_run3 $test-run-statements $test-run-statements.stp -c $testexe
+stap_run3 $test-run-statements -w $test-run-statements.stp -c $testexe
# Now strip away the line info and try again (with -g).
set strip_cmd [list "objcopy" "-R" ".debug_line"]
}
verbose -log "done exp $test $errs"
wait
- if {$errs == 17} { pass $test } else { fail "$test ($errs)" }
+ if {$errs == 18} { pass $test } else { fail "$test ($errs)" }
verbose -log "done $test $errs"
}