Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/testsuite/systemtap.base/return_no_val.exp b/testsuite/systemtap.base/return_no_val.exp
- index d3533712d..4c61cce6a 100644
- --- a/testsuite/systemtap.base/return_no_val.exp
- +++ b/testsuite/systemtap.base/return_no_val.exp
- @@ -393,3 +393,513 @@ if {$failed} {
- if {$stderr ne ""} {
- send_log "stderr:\n$stderr"
- }
- +
- +# --- TEST 10 ---
- +
- +set subtest10 "TEST 10: 'return' right before 'if'"
- +foreach runtime [get_runtime_list] {
- + if {$runtime eq ""} {
- + set runtime "kernel"
- + }
- + set test_name "$test: $subtest10 ($runtime)"
- +
- + set cmd "stap --runtime=$runtime '$srcdir/$subdir/${test}_10.stp'"
- + send_log "executing: $cmd\n"
- + set pipe [open "| sh -c {$cmd}" r]
- + set out [read $pipe]
- + set failed 0
- + if {[catch {close $pipe} stderr] != 0} {
- + if {$stderr ne "" && [string index $stderr end] ne "\n"} {
- + append stderr "\n"
- + }
- + global errorCode
- + if {"CHILDSTATUS" == [lindex $errorCode 0]} {
- + set failed [lindex $errorCode 2]
- + }
- + }
- +
- + set exp_out ""
- + regsub -all -- {\n} $exp_out {\n} escaped_exp_out
- + if {$out eq $exp_out} {
- + pass "${test_name}: stdout matches \"$escaped_exp_out\""
- + } else {
- + fail "${test_name}: stdout fails to match \"$escaped_exp_out\": got \"$out\""
- + }
- +
- + if {$failed} {
- + pass "${test_name}: exit code should be non-zero"
- + } else {
- + fail "${test_name}: exit code should be non-zero but is zero"
- + }
- +
- + set stderr_pat "^parse error: expected literal string or number
- + saw: keyword at \[^\\n\]*?\\.stp:4:5
- + source: if \\(1\\) \\\{
- + \\^
- +"
- + regsub -all -- {\n} $stderr_pat {\n} escaped_stderr_pat
- + if {[regexp -linestop -lineanchor -- $stderr_pat $stderr]} {
- + pass "${test_name}: stderr matches \"$escaped_stderr_pat\""
- + } else {
- + fail "${test_name}: stderr fails to match \"$escaped_stderr_pat\": got \"$stderr\""
- + }
- +}
- +
- +# --- TEST 11 ---
- +
- +set subtest11 "TEST 11: 'return' right before 'for'"
- +foreach runtime [get_runtime_list] {
- + if {$runtime eq ""} {
- + set runtime "kernel"
- + }
- + set test_name "$test: $subtest11 ($runtime)"
- +
- + set cmd "stap --runtime=$runtime '$srcdir/$subdir/${test}_11.stp'"
- + send_log "executing: $cmd\n"
- + set pipe [open "| sh -c {$cmd}" r]
- + set out [read $pipe]
- + set failed 0
- + if {[catch {close $pipe} stderr] != 0} {
- + if {$stderr ne "" && [string index $stderr end] ne "\n"} {
- + append stderr "\n"
- + }
- + global errorCode
- + if {"CHILDSTATUS" == [lindex $errorCode 0]} {
- + set failed [lindex $errorCode 2]
- + }
- + }
- +
- + set exp_out ""
- + regsub -all -- {\n} $exp_out {\n} escaped_exp_out
- + if {$out eq $exp_out} {
- + pass "${test_name}: stdout matches \"$escaped_exp_out\""
- + } else {
- + fail "${test_name}: stdout fails to match \"$escaped_exp_out\": got \"$out\""
- + }
- +
- + if {$failed} {
- + pass "${test_name}: exit code should be non-zero"
- + } else {
- + fail "${test_name}: exit code should be non-zero but is zero"
- + }
- +
- + set stderr_pat "^parse error: expected literal string or number
- + saw: keyword at \[^\\n\]*?\\.stp:4:5
- + source: for \\(;;\\) \\\{
- + \\^
- +"
- + regsub -all -- {\n} $stderr_pat {\n} escaped_stderr_pat
- + if {[regexp -linestop -lineanchor -- $stderr_pat $stderr]} {
- + pass "${test_name}: stderr matches \"$escaped_stderr_pat\""
- + } else {
- + fail "${test_name}: stderr fails to match \"$escaped_stderr_pat\": got \"$stderr\""
- + }
- +}
- +
- +# --- TEST 12 ---
- +
- +set subtest12 "TEST 12: 'return' right before 'while'"
- +foreach runtime [get_runtime_list] {
- + if {$runtime eq ""} {
- + set runtime "kernel"
- + }
- + set test_name "$test: $subtest12 ($runtime)"
- +
- + set cmd "stap --runtime=$runtime '$srcdir/$subdir/${test}_12.stp'"
- + send_log "executing: $cmd\n"
- + set pipe [open "| sh -c {$cmd}" r]
- + set out [read $pipe]
- + set failed 0
- + if {[catch {close $pipe} stderr] != 0} {
- + if {$stderr ne "" && [string index $stderr end] ne "\n"} {
- + append stderr "\n"
- + }
- + global errorCode
- + if {"CHILDSTATUS" == [lindex $errorCode 0]} {
- + set failed [lindex $errorCode 2]
- + }
- + }
- +
- + set exp_out ""
- + regsub -all -- {\n} $exp_out {\n} escaped_exp_out
- + if {$out eq $exp_out} {
- + pass "${test_name}: stdout matches \"$escaped_exp_out\""
- + } else {
- + fail "${test_name}: stdout fails to match \"$escaped_exp_out\": got \"$out\""
- + }
- +
- + if {$failed} {
- + pass "${test_name}: exit code should be non-zero"
- + } else {
- + fail "${test_name}: exit code should be non-zero but is zero"
- + }
- +
- + set stderr_pat "^parse error: expected literal string or number
- + saw: keyword at \[^\\n\]*?\\.stp:4:5
- + source: while \\(1\\) \\\{
- + \\^
- +"
- + regsub -all -- {\n} $stderr_pat {\n} escaped_stderr_pat
- + if {[regexp -linestop -lineanchor -- $stderr_pat $stderr]} {
- + pass "${test_name}: stderr matches \"$escaped_stderr_pat\""
- + } else {
- + fail "${test_name}: stderr fails to match \"$escaped_stderr_pat\": got \"$stderr\""
- + }
- +}
- +
- +# --- TEST 13 ---
- +
- +set subtest13 "TEST 13: 'return' right before 'foreach'"
- +foreach runtime [get_runtime_list] {
- + if {$runtime eq ""} {
- + set runtime "kernel"
- + }
- + set test_name "$test: $subtest13 ($runtime)"
- +
- + set cmd "stap --runtime=$runtime '$srcdir/$subdir/${test}_13.stp'"
- + send_log "executing: $cmd\n"
- + set pipe [open "| sh -c {$cmd}" r]
- + set out [read $pipe]
- + set failed 0
- + if {[catch {close $pipe} stderr] != 0} {
- + if {$stderr ne "" && [string index $stderr end] ne "\n"} {
- + append stderr "\n"
- + }
- + global errorCode
- + if {"CHILDSTATUS" == [lindex $errorCode 0]} {
- + set failed [lindex $errorCode 2]
- + }
- + }
- +
- + set exp_out ""
- + regsub -all -- {\n} $exp_out {\n} escaped_exp_out
- + if {$out eq $exp_out} {
- + pass "${test_name}: stdout matches \"$escaped_exp_out\""
- + } else {
- + fail "${test_name}: stdout fails to match \"$escaped_exp_out\": got \"$out\""
- + }
- +
- + if {$failed} {
- + pass "${test_name}: exit code should be non-zero"
- + } else {
- + fail "${test_name}: exit code should be non-zero but is zero"
- + }
- +
- + set stderr_pat "^parse error: expected literal string or number
- + saw: keyword at \[^\\n\]*?\\.stp:6:5
- + source: foreach \\(k in a\\) \\\{
- + \\^
- +"
- + regsub -all -- {\n} $stderr_pat {\n} escaped_stderr_pat
- + if {[regexp -linestop -lineanchor -- $stderr_pat $stderr]} {
- + pass "${test_name}: stderr matches \"$escaped_stderr_pat\""
- + } else {
- + fail "${test_name}: stderr fails to match \"$escaped_stderr_pat\": got \"$stderr\""
- + }
- +}
- +
- +# --- TEST 14 ---
- +
- +set subtest14 "TEST 14: 'return' right before 'return'"
- +foreach runtime [get_runtime_list] {
- + if {$runtime eq ""} {
- + set runtime "kernel"
- + }
- + set test_name "$test: $subtest14 ($runtime)"
- +
- + set cmd "stap --runtime=$runtime '$srcdir/$subdir/${test}_14.stp'"
- + send_log "executing: $cmd\n"
- + set pipe [open "| sh -c {$cmd}" r]
- + set out [read $pipe]
- + set failed 0
- + if {[catch {close $pipe} stderr] != 0} {
- + if {$stderr ne "" && [string index $stderr end] ne "\n"} {
- + append stderr "\n"
- + }
- + global errorCode
- + if {"CHILDSTATUS" == [lindex $errorCode 0]} {
- + set failed [lindex $errorCode 2]
- + }
- + }
- +
- + set exp_out ""
- + regsub -all -- {\n} $exp_out {\n} escaped_exp_out
- + if {$out eq $exp_out} {
- + pass "${test_name}: stdout matches \"$escaped_exp_out\""
- + } else {
- + fail "${test_name}: stdout fails to match \"$escaped_exp_out\": got \"$out\""
- + }
- +
- + if {$failed} {
- + pass "${test_name}: exit code should be non-zero"
- + } else {
- + fail "${test_name}: exit code should be non-zero but is zero"
- + }
- +
- + set stderr_pat "^parse error: expected literal string or number
- + saw: keyword at \[^\\n\]*?\\.stp:4:5
- + source: return
- + \\^
- +"
- + regsub -all -- {\n} $stderr_pat {\n} escaped_stderr_pat
- + if {[regexp -linestop -lineanchor -- $stderr_pat $stderr]} {
- + pass "${test_name}: stderr matches \"$escaped_stderr_pat\""
- + } else {
- + fail "${test_name}: stderr fails to match \"$escaped_stderr_pat\": got \"$stderr\""
- + }
- +}
- +
- +# --- TEST 15 ---
- +
- +set subtest15 "TEST 15: 'return' right before 'next'"
- +foreach runtime [get_runtime_list] {
- + if {$runtime eq ""} {
- + set runtime "kernel"
- + }
- + set test_name "$test: $subtest15 ($runtime)"
- +
- + set cmd "stap --runtime=$runtime '$srcdir/$subdir/${test}_15.stp'"
- + send_log "executing: $cmd\n"
- + set pipe [open "| sh -c {$cmd}" r]
- + set out [read $pipe]
- + set failed 0
- + if {[catch {close $pipe} stderr] != 0} {
- + if {$stderr ne "" && [string index $stderr end] ne "\n"} {
- + append stderr "\n"
- + }
- + global errorCode
- + if {"CHILDSTATUS" == [lindex $errorCode 0]} {
- + set failed [lindex $errorCode 2]
- + }
- + }
- +
- + set exp_out ""
- + regsub -all -- {\n} $exp_out {\n} escaped_exp_out
- + if {$out eq $exp_out} {
- + pass "${test_name}: stdout matches \"$escaped_exp_out\""
- + } else {
- + fail "${test_name}: stdout fails to match \"$escaped_exp_out\": got \"$out\""
- + }
- +
- + if {$failed} {
- + pass "${test_name}: exit code should be non-zero"
- + } else {
- + fail "${test_name}: exit code should be non-zero but is zero"
- + }
- +
- + set stderr_pat "^parse error: expected literal string or number
- + saw: keyword at \[^\\n\]*?\\.stp:4:5
- + source: next
- + \\^
- +"
- + regsub -all -- {\n} $stderr_pat {\n} escaped_stderr_pat
- + if {[regexp -linestop -lineanchor -- $stderr_pat $stderr]} {
- + pass "${test_name}: stderr matches \"$escaped_stderr_pat\""
- + } else {
- + fail "${test_name}: stderr fails to match \"$escaped_stderr_pat\": got \"$stderr\""
- + }
- +}
- +
- +# --- TEST 16 ---
- +
- +set subtest16 "TEST 16: 'return' right before 'delete'"
- +foreach runtime [get_runtime_list] {
- + if {$runtime eq ""} {
- + set runtime "kernel"
- + }
- + set test_name "$test: $subtest16 ($runtime)"
- +
- + set cmd "stap --runtime=$runtime '$srcdir/$subdir/${test}_16.stp'"
- + send_log "executing: $cmd\n"
- + set pipe [open "| sh -c {$cmd}" r]
- + set out [read $pipe]
- + set failed 0
- + if {[catch {close $pipe} stderr] != 0} {
- + if {$stderr ne "" && [string index $stderr end] ne "\n"} {
- + append stderr "\n"
- + }
- + global errorCode
- + if {"CHILDSTATUS" == [lindex $errorCode 0]} {
- + set failed [lindex $errorCode 2]
- + }
- + }
- +
- + set exp_out ""
- + regsub -all -- {\n} $exp_out {\n} escaped_exp_out
- + if {$out eq $exp_out} {
- + pass "${test_name}: stdout matches \"$escaped_exp_out\""
- + } else {
- + fail "${test_name}: stdout fails to match \"$escaped_exp_out\": got \"$out\""
- + }
- +
- + if {$failed} {
- + pass "${test_name}: exit code should be non-zero"
- + } else {
- + fail "${test_name}: exit code should be non-zero but is zero"
- + }
- +
- + set stderr_pat "^parse error: expected literal string or number
- + saw: keyword at \[^\\n\]*?\\.stp:6:5
- + source: delete a
- + \\^
- +"
- + regsub -all -- {\n} $stderr_pat {\n} escaped_stderr_pat
- + if {[regexp -linestop -lineanchor -- $stderr_pat $stderr]} {
- + pass "${test_name}: stderr matches \"$escaped_stderr_pat\""
- + } else {
- + fail "${test_name}: stderr fails to match \"$escaped_stderr_pat\": got \"$stderr\""
- + }
- +}
- +
- +# --- TEST 17 ---
- +
- +set subtest17 "TEST 17: 'return' right before 'try'"
- +foreach runtime [get_runtime_list] {
- + if {$runtime eq ""} {
- + set runtime "kernel"
- + }
- + set test_name "$test: $subtest17 ($runtime)"
- +
- + set cmd "stap --runtime=$runtime '$srcdir/$subdir/${test}_17.stp'"
- + send_log "executing: $cmd\n"
- + set pipe [open "| sh -c {$cmd}" r]
- + set out [read $pipe]
- + set failed 0
- + if {[catch {close $pipe} stderr] != 0} {
- + if {$stderr ne "" && [string index $stderr end] ne "\n"} {
- + append stderr "\n"
- + }
- + global errorCode
- + if {"CHILDSTATUS" == [lindex $errorCode 0]} {
- + set failed [lindex $errorCode 2]
- + }
- + }
- +
- + set exp_out ""
- + regsub -all -- {\n} $exp_out {\n} escaped_exp_out
- + if {$out eq $exp_out} {
- + pass "${test_name}: stdout matches \"$escaped_exp_out\""
- + } else {
- + fail "${test_name}: stdout fails to match \"$escaped_exp_out\": got \"$out\""
- + }
- +
- + if {$failed} {
- + pass "${test_name}: exit code should be non-zero"
- + } else {
- + fail "${test_name}: exit code should be non-zero but is zero"
- + }
- +
- + set stderr_pat "^parse error: expected literal string or number
- + saw: keyword at \[^\\n\]*?\\.stp:6:5
- + source: try \\\{
- + \\^
- +"
- + regsub -all -- {\n} $stderr_pat {\n} escaped_stderr_pat
- + if {[regexp -linestop -lineanchor -- $stderr_pat $stderr]} {
- + pass "${test_name}: stderr matches \"$escaped_stderr_pat\""
- + } else {
- + fail "${test_name}: stderr fails to match \"$escaped_stderr_pat\": got \"$stderr\""
- + }
- +}
- +
- +# --- TEST 18 ---
- +
- +set subtest18 "TEST 18: 'return' right before 'break'"
- +foreach runtime [get_runtime_list] {
- + if {$runtime eq ""} {
- + set runtime "kernel"
- + }
- + set test_name "$test: $subtest18 ($runtime)"
- +
- + set cmd "stap --runtime=$runtime '$srcdir/$subdir/${test}_18.stp'"
- + send_log "executing: $cmd\n"
- + set pipe [open "| sh -c {$cmd}" r]
- + set out [read $pipe]
- + set failed 0
- + if {[catch {close $pipe} stderr] != 0} {
- + if {$stderr ne "" && [string index $stderr end] ne "\n"} {
- + append stderr "\n"
- + }
- + global errorCode
- + if {"CHILDSTATUS" == [lindex $errorCode 0]} {
- + set failed [lindex $errorCode 2]
- + }
- + }
- +
- + set exp_out ""
- + regsub -all -- {\n} $exp_out {\n} escaped_exp_out
- + if {$out eq $exp_out} {
- + pass "${test_name}: stdout matches \"$escaped_exp_out\""
- + } else {
- + fail "${test_name}: stdout fails to match \"$escaped_exp_out\": got \"$out\""
- + }
- +
- + if {$failed} {
- + pass "${test_name}: exit code should be non-zero"
- + } else {
- + fail "${test_name}: exit code should be non-zero but is zero"
- + }
- +
- + set stderr_pat "^parse error: expected literal string or number
- + saw: keyword at \[^\\n\]*?\\.stp:5:9
- + source: break
- + \\^
- +"
- + regsub -all -- {\n} $stderr_pat {\n} escaped_stderr_pat
- + if {[regexp -linestop -lineanchor -- $stderr_pat $stderr]} {
- + pass "${test_name}: stderr matches \"$escaped_stderr_pat\""
- + } else {
- + fail "${test_name}: stderr fails to match \"$escaped_stderr_pat\": got \"$stderr\""
- + }
- +}
- +
- +# --- TEST 19 ---
- +
- +set subtest19 "TEST 19: 'return' right before 'continue'"
- +foreach runtime [get_runtime_list] {
- + if {$runtime eq ""} {
- + set runtime "kernel"
- + }
- + set test_name "$test: $subtest19 ($runtime)"
- +
- + set cmd "stap --runtime=$runtime '$srcdir/$subdir/${test}_19.stp'"
- + send_log "executing: $cmd\n"
- + set pipe [open "| sh -c {$cmd}" r]
- + set out [read $pipe]
- + set failed 0
- + if {[catch {close $pipe} stderr] != 0} {
- + if {$stderr ne "" && [string index $stderr end] ne "\n"} {
- + append stderr "\n"
- + }
- + global errorCode
- + if {"CHILDSTATUS" == [lindex $errorCode 0]} {
- + set failed [lindex $errorCode 2]
- + }
- + }
- +
- + set exp_out ""
- + regsub -all -- {\n} $exp_out {\n} escaped_exp_out
- + if {$out eq $exp_out} {
- + pass "${test_name}: stdout matches \"$escaped_exp_out\""
- + } else {
- + fail "${test_name}: stdout fails to match \"$escaped_exp_out\": got \"$out\""
- + }
- +
- + if {$failed} {
- + pass "${test_name}: exit code should be non-zero"
- + } else {
- + fail "${test_name}: exit code should be non-zero but is zero"
- + }
- +
- + set stderr_pat "^parse error: expected literal string or number
- + saw: keyword at \[^\\n\]*?\\.stp:5:9
- + source: continue
- + \\^
- +"
- + regsub -all -- {\n} $stderr_pat {\n} escaped_stderr_pat
- + if {[regexp -linestop -lineanchor -- $stderr_pat $stderr]} {
- + pass "${test_name}: stderr matches \"$escaped_stderr_pat\""
- + } else {
- + fail "${test_name}: stderr fails to match \"$escaped_stderr_pat\": got \"$stderr\""
- + }
- +}
- diff --git a/testsuite/systemtap.base/return_no_val_10.stp b/testsuite/systemtap.base/return_no_val_10.stp
- index b30ddc126..2f6d42bd0 100644
- --- a/testsuite/systemtap.base/return_no_val_10.stp
- +++ b/testsuite/systemtap.base/return_no_val_10.stp
- @@ -1,7 +1,9 @@
- function f() {
- println("enter f");
- return
- - next
- + if (1) {
- + println("leave f");
- + }
- }
- probe oneshot {
- diff --git a/testsuite/systemtap.base/return_no_val_11.stp b/testsuite/systemtap.base/return_no_val_11.stp
- index 0de8a2c81..1f6529ea8 100644
- --- a/testsuite/systemtap.base/return_no_val_11.stp
- +++ b/testsuite/systemtap.base/return_no_val_11.stp
- @@ -1,12 +1,13 @@
- -global a
- function f() {
- println("enter f");
- - a[1] = 3
- return
- - delete a
- + for (;;) {
- + println("leave f");
- + return
- + }
- }
- probe oneshot {
- f();
- - printf("a[1] = %d\n", a[1]);
- + printf("exit\n");
- }
- diff --git a/testsuite/systemtap.base/return_no_val_12.stp b/testsuite/systemtap.base/return_no_val_12.stp
- index 2f28e5df4..4d243bf56 100644
- --- a/testsuite/systemtap.base/return_no_val_12.stp
- +++ b/testsuite/systemtap.base/return_no_val_12.stp
- @@ -1,14 +1,13 @@
- -global a
- function f() {
- println("enter f");
- - a[1] = 3
- return
- - try {
- - delete a
- - } catch {}
- + while (1) {
- + println("leave f");
- + return
- + }
- }
- probe oneshot {
- f();
- - printf("a[1] = %d\n", a[1]);
- + printf("exit\n");
- }
- diff --git a/testsuite/systemtap.base/return_no_val_13.stp b/testsuite/systemtap.base/return_no_val_13.stp
- index cd64295c0..6291e0c63 100644
- --- a/testsuite/systemtap.base/return_no_val_13.stp
- +++ b/testsuite/systemtap.base/return_no_val_13.stp
- @@ -1,12 +1,15 @@
- +global a
- function f() {
- - while (1) {
- - println("enter f");
- + println("enter f");
- + a[1] = 3
- + return
- + foreach (k in a) {
- + println("k: ", k);
- return
- - break
- }
- }
- probe oneshot {
- f();
- - printf("exit\n");
- + printf("a[1] = %d\n", a[1]);
- }
- diff --git a/testsuite/systemtap.base/return_no_val_14.stp b/testsuite/systemtap.base/return_no_val_14.stp
- index b4a5d942a..b1d33d5c6 100644
- --- a/testsuite/systemtap.base/return_no_val_14.stp
- +++ b/testsuite/systemtap.base/return_no_val_14.stp
- @@ -1,9 +1,7 @@
- function f() {
- - while (1) {
- - println("enter f");
- - return
- - continue
- - }
- + println("enter f");
- + return
- + return
- }
- probe oneshot {
- diff --git a/testsuite/systemtap.base/return_no_val_15.stp b/testsuite/systemtap.base/return_no_val_15.stp
- index 60fb3b622..b30ddc126 100644
- --- a/testsuite/systemtap.base/return_no_val_15.stp
- +++ b/testsuite/systemtap.base/return_no_val_15.stp
- @@ -1,7 +1,10 @@
- function f() {
- - return return
- + println("enter f");
- + return
- + next
- }
- probe oneshot {
- f();
- + printf("exit\n");
- }
- diff --git a/testsuite/systemtap.base/return_no_val_16.stp b/testsuite/systemtap.base/return_no_val_16.stp
- index 3bcfc2d94..0de8a2c81 100644
- --- a/testsuite/systemtap.base/return_no_val_16.stp
- +++ b/testsuite/systemtap.base/return_no_val_16.stp
- @@ -1,10 +1,12 @@
- +global a
- function f() {
- + println("enter f");
- + a[1] = 3
- return
- - if (1) {
- - println("leave f");
- - }
- + delete a
- }
- probe oneshot {
- f();
- + printf("a[1] = %d\n", a[1]);
- }
- diff --git a/testsuite/systemtap.base/return_no_val_17.stp b/testsuite/systemtap.base/return_no_val_17.stp
- index 4c2197676..2f28e5df4 100644
- --- a/testsuite/systemtap.base/return_no_val_17.stp
- +++ b/testsuite/systemtap.base/return_no_val_17.stp
- @@ -1,10 +1,14 @@
- +global a
- function f() {
- - if (1)
- - return
- - while (1)
- - next
- + println("enter f");
- + a[1] = 3
- + return
- + try {
- + delete a
- + } catch {}
- }
- probe oneshot {
- f();
- + printf("a[1] = %d\n", a[1]);
- }
- diff --git a/testsuite/systemtap.base/return_no_val_18.stp b/testsuite/systemtap.base/return_no_val_18.stp
- index cdd52826b..cd64295c0 100644
- --- a/testsuite/systemtap.base/return_no_val_18.stp
- +++ b/testsuite/systemtap.base/return_no_val_18.stp
- @@ -1,10 +1,12 @@
- function f() {
- - for (;;)
- + while (1) {
- + println("enter f");
- return
- - while (1)
- - next
- + break
- + }
- }
- probe oneshot {
- f();
- + printf("exit\n");
- }
- diff --git a/testsuite/systemtap.base/return_no_val_19.stp b/testsuite/systemtap.base/return_no_val_19.stp
- index 318deeeae..b4a5d942a 100644
- --- a/testsuite/systemtap.base/return_no_val_19.stp
- +++ b/testsuite/systemtap.base/return_no_val_19.stp
- @@ -1,9 +1,12 @@
- function f() {
- - while (1)
- + while (1) {
- + println("enter f");
- return
- - next
- + continue
- + }
- }
- probe oneshot {
- f();
- + printf("exit\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement