diff options
author | dsmith <dsmith> | 2008-02-04 21:14:20 +0000 |
---|---|---|
committer | dsmith <dsmith> | 2008-02-04 21:14:20 +0000 |
commit | 61e4ec4c74b7571ade18f93c5afdd40ac3d124af (patch) | |
tree | 5eb681d39c21f9065ba236dd2eabaad0220c6c22 | |
parent | 0a63c36f2d280cd6c8e1013a4262b4d4b12dcfb7 (diff) | |
download | systemtap-steved-61e4ec4c74b7571ade18f93c5afdd40ac3d124af.tar.gz systemtap-steved-61e4ec4c74b7571ade18f93c5afdd40ac3d124af.tar.xz systemtap-steved-61e4ec4c74b7571ade18f93c5afdd40ac3d124af.zip |
2008-02-04 David Smith <dsmith@redhat.com>
PR 4446.
* systemtap.base/marker.exp: Added tests for marker "$format"
variable.
-rw-r--r-- | testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | testsuite/systemtap.base/marker.exp | 46 |
2 files changed, 51 insertions, 1 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 65d656e0..0f804ee0 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-02-04 David Smith <dsmith@redhat.com> + + PR 4446. + * systemtap.base/marker.exp: Added tests for marker "$format" + variable. + 2008-02-01 Martin Hunt <hunt@redhat.com> PR4736 * systemtap.printf/stap_merge.tcl: Copied here so diff --git a/testsuite/systemtap.base/marker.exp b/testsuite/systemtap.base/marker.exp index bfa3b02d..59d6fd33 100644 --- a/testsuite/systemtap.base/marker.exp +++ b/testsuite/systemtap.base/marker.exp @@ -11,7 +11,7 @@ proc stap_compile { TEST_NAME compile script args } { set cmd [concat {stap -v -p4 -e} $script $args] - puts "running $cmd" + verbose -log "running $cmd" eval spawn $cmd set compile_errors 0 expect { @@ -192,3 +192,47 @@ if {$kernel_markers_found == 0} { set script [format $kernel_script_arg3 $num_marker_name {\[0\]}] stap_compile $TEST_NAME 0 $script } + +set TEST_NAME "K_MARKER11" +if {$kernel_markers_found == 0} { + untested "$TEST_NAME : no kernel markers present" +} else { + # Try compiling a script that prints the format string of a + # marker. + set script [format $kernel_script_arg \ + [lindex $kernel_marker_names 0] {\$format}] + stap_compile $TEST_NAME 1 $script +} + +set TEST_NAME "K_MARKER12" +if {$kernel_markers_found == 0} { + untested "$TEST_NAME : no kernel markers present" +} else { + # Try compiling a script that writes to a marker format string + # (which isn't allowed). + set script [format $kernel_script_arg2 \ + [lindex $kernel_marker_names 0] {\$format}] + stap_compile $TEST_NAME 0 $script +} + +set TEST_NAME "K_MARKER13" +if {$kernel_markers_found == 0} { + untested "$TEST_NAME : no kernel markers present" +} else { + # Try compiling a script that treats the marker format string as a + # structure (which isn't allowed). + set script [format $kernel_script_arg \ + [lindex $kernel_marker_names 0] {\$format->foo}] + stap_compile $TEST_NAME 0 $script +} + +set TEST_NAME "K_MARKER14" +if {$kernel_markers_found == 0} { + untested "$TEST_NAME : no kernel markers present" +} else { + # Try compiling a script that treats the marker format string like + # an array (which isn't allowed). + set script [format $kernel_script_arg \ + [lindex $kernel_marker_names 0] {\$format\[0\]}] + stap_compile $TEST_NAME 0 $script +} |