]> sourceware.org Git - systemtap.git/commitdiff
PR14574 partial fix: Add dyninst testcase support.
authorDavid Smith <dsmith@redhat.com>
Wed, 6 Feb 2013 15:28:59 +0000 (09:28 -0600)
committerDavid Smith <dsmith@redhat.com>
Wed, 6 Feb 2013 15:28:59 +0000 (09:28 -0600)
* testsuite/systemtap.base/rand.exp: Add dyninst support.
* testsuite/systemtap.base/sdt.exp: Ditto.
* testsuite/systemtap.base/sdt_misc.exp: Ditto.
* testsuite/systemtap.base/sdt_va_args.exp: Ditto.
* testsuite/systemtap.base/simple.exp: Ditto.
* testsuite/systemtap.base/stmt_rel_user.exp: Ditto.
* testsuite/systemtap.base/suppress-time-limit.exp: Ditto.
* testsuite/systemtap.base/tri.exp: Ditto.
* testsuite/systemtap.base/trycatch.exp: Ditto.

testsuite/systemtap.base/rand.exp
testsuite/systemtap.base/sdt.exp
testsuite/systemtap.base/sdt_misc.exp
testsuite/systemtap.base/sdt_va_args.exp
testsuite/systemtap.base/simple.exp
testsuite/systemtap.base/stmt_rel_user.exp
testsuite/systemtap.base/suppress-time-limit.exp
testsuite/systemtap.base/tri.exp
testsuite/systemtap.base/trycatch.exp

index 9b372e18a9415f6a6a208340ecb4a9f8cc0f73ef..90b43e6f62420b20f7153d46f76c88ecc389e1de 100644 (file)
@@ -1,3 +1,9 @@
 set test "rand"
 set ::result_string {PASS}
-stap_run2 $srcdir/$subdir/$test.stp
+foreach runtime [get_runtime_list] {
+    if {$runtime != ""} {
+       stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime
+    } else {
+       stap_run2 $srcdir/$subdir/$test.stp
+    }
+}
index 52f21f4cbc0352f7c3f2c1b63143aa724d0383e1..9bf54885190622947d1f536aa0ffe0410597fdd1 100644 (file)
@@ -33,26 +33,42 @@ set pbtype_flags {{""} {additional_flags=-DSTAP_SDT_V2}}
 set pbtype_mssgs {{uprobe} {V2_uprobe}}
 
 proc sdt_stap_run { TEST_NAME TEST_FILE FAIL args } {
-    set cmd [concat stap $TEST_FILE $args]
-    send_log "executing: $cmd\n"
-    catch {eval exec $cmd} res
-
-    set n 0
-    set expected [split $::result_string "\n"]
-    foreach line [split $res "\n"] {
-       if {![string equal $line [lindex $expected $n]]} {
-           $FAIL "$TEST_NAME"
-           send_log "line [expr $n + 1]: expected \"[lindex $expected $n]\"\n"
-           send_log "Got \"$line\"\n"
-           return
+    foreach runtime [get_runtime_list] {
+       set full_test_name $TEST_NAME
+       if {$runtime != ""} {
+           lappend full_test_name "($runtime)"
+           set cmd [concat stap --runtime=$runtime $TEST_FILE $args]
+       } elseif {[uprobes_p]} {
+           set cmd [concat stap $TEST_FILE $args]
+       } else {
+           untested $full_test_name
+           continue
+       }
+       send_log "executing: $cmd\n"
+       catch {eval exec $cmd} res
+
+       set skip 0
+       set n 0
+       set expected [split $::result_string "\n"]
+       foreach line [split $res "\n"] {
+           if {![string equal $line [lindex $expected $n]]} {
+               $FAIL "$full_test_name"
+               send_log "line [expr $n + 1]: expected \"[lindex $expected $n]\"\n"
+               send_log "Got \"$line\"\n"
+               set skip 1
+               break
+           }
+           incr n
+       }
+       if {$skip != 0} {
+           continue
+       }
+       if {[expr $n == [llength $expected]]} {
+           pass "$full_test_name"
+       } else {
+           $FAIL "$full_test_name"
+           send_log "too few lines of output, got $n, expected [llength $expected]\n"
        }
-       incr n
-    }
-    if {[expr $n == [llength $expected]]} {
-      pass "$TEST_NAME"
-    } else {
-      $FAIL "$TEST_NAME"
-      send_log "too few lines of output, got $n, expected [llength $expected]\n"
     }
 }
 
@@ -93,8 +109,9 @@ if { $res != "" } {
     pass "compiling $test.c $extra_mssg $type_pedantic_mssg $pbtype_mssg"
 }
 
-if {[installtest_p] && [utrace_p] && [uprobes_p]} {
-    if {[regexp "^(ppc64|s390x)$" $::tcl_platform(machine)] && [regexp "^(-O)" $extra_mssg]} {
+if {[installtest_p]} {
+    if {[regexp "^(ppc64|s390x)$" $::tcl_platform(machine)] \
+           && [regexp "^(-O)" $extra_mssg]} {
        # register name and constant is ambiguous in ppc/s390 asm syntax
        # thus constant folding can throw the result off
        set FAIL xfail
@@ -105,7 +122,8 @@ if {[installtest_p] && [utrace_p] && [uprobes_p]} {
     if { $pbtype_mssg == "uprobe" } {
        append ::result_string $result_string12
     }
-    sdt_stap_run "$test $extra_mssg $type_pedantic_mssg $pbtype_mssg" -w $FAIL $srcdir/$subdir/$test.stp $testprog -c ./$testprog
+    sdt_stap_run "$test $extra_mssg $type_pedantic_mssg $pbtype_mssg" \
+       -w $FAIL $srcdir/$subdir/$test.stp $testprog -c ./$testprog
 } else {
     untested "$test $extra_mssg $type_pedantic_mssg $pbtype_mssg"
 }
index 09a9770c9e1bed797a90d301c741ae110c8c64c9..57331ab6165b31bb76c5ab592db7e03360dfc52f 100644 (file)
@@ -87,43 +87,48 @@ for {set i 0} {$i < [llength $pbtype_flags]} {incr i} {
     if {![installtest_p]} {
        untested $test
        cleanup_handler $verbose
-       return}
-    if {![uprobes_p]} {
-       untested $test
-       cleanup_handler $verbose
-       return}
-    if {![utrace_p]} {
-       untested "$test"
-       cleanup_handler $verbose
        return
     }
     
     # 1. Test executable built with dtrace generated header file
     
-    set ok 0
-    
-    verbose -log "spawn $stap_path -c $sup_exepath $srcdir/$subdir/sdt_misc.stp $sup_exepath"
-    spawn $stap_path -c $sup_exepath $srcdir/$subdir/sdt_misc.stp $sup_exepath
-    expect {
-       -timeout 180
-       -re {In test_probe_2 probe 0x2} { incr ok; exp_continue }
-       -re {In test_probe_0 probe 0x3} { incr ok; exp_continue }
-       -re {In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]} {
-           incr ok; exp_continue }
-       -re {In test_probe_4 dtrace probe 0x[0-9a-f]} { incr ok; exp_continue }
-       -re {In test_probe_1 probe 0x0} { incr ok; exp_continue }
-       timeout { fail "$test (timeout)" }
-       eof { }
-    }
-    catch {close}; catch {wait}
+    foreach runtime [get_runtime_list] {
+       set test_xtra ""
+       if {$runtime != ""} {
+           set test_xtra " ($runtime)"
+           verbose -log "spawn $stap_path --runtime=$runtime -c $sup_exepath $srcdir/$subdir/sdt_misc.stp $sup_exepath"
+           spawn $stap_path --runtime=$runtime -c $sup_exepath \
+               $srcdir/$subdir/sdt_misc.stp $sup_exepath
+       } elseif {[uprobes_p]} {
+           verbose -log "spawn $stap_path -c $sup_exepath $srcdir/$subdir/sdt_misc.stp $sup_exepath"
+           spawn $stap_path -c $sup_exepath $srcdir/$subdir/sdt_misc.stp \
+               $sup_exepath
+       } else {
+           untested "$test ${pbtype_mssg}"
+           continue
+       }
+       set ok 0
+       expect {
+           -timeout 180
+           -re {In test_probe_2 probe 0x2} { incr ok; exp_continue }
+           -re {In test_probe_0 probe 0x3} { incr ok; exp_continue }
+           -re {In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]} {
+               incr ok; exp_continue }
+           -re {In test_probe_4 dtrace probe 0x[0-9a-f]} { incr ok; exp_continue }
+           -re {In test_probe_1 probe 0x0} { incr ok; exp_continue }
+           timeout { fail "$test (timeout)" }
+           eof { }
+       }
+       catch {close}; catch {wait}
     
-    if {$ok == 6} {
-       pass "$test $pbtype_mssg"
-    } else {
-       if {[istarget "arm-*-*"] && $pbtype_mssg == "V2_uprobe"} {
-           xfail "$test ($ok) $pbtype_mssg"
+       if {$ok == 6} {
+           pass "$test ${pbtype_mssg}${test_xtra}"
        } else {
-           fail "$test ($ok) $pbtype_mssg"
+           if {[istarget "arm-*-*"] && $pbtype_mssg == "V2_uprobe"} {
+               xfail "$test ($ok) ${pbtype_mssg}${test_xtra}"
+           } else {
+               fail "$test ($ok) ${pbtype_mssg}${test_xtra}"
+           }
        }
     }
     
@@ -142,53 +147,71 @@ for {set i 0} {$i < [llength $pbtype_flags]} {incr i} {
        pass "$test compiling $pbtype_mssg -DLOOP"
     }
     
-    # This is perhaps a wee bit clumsy
-    verbose -log "$loop_exepath >| ,semclean 2>&1 & TEST=\$! ; \
-       $stap_path $srcdir/$subdir/sdt_misc.stp $loop_exepath >| ,semout ; \
-       /usr/bin/kill -SIGINT \$TEST"
-    system "$loop_exepath >,semclean 2>&1 & TEST=\$! ; \
-       $stap_path $srcdir/$subdir/sdt_misc.stp $loop_exepath >| ,semout ; \
-       /usr/bin/kill -SIGINT \$TEST"
-    
-    set ok 0
-    set ko 0
-    spawn cat ,semout
-    expect {
-       -re {In test_probe_2 probe 0x2} { incr ok; exp_continue }
-       -re {In test_probe_0 probe 0x3} { incr ok; exp_continue }
-       -re {In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]} {
-           incr ok; exp_continue }
-       -re {In test_probe_4 dtrace probe 0x[0-9a-f]} { incr ok; exp_continue }
-       -re {In test_probe_1 probe 0x0} { incr ok; exp_continue }
-       eof { }
-    }
-    catch {close}; catch {wait}
-    
-    if {$ok == 6} {
-       pass "$test $pbtype_mssg attach"
-    } else {
-       if {[istarget "arm-*-*"] && $pbtype_mssg == "V2_uprobe"} {
-           xfail "$test ($ok) $pbtype_mssg attach"
+    foreach runtime [get_runtime_list] {
+       set test_xtra ""
+       if {$runtime != ""} {
+           set test_xtra " ($runtime)"
+           # This is perhaps a wee bit clumsy
+           verbose -log "$loop_exepath >| ,semclean 2>&1 & TEST=\$! ; \
+               $stap_path --runtime=$runtime $srcdir/$subdir/sdt_misc.stp $loop_exepath >| ,semout ; \
+               /usr/bin/kill -SIGINT \$TEST"
+           system "$loop_exepath >,semclean 2>&1 & TEST=\$! ; \
+               $stap_path --runtime=$runtime $srcdir/$subdir/sdt_misc.stp $loop_exepath >| ,semout ; \
+               /usr/bin/kill -SIGINT \$TEST"
+       } elseif {[uprobes_p]} {
+           # This is perhaps a wee bit clumsy
+           verbose -log "$loop_exepath >| ,semclean 2>&1 & TEST=\$! ; \
+               $stap_path $srcdir/$subdir/sdt_misc.stp $loop_exepath >| ,semout ; \
+               /usr/bin/kill -SIGINT \$TEST"
+           system "$loop_exepath >,semclean 2>&1 & TEST=\$! ; \
+               $stap_path $srcdir/$subdir/sdt_misc.stp $loop_exepath >| ,semout ; \
+               /usr/bin/kill -SIGINT \$TEST"
        } else {
-           fail "$test ($ok) $pbtype_mssg attach"
+           untested "$test $pbtype_mssg attach"
+           continue
+       }
+       
+       set ok 0
+       set ko 0
+       spawn cat ,semout
+       expect {
+           -re {In test_probe_2 probe 0x2} { incr ok; exp_continue }
+           -re {In test_probe_0 probe 0x3} { incr ok; exp_continue }
+           -re {In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]} {
+               incr ok; exp_continue }
+           -re {In test_probe_4 dtrace probe 0x[0-9a-f]} {
+               incr ok; exp_continue }
+           -re {In test_probe_1 probe 0x0} { incr ok; exp_continue }
+           eof { }
+       }
+       catch {close}; catch {wait}
+       
+       if {$ok == 6} {
+           pass "$test ${pbtype_mssg}${test_xtra} attach"
+       } else {
+           if {[istarget "arm-*-*"] && $pbtype_mssg == "V2_uprobe"} {
+               xfail "$test ($ok) ${pbtype_mssg}${test_xtra} attach"
+           } else {
+               fail "$test ($ok) ${pbtype_mssg}${test_xtra} attach"
+           }
+       }
+       
+       set ok 0
+       spawn cat ,semclean
+       expect {
+           -timeout 180
+           -re {PASS} { incr ok; exp_continue }
+           -re {FAIL} { incr ko; exp_continue }
+           timeout { fail "$test (timeout)" }
+           eof { }
+       }
+       catch {close}; catch {wait}
+       
+       if {$ok == 4 && $ko == 0} {
+           pass "$test ${pbtype_mssg}${test_xtra} epilogue"
+       } else {
+           fail "$test ($ok) ${pbtype_mssg}${test_xtra} epilogue"
        }
-    }
-    
-    set ok 0
-    spawn cat ,semclean
-    expect {
-       -timeout 180
-       -re {PASS} { incr ok; exp_continue }
-       -re {FAIL} { incr ko; exp_continue }
-       timeout { fail "$test (timeout)" }
-       eof { }
-    }
-    catch {close}; catch {wait}
-    
-    if {$ok == 4 && $ko == 0} {
-       pass "$test $pbtype_mssg epilogue"
-    } else {
-       fail "$test ($ok) $pbtype_mssg epilogue"
     }
     
     # 3. Test passing various C types to .mark probes
@@ -231,13 +254,13 @@ for {set i 0} {$i < [llength $pbtype_flags]} {incr i} {
                set type_flags "$type_flags additional_flags=-m64"
            }
            set test_suffix "$pbtype_mssg $extra_type_mssg $type_pedantic_mssg"
-
+           
            # On ARM these tests are known to fail with timeout for V1
            # and V2 probes.  Skip them altogether to speed execution.
            if {[istarget "arm-*-*"] \
-               && ($pbtype_mssg == "V1_uprobe" \
-                   || $pbtype_mssg == "V2_kprobe" \
-                   || $pbtype_mssg == "V2_uprobe")} {
+                   && ($pbtype_mssg == "V1_uprobe" \
+                           || $pbtype_mssg == "V2_kprobe" \
+                           || $pbtype_mssg == "V2_uprobe")} {
                xfail "$test types $test_suffix"
                continue
            }
@@ -259,34 +282,49 @@ for {set i 0} {$i < [llength $pbtype_flags]} {incr i} {
                pass "$test compiling types $test_suffix"
            }
            
-           set ok 0
-           set notok 0
-           set fail "types"
-           set uns_notok 0
-           verbose -log "spawn $stap_path -g -c ./sdt_types.x $srcdir/$subdir/sdt_types.stp ./sdt_types.x # $pbtype_mssg $extra_type_mssg"
-           spawn $stap_path -g -c ./sdt_types.x $srcdir/$subdir/sdt_types.stp ./sdt_types.x
-           expect {
-               -timeout 180
-               # i386 unsigned may xfail because of sign extension
-               # but fail anything else
-               -re {FAIL: [a-z_]+var} { regexp " .*$" $expect_out(0,string) s;
-                   if {[regexp "unsigned" $s] && [istarget "i*86-*-*"]} {
-                       incr uns_notok }
-                   incr notok; set fail "$fail $s"; exp_continue }
-               -re {PASS: [a-z_]+var} { incr ok; exp_continue }
-               timeout { fail "$test (timeout) $test_suffix" }
-               eof { }
-           }
-           catch {close}; catch {wait}
-           
-           if { $notok != 0 || $ok == 0} {
-               if { [lindex $type_xfail $j] || $notok == $uns_notok} {
-                   xfail "$test types $fail $test_suffix"
+           foreach runtime [get_runtime_list] {
+               set test_xtra ""
+               if {$runtime != ""} {
+                   set test_xtra " ($runtime)"
+                   verbose -log "spawn $stap_path --runtime=$runtime -g -c ./sdt_types.x $srcdir/$subdir/sdt_types.stp ./sdt_types.x # $pbtype_mssg $extra_type_mssg"
+                   spawn $stap_path --runtime=$runtime -g -c ./sdt_types.x $srcdir/$subdir/sdt_types.stp ./sdt_types.x
+               } elseif {[uprobes_p]} {
+                   verbose -log "spawn $stap_path -g -c ./sdt_types.x $srcdir/$subdir/sdt_types.stp ./sdt_types.x # $pbtype_mssg $extra_type_mssg"
+                   spawn $stap_path -g -c ./sdt_types.x $srcdir/$subdir/sdt_types.stp ./sdt_types.x
                } else {
-                   fail "$test types $fail $test_suffix"
+                   untested "$test types $test_suffix"
+                   continue
+               }
+               set test_suffix "${pbtype_mssg}${test_xtra} $extra_type_mssg $type_pedantic_mssg"
+
+               set ok 0
+               set notok 0
+               set fail "types"
+               set uns_notok 0
+               expect {
+                   -timeout 180
+                   # i386 unsigned may xfail because of sign extension
+                   # but fail anything else
+                   -re {FAIL: [a-z_]+var} {
+                       regexp " .*$" $expect_out(0,string) s
+                       if {[regexp "unsigned" $s] && [istarget "i*86-*-*"]} {
+                           incr uns_notok }
+                       incr notok; set fail "$fail $s"; exp_continue }
+                   -re {PASS: [a-z_]+var} { incr ok; exp_continue }
+                   timeout { fail "$test types (timeout) $test_suffix" }
+                   eof { }
+               }
+               catch {close}; catch {wait}
+               
+               if { $notok != 0 || $ok == 0} {
+                   if { [lindex $type_xfail $j] || $notok == $uns_notok} {
+                       xfail "$test types $fail $test_suffix"
+                   } else {
+                       fail "$test types $fail $test_suffix"
+                   }
+               } else {
+                   pass "$test types $test_suffix"
                }
-           } else {
-               pass "$test types $test_suffix"
            }
        } ; # end type_pedantics_idx
     } ; # end extra_type_flags
@@ -314,29 +352,41 @@ for {set i 0} {$i < [llength $pbtype_flags]} {incr i} {
        pass "$test compiling -shared $pbtype_mssg"
     }
     
-    set ok 0
-    verbose -log "spawn $stap_path -c $sup_exepath $srcdir/$subdir/sdt_misc.stp $sup_exepath $sup_sopath"
-    spawn $stap_path -c $sup_exepath $srcdir/$subdir/sdt_misc.stp $sup_exepath $sup_sopath
-    expect {
-       -timeout 180
-       -re {In test_probe_2 probe 0x2} { incr ok; exp_continue }
-       -re {In test_probe_0 probe 0x3} { incr ok; exp_continue }
-       -re {In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]} {
-           incr ok; exp_continue }
-       -re {In test_probe_4 dtrace probe 0x[0-9a-f]} { incr ok; exp_continue }
-       -re {In test_probe_1 probe 0x0} { incr ok; exp_continue }
-       timeout { fail "$test (timeout)" }
-       eof { }
-    }
-    catch {close}; catch {wait}
+    foreach runtime [get_runtime_list] {
+       set test_xtra ""
+       if {$runtime != ""} {
+           set test_xtra " ($runtime)"
+           verbose -log "spawn $stap_path --runtime=$runtime -c $sup_exepath $srcdir/$subdir/sdt_misc.stp $sup_exepath $sup_sopath"
+           spawn $stap_path --runtime=$runtime -c $sup_exepath $srcdir/$subdir/sdt_misc.stp $sup_exepath $sup_sopath
+       } elseif {[uprobes_p]} {
+           verbose -log "spawn $stap_path -c $sup_exepath $srcdir/$subdir/sdt_misc.stp $sup_exepath $sup_sopath"
+           spawn $stap_path -c $sup_exepath $srcdir/$subdir/sdt_misc.stp $sup_exepath $sup_sopath
+       } else {
+           untested "$test shared $pbtype_msg"
+           continue
+       }
+       set ok 0
+       expect {
+           -timeout 180
+           -re {In test_probe_2 probe 0x2} { incr ok; exp_continue }
+           -re {In test_probe_0 probe 0x3} { incr ok; exp_continue }
+           -re {In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]} {
+               incr ok; exp_continue }
+           -re {In test_probe_4 dtrace probe 0x[0-9a-f]} { incr ok; exp_continue }
+           -re {In test_probe_1 probe 0x0} { incr ok; exp_continue }
+           timeout { fail "$test (timeout)" }
+           eof { }
+       }
+       catch {close}; catch {wait}
     
-    if {$ok == 6} {
-       pass "$test shared $pbtype_mssg"
-    } else {
-       if {[istarget "arm-*-*"] && $pbtype_mssg == "V2_uprobe"} {
-           xfail "$test ($ok) shared $pbtype_mssg"
+       if {$ok == 6} {
+           pass "$test shared ${pbtype_mssg}${test_xtra}"
        } else {
-           fail "$test ($ok) shared $pbtype_mssg"
+           if {[istarget "arm-*-*"] && $pbtype_mssg == "V2_uprobe"} {
+               xfail "$test ($ok) shared ${pbtype_mssg}${test_xtra}"
+           } else {
+               fail "$test ($ok) shared ${pbtype_mssg}${test_xtra}"
+           }
        }
     }
     
@@ -365,55 +415,72 @@ for {set i 0} {$i < [llength $pbtype_flags]} {incr i} {
        pass "$test compiling $test_suffix"
     }
     
-    # This is perhaps a wee bit clumsy
-    verbose -log "$loop_exepath >| ,semclean 2>&1 & TEST=\$! ; \
-       $stap_path $srcdir/$subdir/sdt_misc.stp $loop_exepath $supl_sopath >| ,semout ; \
-       /usr/bin/kill -SIGINT \$TEST"
-    system "$loop_exepath >,semclean 2>&1 & TEST=\$! ; \
-       $stap_path $srcdir/$subdir/sdt_misc.stp $loop_exepath $supl_sopath >| ,semout ; \
-       /usr/bin/kill -SIGINT \$TEST"
-    
-    set ok 0
-    set ko 0
-    spawn cat ,semout
-    expect {
-       -re {In test_probe_2 probe 0x2} { incr ok; exp_continue }
-       -re {In test_probe_0 probe 0x3} { incr ok; exp_continue }
-       -re {In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]} {
-           incr ok; exp_continue }
-       -re {In test_probe_4 dtrace probe 0x[0-9a-f]} { incr ok; exp_continue }
-       -re {In test_probe_1 probe 0x0} { incr ok; exp_continue }
-       eof { }
-    }
-    catch {close}; catch {wait}
-    
-    if {$ok == 6} {
-       pass "$test $pbtype_mssg shared attach"
-    } else {
-       if {[istarget "arm-*-*"] && $pbtype_mssg == "V2_uprobe"} {
-           xfail "$test ($ok) $pbtype_mssg shared attach"
+    foreach runtime [get_runtime_list] {
+       set test_xtra ""
+       if {$runtime != ""} {
+           set test_xtra " ($runtime)"
+           # With --runtime=dyninst these tests will fail since the
+           # dyninst runtime needs a target executable (either '-c
+           # exe' or '-x pid'). So, skip these tests to speed up test
+           # execution.
+           xfail "$test ${pbtype_mssg}${test_xtra} shared attach"
+           continue
+       } elseif {[uprobes_p]} {
+           # This is perhaps a wee bit clumsy
+           verbose -log "$loop_exepath >| ,semclean 2>&1 & TEST=\$! ; \
+               $stap_path $srcdir/$subdir/sdt_misc.stp $loop_exepath $supl_sopath >| ,semout ; \
+               /usr/bin/kill -SIGINT \$TEST"
+           system "$loop_exepath >,semclean 2>&1 & TEST=\$! ; \
+               $stap_path $srcdir/$subdir/sdt_misc.stp $loop_exepath $supl_sopath >| ,semout ; \
+               /usr/bin/kill -SIGINT \$TEST"
        } else {
-           fail "$test ($ok) $pbtype_mssg shared attach"
+           untested "$test $pbtype_mssg shared attach"
+           continue
+       }
+       
+       set ok 0
+       set ko 0
+       spawn cat ,semout
+       expect {
+           -re {In test_probe_2 probe 0x2} { incr ok; exp_continue }
+           -re {In test_probe_0 probe 0x3} { incr ok; exp_continue }
+           -re {In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]} {
+               incr ok; exp_continue }
+           -re {In test_probe_4 dtrace probe 0x[0-9a-f]} {
+               incr ok; exp_continue }
+           -re {In test_probe_1 probe 0x0} { incr ok; exp_continue }
+           eof { }
+       }
+       catch {close}; catch {wait}
+       
+       if {$ok == 6} {
+           pass "$test ${pbtype_mssg}${test_xtra} shared attach"
+       } else {
+           if {[istarget "arm-*-*"] && $pbtype_mssg == "V2_uprobe"} {
+               xfail "$test ($ok) ${pbtype_mssg}${test_xtra} shared attach"
+           } else {
+               fail "$test ($ok) ${pbtype_mssg}${test_xtra} shared attach"
+           }
+       }
+       
+       set ok 0
+       spawn cat ,semclean
+       expect {
+           -timeout 180
+           -re {PASS} { incr ok; exp_continue }
+           -re {FAIL} { incr ko; exp_continue }
+           timeout { fail "$test (timeout)" }
+           eof { }
+       }
+       catch {close}; catch {wait}
+       
+       if {$ok == 4 && $ko == 0} {
+           pass "$test ${pbtype_mssg}${test_xtra} shared shared epilogue"
+       } else {
+           fail "$test ($ok) ${pbtype_mssg}${test_xtra} shared epilogue"
        }
     }
-    
-    set ok 0
-    spawn cat ,semclean
-    expect {
-       -timeout 180
-       -re {PASS} { incr ok; exp_continue }
-       -re {FAIL} { incr ko; exp_continue }
-       timeout { fail "$test (timeout)" }
-       eof { }
-    }
-    catch {close}; catch {wait}
-    
-    if {$ok == 4 && $ko == 0} {
-       pass "$test $pbtype_mssg shared shared epilogue"
-    } else {
-       fail "$test ($ok) $pbtype_mssg shared epilogue"
-    }
-    
+
     # 6. Test .mark probe wildcard matching
     
     set ok 0
@@ -442,8 +509,8 @@ for {set i 0} {$i < [llength $pbtype_flags]} {incr i} {
     catch {close}; catch {wait}
     
     if { $ok == 51 || $ok == 48 \
-        || (($ok == 43 || $ok == 40 ) && ([istarget "i.86-*-*"] \
-                                          || [istarget "arm-*-*"]))} {
+            || (($ok == 43 || $ok == 40 ) && ([istarget "i.86-*-*"] \
+                                                  || [istarget "arm-*-*"]))} {
        pass "$test wildcard $pbtype_mssg"
     } else {
        fail "$test wildcard ($ok) $pbtype_mssg"
@@ -451,7 +518,6 @@ for {set i 0} {$i < [llength $pbtype_flags]} {incr i} {
     
     # 7. Test types defined in sdt_misc_.d.  This requires -g
     
-    set ok 0
     set supbc_flags "$sup_flags additional_flags=-g additional_flags=-DNO_SLEEP"
     set supbc_exepath "[pwd]/sdt_misc_${pbtype_mssg}_types.x"
     set res [target_compile $srcdir/$subdir/sdt_misc.c $supbc_exepath \
@@ -465,26 +531,38 @@ for {set i 0} {$i < [llength $pbtype_flags]} {incr i} {
        pass "$test compiling -g $pbtype_mssg --types"
     }
     
-    verbose -log "spawn $stap_path -c $supbc_exepath -e \"probe process(\"$supbc_exepath\").mark(\"test_probe_4\") {printf(\"In %s dtrace probe %#x %#x\\n\", \$\$name, \$arg1->a, \$arg1->b)}\""
-    spawn $stap_path -c $supbc_exepath -e "probe process(\"$supbc_exepath\").mark(\"test_probe_4\") {printf(\"In %s dtrace probe %#x %#x\\n\", \$\$name, \$arg1->a, \$arg1->b)}"
-    expect {
-       -timeout 180
-       -re {In test_probe_4 dtrace probe 0x4 0x5} { incr ok; exp_continue }
-       timeout { fail "$test (timeout)" }
-       eof { }
-    }
-    catch {close}; catch {wait}
+    foreach runtime [get_runtime_list] {
+       set test_xtra ""
+       if {$runtime != ""} {
+           set test_xtra " ($runtime)"
+           verbose -log "spawn $stap_path --runtime=$runtime -c $supbc_exepath -e \"probe process(\"$supbc_exepath\").mark(\"test_probe_4\") {printf(\"In %s dtrace probe %#x %#x\\n\", \$\$name, \$arg1->a, \$arg1->b)}\""
+           spawn $stap_path --runtime=$runtime -c $supbc_exepath -e "probe process(\"$supbc_exepath\").mark(\"test_probe_4\") {printf(\"In %s dtrace probe %#x %#x\\n\", \$\$name, \$arg1->a, \$arg1->b)}"
+       } elseif {[uprobes_p]} {
+           verbose -log "spawn $stap_path -c $supbc_exepath -e \"probe process(\"$supbc_exepath\").mark(\"test_probe_4\") {printf(\"In %s dtrace probe %#x %#x\\n\", \$\$name, \$arg1->a, \$arg1->b)}\""
+           spawn $stap_path -c $supbc_exepath -e "probe process(\"$supbc_exepath\").mark(\"test_probe_4\") {printf(\"In %s dtrace probe %#x %#x\\n\", \$\$name, \$arg1->a, \$arg1->b)}"
+       } else {
+           untested "$test $pbtype_mssg --types"
+           continue
+       }
+       set ok 0
+       expect {
+           -timeout 180
+           -re {In test_probe_4 dtrace probe 0x4 0x5} { incr ok; exp_continue }
+           timeout { fail "$test (timeout)" }
+           eof { }
+       }
+       catch {close}; catch {wait}
     
-    if {$ok == 1} {
-       pass "$test $pbtype_mssg --types"
-    } else {
-       if {[istarget "arm-*-*"] && $pbtype_mssg == "V2_uprobe"} {
-           xfail "$test ($ok) $pbtype_mssg --types"
+       if {$ok == 1} {
+           pass "$test ${pbtype_mssg}${test_xtra} --types"
        } else {
-           fail "$test ($ok) $pbtype_mssg --types"
+           if {[istarget "arm-*-*"] && $pbtype_mssg == "V2_uprobe"} {
+               xfail "$test ($ok) ${pbtype_mssg}${test_xtra} --types"
+           } else {
+               fail "$test ($ok) ${pbtype_mssg}${test_xtra} --types"
+           }
        }
     }
-    
 } ; # end pbtype_flags
 
 # 8. Test V3 asm support
@@ -502,44 +580,68 @@ if {[istarget "x86_64-*-*"] || [istarget "i*86-*-*"]} {
        pass "$test compiling sdt_asm.S"
     }
     
+    foreach runtime [get_runtime_list] {
+       set test_xtra ""
+       if {$runtime != ""} {
+           set test_xtra " ($runtime)"
+           verbose -log "spawn $stap_path --runtime=$runtime -c [pwd]/sdt_asm.x $srcdir/$subdir/sdt_asm.stp [pwd]/sdt_asm.x"
+           spawn $stap_path --runtime=$runtime -c [pwd]/sdt_asm.x $srcdir/$subdir/sdt_asm.stp [pwd]/sdt_asm.x
+       } elseif {[uprobes_p]} {
+           verbose -log "spawn $stap_path -c [pwd]/sdt_asm.x $srcdir/$subdir/sdt_asm.stp [pwd]/sdt_asm.x"
+           spawn $stap_path -c [pwd]/sdt_asm.x $srcdir/$subdir/sdt_asm.stp [pwd]/sdt_asm.x
+       } else {
+           untested "$test asm"
+           continue
+       }
+       set ok 0
+       set notok 0
+       set fail "asm"
+       expect {
+           -timeout 180
+           -re {FAIL: [a-z0-9]} { regexp " .*$" $expect_out(0,string) s;
+               incr notok; set fail "$fail $s"; exp_continue }
+           -re {PASS: [a-z0-9]} { incr ok; exp_continue }
+           timeout { fail "$test (timeout)" }
+           eof { }
+       }
+       catch {close}; catch {wait}
+    
+       if { $notok != 0 || $ok == 0} {
+           fail "$test asm${test_xtra} ($ok) $fail"
+       } else {
+           pass "$test asm${test_xtra} ($ok)"
+       }
+    }
+} ; # x86_64 | i.86
+
+foreach runtime [get_runtime_list] {
+    set test_xtra ""
+    if {$runtime != ""} {
+       set test_xtra " ($runtime)"
+       verbose -log "spawn $stap_path --runtime=$runtime -c ./sdt_misc_V3_uprobe.x -e \"probe process(\"./sdt_misc_V3_uprobe.x\").mark(\"test_probe_5\") {printf(\"%s %s %s\\n\", \$\$provider, \$\$name, \$\$parms)}\""
+       spawn $stap_path --runtime=$runtime -c ./sdt_misc_V3_uprobe.x -e "probe process(\"./sdt_misc_V3_uprobe.x\").mark(\"test_probe_3\") {printf(\"%s %s %s\\n\", \$\$provider, \$\$name, \$\$parms)}"
+    } elseif {[uprobes_p]} {
+       verbose -log "spawn $stap_path -c ./sdt_misc_V3_uprobe.x -e \"probe process(\"./sdt_misc_V3_uprobe.x\").mark(\"test_probe_5\") {printf(\"%s %s %s\\n\", \$\$provider, \$\$name, \$\$parms)}\""
+       spawn $stap_path -c ./sdt_misc_V3_uprobe.x -e "probe process(\"./sdt_misc_V3_uprobe.x\").mark(\"test_probe_3\") {printf(\"%s %s %s\\n\", \$\$provider, \$\$name, \$\$parms)}"
+    } else {
+       untested "$test \$\$parms"
+       continue
+    }
     set ok 0
-    set notok 0
-    set fail "asm"
-    verbose -log "spawn $stap_path -c [pwd]/sdt_asm.x $srcdir/$subdir/sdt_asm.stp [pwd]/sdt_asm.x"
-    spawn $stap_path -c [pwd]/sdt_asm.x $srcdir/$subdir/sdt_asm.stp [pwd]/sdt_asm.x
     expect {
        -timeout 180
-       -re {FAIL: [a-z0-9]} { regexp " .*$" $expect_out(0,string) s;
-           incr notok; set fail "$fail $s"; exp_continue }
-       -re {PASS: [a-z0-9]} { incr ok; exp_continue }
+       -re {sdt_misc test_probe_3 \$arg1=0x3 \$arg2=0x[0-9a-f][0-9a-f]} {
+           incr ok; exp_continue }
        timeout { fail "$test (timeout)" }
        eof { }
     }
     catch {close}; catch {wait}
-    
-    if { $notok != 0 || $ok == 0} {
-       fail "$test asm ($ok) $fail"
+
+    if {$ok == 1} {
+       pass "$test \$\$parms${test_xtra}"
     } else {
-       pass "$test asm ($ok)"
+       fail "$test ($ok) \$\$parms${test_xtra}"
     }
-} ; # x86_64 | i.86
-
-set ok 0
-verbose -log "spawn $stap_path -c ./sdt_misc_V3_uprobe.x -e \"probe process(\"./sdt_misc_V3_uprobe.x\").mark(\"test_probe_5\") {printf(\"%s %s %s\\n\", \$\$provider, \$\$name, \$\$parms)}\""
-spawn $stap_path -c ./sdt_misc_V3_uprobe.x -e "probe process(\"./sdt_misc_V3_uprobe.x\").mark(\"test_probe_3\") {printf(\"%s %s %s\\n\", \$\$provider, \$\$name, \$\$parms)}"
-expect {
-    -timeout 180
-    -re {sdt_misc test_probe_3 \$arg1=0x3 \$arg2=0x[0-9a-f][0-9a-f]} {
-       incr ok; exp_continue }
-    timeout { fail "$test (timeout)" }
-    eof { }
-}
-catch {close}; catch {wait}
-
-if {$ok == 1} {
-    pass "$test \$\$parms"
-} else {
-    fail "$test ($ok) \$\$parms"
 }
 
 cleanup_handler $verbose
index c7d7a8951d48a077ca6941b98cff5a400aad3b04..8d8a6fa30229c581a65f906bc4c25ec19cfc386a 100644 (file)
@@ -54,10 +54,21 @@ if { $res != "" } {
     pass "compiling $test.c $extra_mssg"
 }
 
-if {[installtest_p] && [utrace_p] && [uprobes_p]} {
-  stap_run3 "$test $extra_mssg" -w $srcdir/$subdir/sdt.stp $testprog -c ./$testprog
+if {[installtest_p]} {
+    foreach runtime [get_runtime_list] {
+       if {$runtime != ""} {
+           stap_run3 "$test $extra_mssg ($runtime)" \
+               --runtime=$runtime -w $srcdir/$subdir/sdt.stp \
+               $testprog -c ./$testprog
+       } elseif {[uprobes_p]} {
+           stap_run3 "$test $extra_mssg" -w $srcdir/$subdir/sdt.stp \
+               $testprog -c ./$testprog
+       } else {
+           untested "$test $extra_mssg"
+       }
+    }
 } else {
-  untested "$test $extra_mssg"
+    untested "$test $extra_mssg"
 }
 catch {exec rm -f $testprog}
 
index 6f1794376be774fdf0061c930a35b549cdffc361..d83cf02310f86602895e2be4af4054e191dfccc0 100644 (file)
@@ -6,4 +6,10 @@ set test "simple"
 #check to see whether get the marker indicating the probe is loaded and running
 #should check to see whether exited for some reason
 #should be error is something else is printed.
-stap_run $srcdir/$subdir/$test.stp
+foreach runtime [get_runtime_list] {
+    if {$runtime != ""} {
+       stap_run $srcdir/$subdir/$test.stp "" "" --runtime=$runtime
+    } else {
+       stap_run $srcdir/$subdir/$test.stp
+    }
+}
index 5484f00494fecfae7066bf5a2af374b355c68080..9a4f2eb08d3e5ccc3231d89168ad1d0025f78ec4 100644 (file)
@@ -1,46 +1,68 @@
 set test "stmt_rel_user"
 
+proc dyninst_kfails {index} {
+    # The dyninst runtime isn't multi-arch, it only works on the
+    # native architecture. PR14490.
+    if {! [all_compile_flag_native_p $index]} {
+       setup_kfail 14490 "*-*-*"
+    }
+}
+
 # Compile with inlining and check we can set a relative statement there
 for {set i 0} {$i < [all_compile_flags]} {incr i} {
-  set extra_flag [all_compile_flag $i]
-  set extra_name [all_compile_flag_name $i]
-
-  set ok 0
-  set rel_flags "additional_flags=-Wall additional_flags=-Werror"
-  set rel_flags "$rel_flags additional_flags=-Winline"
-  set rel_flags "$rel_flags additional_flags=-g"
-  set rel_flags "$rel_flags $extra_flag"
-  set res [target_compile $srcdir/$subdir/stmt_rel.c [pwd]/stmt_rel.x executable $rel_flags]
-  if { $res != "" } {
-      verbose "target_compile failed: $res" 2
-      fail "$test-$extra_name compiling"
-      cleanup_handler $verbose
-      continue
-  } else {
-      pass "$test-$extra_name compiling"
-  }
-
-  if {![installtest_p]} { untested "$test-$extra_name"; return }
-  if {![uprobes_p]} { untested "$test-$extra_name"; return }
-
-  spawn stap -c ./stmt_rel.x -e "probe process(\"./stmt_rel.x\").statement(\"Move@stmt_rel.c+1\") {printf(\"Move %d\\n\",\$s1)}"
-  expect {
-      -timeout 180
-      -re {Move [0-9]} { incr ok; exp_continue }
-      timeout { fail "$test-$extra_name (timeout)" }
-      eof { }
-  }
-  catch {close}; catch {wait}
-
-  # PR13430 when optimizing we fail to set probes on all inlined lines.
-  if { [string first "O" $extra_name] != -1 } {
-    setup_kfail 13430 "*-*-*" 
-  }
+    set extra_flag [all_compile_flag $i]
+    set extra_name [all_compile_flag_name $i]
+    
+    set rel_flags "additional_flags=-Wall additional_flags=-Werror"
+    set rel_flags "$rel_flags additional_flags=-Winline"
+    set rel_flags "$rel_flags additional_flags=-g"
+    set rel_flags "$rel_flags $extra_flag"
+    set res [target_compile $srcdir/$subdir/stmt_rel.c [pwd]/stmt_rel.x executable $rel_flags]
+    if { $res != "" } {
+       verbose "target_compile failed: $res" 2
+       fail "$test-$extra_name compiling"
+       cleanup_handler $verbose
+       continue
+    } else {
+       pass "$test-$extra_name compiling"
+    }
+    
+    if {![installtest_p]} { untested "$test-$extra_name"; return }
+    
+    foreach runtime [get_runtime_list] {
+       if {$runtime != ""} {
+           set test_name "$test-$extra_name-$runtime"
+           if { [info procs ${runtime}_kfails] ne "" } {
+               ${runtime}_kfails $i
+           }
+           spawn stap --runtime=$runtime -c ./stmt_rel.x -e "probe process(\"./stmt_rel.x\").statement(\"Move@stmt_rel.c+1\") {printf(\"Move %d\\n\",\$s1)}"
+       } elseif {[uprobes_p]} {
+           set test_name "$test-$extra_name"
+           spawn stap -c ./stmt_rel.x -e "probe process(\"./stmt_rel.x\").statement(\"Move@stmt_rel.c+1\") {printf(\"Move %d\\n\",\$s1)}"
+       } else {
+           untested "$test-$extra_name"
+           continue
+       }
 
-  # A hanoi tower needs 2^n - 1 moves (n == 14 in the test program)
-  if { $ok == 16383 } {
-      pass "$test-$extra_name"
-  } else {
-      fail "$test-$extra_name ($ok)"
-  }
+       set ok 0
+       expect {
+           -timeout 180
+           -re {Move [0-9]} { incr ok; exp_continue }
+           timeout { fail "$test_name (timeout)" }
+           eof { }
+       }
+       catch {close}; catch {wait}
+       
+       # PR13430 when optimizing we fail to set probes on all inlined lines.
+       if { [string first "O" $extra_name] != -1 } {
+           setup_kfail 13430 "*-*-*" 
+       }
+       
+       # A hanoi tower needs 2^n - 1 moves (n == 14 in the test program)
+       if { $ok == 16383 } {
+           pass "$test_name"
+       } else {
+           fail "$test_name ($ok)"
+       }
+    }
 }
index 237b388a1bcf842135f2f645ba2d6c294a296894..5726498363196ba9556de3d89e1965293eabbd4c 100644 (file)
@@ -2,45 +2,58 @@ set test "suppress-time-limit"
 
 if {! [installtest_p]} { untested "$test"; return }
 
-spawn stap -g --suppress-time-limits $srcdir/$subdir/$test.stp
-set ok 0
-set ko 0
-# Testing that -g --suppress-time-limits works properly
-# by looping 100000 time and confirming the number of iterations
-# to what we expect.
-# The default setting only allows for 10000, so we want to test
-# against a value significantly larger than that.
-expect {
-    -timeout 30
-    -re {^100000\r\n} { incr ok; exp_continue }
-    timeout { fail "$test active (timeout)" }
-    eof { }
-}
-catch {close}; catch {wait}
-# The actual comparing of active values to what we expect.
-# For debugging purposes, output the value of the variables
-# so we can see which value failed (if any)
-if {$ok == 1} then {
-    pass "$test active ($ok)"
-} else {
-    fail "$test active ($ok)"
-}
-# Testing the case which should fail, without the new option,
-# and comparing the number of iterations to what we expect (ie 9997).
-spawn stap $srcdir/$subdir/$test.stp
-expect {
-    -timeout 30
-    -re {^ERROR:[^\r\n]*\r\n} { incr ko; exp_continue }
-    -re {^9997\r\n} { incr ko; exp_continue }
-    eof { }
-    timeout { fail "$test passive (timeout)" }
-}
-catch {close}; catch {wait}
-# The actual comparing of passive values to what we expect.
-# For debugging purposes, output the value of the variables
-# so we can see which value failed (if any)
-if {$ko == 2} then {
-    pass "$test passive ($ko)"
-} else {
-    fail "$test passive ($ko)"
+foreach runtime [get_runtime_list] {
+    set test_extra ""
+    if {$runtime != ""} {
+       set test_extra " ($runtime)"
+       spawn stap --runtime=$runtime -g --suppress-time-limits \
+           $srcdir/$subdir/$test.stp
+    } else {
+       spawn stap -g --suppress-time-limits $srcdir/$subdir/$test.stp
+    }
+    set ok 0
+    set ko 0
+    # Testing that -g --suppress-time-limits works properly
+    # by looping 100000 time and confirming the number of iterations
+    # to what we expect.
+    # The default setting only allows for 10000, so we want to test
+    # against a value significantly larger than that.
+    expect {
+       -timeout 30
+       -re {^100000\r\n} { incr ok; exp_continue }
+       timeout { fail "$test active${test_extra} (timeout)" }
+       eof { }
+    }
+    catch {close}; catch {wait}
+    # The actual comparing of active values to what we expect.
+    # For debugging purposes, output the value of the variables
+    # so we can see which value failed (if any)
+    if {$ok == 1} then {
+       pass "$test active${test_extra} ($ok)"
+    } else {
+       fail "$test active${test_extra} ($ok)"
+    }
+    # Testing the case which should fail, without the new option,
+    # and comparing the number of iterations to what we expect (ie 9997).
+    if {$runtime != ""} {
+       spawn stap --runtime=$runtime $srcdir/$subdir/$test.stp
+    } else {
+       spawn stap $srcdir/$subdir/$test.stp
+    }
+    expect {
+       -timeout 30
+       -re {^ERROR:[^\r\n]*\r\n} { incr ko; exp_continue }
+       -re {^9997\r\n} { incr ko; exp_continue }
+       eof { }
+       timeout { fail "$test passive${test_extra} (timeout)" }
+    }
+    catch {close}; catch {wait}
+    # The actual comparing of passive values to what we expect.
+    # For debugging purposes, output the value of the variables
+    # so we can see which value failed (if any)
+    if {$ko == 2} then {
+       pass "$test passive${test_extra} ($ko)"
+    } else {
+       fail "$test passive${test_extra} ($ko)"
+    }
 }
index 6b326ea801df098b71fe34d576e6af69d4721c06..c9802841caa2fe66fec5e0b5c987b338741663a2 100644 (file)
@@ -2,4 +2,11 @@
 
 set test "tri"
 
-stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string
+foreach runtime [get_runtime_list] {
+    if {$runtime != ""} {
+       stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \
+           --runtime=$runtime
+    } else {
+       stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string
+    }
+}
index 228e8fd862a3747a9787509c215e9b19c546c101..c39f67eee46287e6c46f77a9377ae7b297f3571d 100644 (file)
@@ -2,42 +2,53 @@ set test "trycatch"
 
 if {! [installtest_p]} { untested $test; return }
 
-set ok 0
-set ko 0
-spawn stap $srcdir/buildok/fortyone.stp
-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 {^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 { fail "$test (timeout)" }
-    eof { }
+foreach runtime [get_runtime_list] {
+    set test "trycatch"
+    set ok 0
+    set ko 0
+    if {$runtime != ""} {
+       lappend test "($runtime)"
+       spawn stap --runtime=$runtime $srcdir/buildok/fortyone.stp
+    } else {
+       spawn stap $srcdir/buildok/fortyone.stp
+    }
+    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 {^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 { fail "$test (timeout)" }
+       eof { }
+    }
+    catch {close}; catch {wait}
+    if {$ok == 13 && $ko == 0} then {pass $test} else {fail "$test ($ok $ko)"}
+
+    set test "trycatch -u"
+    set ok 0
+    set ko 0
+    if {$runtime != ""} {
+       lappend test "($runtime)"
+       spawn stap --runtime=$runtime -u $srcdir/buildok/fortyone.stp
+    } else {
+       spawn stap -u $srcdir/buildok/fortyone.stp
+    }
+    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 {^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 { fail "$test (timeout)" }
+       eof { }
+    }
+    catch {close}; catch {wait}
+    if {$ok == 13 && $ko == 0} then {pass $test} else {fail "$test ($ok $ko)"}
 }
-wait; catch { close } 
-if {$ok == 13 && $ko == 0} then {pass $test} else {fail "$test ($ok $ko)"}
-
-
-set test "trycatch -u"
-
-set ok 0
-set ko 0
-spawn stap -u $srcdir/buildok/fortyone.stp
-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 {^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 { fail "$test (timeout)" }
-    eof { }
-}
-wait; catch { close } 
-if {$ok == 13 && $ko == 0} then {pass $test} else {fail "$test ($ok $ko)"}
 
 
 
This page took 0.062277 seconds and 5 git commands to generate.