summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/marker.exp
diff options
context:
space:
mode:
authordsmith <dsmith>2008-02-04 21:14:20 +0000
committerdsmith <dsmith>2008-02-04 21:14:20 +0000
commit61e4ec4c74b7571ade18f93c5afdd40ac3d124af (patch)
tree5eb681d39c21f9065ba236dd2eabaad0220c6c22 /testsuite/systemtap.base/marker.exp
parent0a63c36f2d280cd6c8e1013a4262b4d4b12dcfb7 (diff)
downloadsystemtap-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.
Diffstat (limited to 'testsuite/systemtap.base/marker.exp')
-rw-r--r--testsuite/systemtap.base/marker.exp46
1 files changed, 45 insertions, 1 deletions
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
+}