]> sourceware.org Git - systemtap.git/commitdiff
PR13274: Fixed testsuite for standard warning processing (without elaborate.cxx)
authorChris Meek <cmeek@redhat.com>
Thu, 15 Dec 2011 19:03:47 +0000 (14:03 -0500)
committerChris Meek <cmeek@redhat.com>
Tue, 20 Dec 2011 22:18:35 +0000 (17:18 -0500)
Since we are now using "WARNING" rather than "Warning", some of the
expect statements in some test cases needed to be tweaked.

testsuite/systemtap.base/beginenderror.exp
testsuite/systemtap.base/trycatch.exp
testsuite/systemtap.context/uprobe_stmt_num.c
testsuite/systemtap.context/uprobe_stmt_num.exp
testsuite/systemtap.stress/conversions.exp

index 1ab50fdba4b6fc512ac7eab2e853eecac170cd6f..534f0fc6b1116413b934b3022a5055cd7dbf1404 100644 (file)
@@ -16,7 +16,7 @@ expect {
     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)" 
index ad650147012638bedbc678fb3447871aac5479a9..228e8fd862a3747a9787509c215e9b19c546c101 100644 (file)
@@ -9,7 +9,7 @@ expect {
     -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 }
@@ -29,7 +29,7 @@ expect {
     -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 }
index 887e572a3f38429d61cdaea3bbf65a90b481ed36..320ae48ddbc16bb29c94ce3fb65db0376db889d6 100644 (file)
@@ -16,5 +16,7 @@ func (int arg)
 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;
 }
index 2210ff97c709605ec055c5419734c1df3dd8ee31..d134fd7239b78ec3a0ac5975a1fc08739fa69c66 100644 (file)
@@ -21,7 +21,7 @@ if { $res != "" } {
     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"
@@ -47,7 +47,7 @@ if { $lines >= 6 } {
 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.
@@ -59,7 +59,7 @@ foreach line $output_lines {
     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"]
index 7e011440c97444ede45196d17db8c8e84760d01b..06114039a158047748dfda2ee15435a5531997d4 100644 (file)
@@ -19,6 +19,6 @@ foreach value {0 0xffffffff 0xffffffffffffffff} {
     }
     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"
 }
This page took 0.038193 seconds and 5 git commands to generate.