diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-08-06 12:06:06 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-08-06 12:06:06 -0400 |
commit | 3c4371661f144c331dd55ee6be8dab57ec2323c8 (patch) | |
tree | 217ccf5864840f14670138b592d90eceacc75fa3 /testsuite/systemtap.examples | |
parent | 44ab6f3be72e7b5eeaa2514cea0553b87007ee9c (diff) | |
parent | 0317fad416059781b7a152296c1d8b5a012bf925 (diff) | |
download | systemtap-steved-3c4371661f144c331dd55ee6be8dab57ec2323c8.tar.gz systemtap-steved-3c4371661f144c331dd55ee6be8dab57ec2323c8.tar.xz systemtap-steved-3c4371661f144c331dd55ee6be8dab57ec2323c8.zip |
Merge commit 'origin/master' into pr4225
* commit 'origin/master':
Use relative instead of absolute line. (bug 6611)
move post-0.7 news tidbit to the top
Add test for $$vars, $$params, $$locals.
typographical tweaks for embedded script code
Add $$vars, $$parms, $$locals
Rename $path to $pathname of syscall tapset for 2.6.27
Correct several tests for 2.6.27
c code generation: assert C indentation/nesting cancels out at appropriate points
Tweak test_installcheck for helloworld.meta and traceio2.meta.
Run both tests for installcheck tests.
No need for random suffix file cmdline and sysinfo files in the
Ensure that a systemtap server is available if 'server' is specified
session.h (struct systemtap_session): Added itrace_derived_probe
* syscalls2.stp: Add sys_unlinkat.
Fix on_each_cpu() call for kernels >2.6.26.
Remove unused STAPCONF_MODULE_NSECTIONS
Diffstat (limited to 'testsuite/systemtap.examples')
-rw-r--r-- | testsuite/systemtap.examples/ChangeLog | 8 | ||||
-rw-r--r-- | testsuite/systemtap.examples/check.exp | 44 | ||||
-rw-r--r-- | testsuite/systemtap.examples/helloworld.meta | 2 | ||||
-rw-r--r-- | testsuite/systemtap.examples/traceio2.meta | 2 |
4 files changed, 33 insertions, 23 deletions
diff --git a/testsuite/systemtap.examples/ChangeLog b/testsuite/systemtap.examples/ChangeLog index d75ad014..7cb39fb9 100644 --- a/testsuite/systemtap.examples/ChangeLog +++ b/testsuite/systemtap.examples/ChangeLog @@ -1,3 +1,11 @@ +2008-08-01 William Cohen <wcohen@redhat.com> + + * helloworld.meta, traceio2.meta: Tweak test_installcheck. + +2008-08-01 William Cohen <wcohen@redhat.com> + + * check.exp: Run both tests for installcheck tests. + 2008-07-11 Mark Wielaard <mwielaard@redhat.com> * traceio.meta: s/decending/descending/ in description. diff --git a/testsuite/systemtap.examples/check.exp b/testsuite/systemtap.examples/check.exp index 2ac43050..14d9a57e 100644 --- a/testsuite/systemtap.examples/check.exp +++ b/testsuite/systemtap.examples/check.exp @@ -32,6 +32,23 @@ proc extract_tag { META_DATA TAG } { return $value } +proc run_command { test command } { + #FIXME tcl says that single quotes not dealt with + if { $command != "" } then { + verbose -log "attempting command $command" + set res [catch {eval exec $command} value] + verbose -log "OUT $value" + verbose -log "RC $res" + if {$res != 0 } { + fail $test + } else { + pass $test + } + } else { + untested $test + } +} + set curdir [pwd] set src_examples $srcdir/systemtap.examples @@ -39,36 +56,21 @@ set meta_files [lsort [exec find $src_examples -path "*.meta"]] foreach file $meta_files { set dir [file dirname $file] set test [regsub {.*/testsuite/} $file ""] + set test [regsub {.meta} $test ""] cd $dir set meta_data [get_meta_data $file] set test_check [extract_tag "$meta_data" "test_check"] + set command $test_check + run_command "$test build" $command set test_installcheck [extract_tag "$meta_data" "test_installcheck"] - # Would like to run the tests (-p5), but pass fail logic too - # simple and fails for many examples - # FIXME following line prevents installcheck with "--tools_opts install" - set test_installcheck "" + # The pass/fail logic too simple and fails for some examples + # FIXME would like to be able to run more complicated test code if {[info procs installtest_p] != "" && [installtest_p] && $test_installcheck != "" } then { set command $test_installcheck - } else { - set command $test_check - } - - #FIXME tcl says that single quotes not dealt with - if { $command != "" } then { - verbose -log "attempting command $command" - set res [catch {eval exec $command} value] - verbose -log "OUT $value" - verbose -log "RC $res" - if {$res != 0 } { - fail $test - } else { - pass $test - } - } else { - untested $test + run_command "$test run" $command } } diff --git a/testsuite/systemtap.examples/helloworld.meta b/testsuite/systemtap.examples/helloworld.meta index f56b7ca3..60bc53f2 100644 --- a/testsuite/systemtap.examples/helloworld.meta +++ b/testsuite/systemtap.examples/helloworld.meta @@ -10,4 +10,4 @@ output: text scope: system-wide description: A basic "Hello World" program implemented in SystemTap script. It prints out "hello world" message and then immediately exits. test_check: stap -p4 helloworld.stp -test_installcheck: stap helloworld.stp -c "sleep 1" +test_installcheck: stap helloworld.stp diff --git a/testsuite/systemtap.examples/traceio2.meta b/testsuite/systemtap.examples/traceio2.meta index e6bca1a9..4b63108c 100644 --- a/testsuite/systemtap.examples/traceio2.meta +++ b/testsuite/systemtap.examples/traceio2.meta @@ -10,4 +10,4 @@ output: trace scope: system-wide description: Print out the executable name and process number as reads and writes to the specified device occur. test_check: stap -p4 traceio2.stp 0x0801 -test_installcheck: /bin/sh eval stap traceio2.stp 0x0801 -c "sleep 1" +test_installcheck: stap traceio2.stp 0x0801 -c "sleep 1" |