diff options
-rw-r--r-- | testsuite/systemtap.base/itrace.exp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/itrace.exp b/testsuite/systemtap.base/itrace.exp index e215bfe7..d330a337 100644 --- a/testsuite/systemtap.base/itrace.exp +++ b/testsuite/systemtap.base/itrace.exp @@ -48,6 +48,27 @@ set itrace2_script { } set itrace2_script_output "itraced = 5\r\n" +set itrace3_script { + global branches = 0 + probe begin + { + printf("systemtap starting probe\n") + printf("ATTENTION: if arch_has_block_step is not defined for this arch, this testcase will fail\n") + } + probe process("%s").insn.block + { + branches += 1 + if (branches == 5) + exit() + } + + + probe end { printf("systemtap ending probe\n") + printf("itraced block mode = %%d\n", branches) + } +} +set itrace3_script_output "itraced block mode = 5\r\n" + # Set up our own copy of /bin/ls, to make testing for a particular # executable easy. We can't use 'ln' here, since we might be creating @@ -99,5 +120,15 @@ if {$utrace_support_found == 0} { stap_run $TEST_NAME run_ls_5_sec $itrace2_script_output -e $script } +set TEST_NAME "itrace3" +if {$utrace_support_found == 0} { + untested "$TEST_NAME : no kernel utrace support found" +} elseif {![installtest_p]} { + untested $TEST_NAME +} else { + set script [format $itrace3_script $exepath] + stap_run $TEST_NAME run_ls_5_sec $itrace3_script_output -e $script +} + # Cleanup exec rm -f $exepath |