From 81bcf6d6dd9ce44667951bf6212b6b3c8febaf31 Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Fri, 11 Dec 2009 16:59:55 -0500 Subject: [PATCH] Use env(SYSTEMTAP_TESTAPPS) for all systemtap.apps mysql.exp: Use env(SYSTEMTAP_TESTAPPS). (mysqlrelease): Update and check for download failure. postgres.exp: Use env(SYSTEMTAP_TESTAPPS). stap-tcl.stp: Use .library("library").mark("mark"). tcl.exp: Likewise. --- testsuite/systemtap.apps/mysql.exp | 13 ++++++++++--- testsuite/systemtap.apps/postgres.exp | 6 ++++-- testsuite/systemtap.apps/stap-tcl.stp | 2 +- testsuite/systemtap.apps/tcl.exp | 6 ++++-- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/testsuite/systemtap.apps/mysql.exp b/testsuite/systemtap.apps/mysql.exp index efeffbaeb..497949c02 100644 --- a/testsuite/systemtap.apps/mysql.exp +++ b/testsuite/systemtap.apps/mysql.exp @@ -4,14 +4,16 @@ set test "mysql" global env -if {! [info exists env(SYSTEMTAP_TEST_SDT)]} { - unsupported "mysql (\"SYSTEMTAP_TEST_SDT\" not in env)" +if {! [info exists env(SYSTEMTAP_TESTAPPS)] || ( + ! [string match "tcl" $env(SYSTEMTAP_TESTAPPS)] && + ! [string match "all" $env(SYSTEMTAP_TESTAPPS)])} { + untested "$test sdt app" return } ########## Create /tmp/stap-mysql.stp ########## set msdata "[pwd]/stap-mysql" -set mysqlrelease "mysql-5.4.1-beta" +set mysqlrelease "mysql-5.4.3-beta" set mysqldir "[pwd]/mysql/install/" set testsuite "[pwd]" @@ -291,6 +293,11 @@ kill \$STAPPID if \[ ! -r $mysqlrelease.tar.gz \] ; then wget http://dev.mysql.com/get/Downloads/MySQL-5.4/$mysqlrelease.tar.gz/from/ftp://mirror.services.wisc.edu/mirrors/mysql/ fi +if \[ ! -r $mysqlrelease.tar.gz \] ; then + echo FAIL: wget $mysqlrelease.tar.gz + exit +fi + if \[ ! -d mysql/src \] ; then tar -x -z -f $mysqlrelease.tar.gz diff --git a/testsuite/systemtap.apps/postgres.exp b/testsuite/systemtap.apps/postgres.exp index 2d58a54f4..b7f522a19 100644 --- a/testsuite/systemtap.apps/postgres.exp +++ b/testsuite/systemtap.apps/postgres.exp @@ -4,8 +4,10 @@ set test "postgres" global env -if {! [info exists env(SYSTEMTAP_TEST_SDT)]} { - unsupported "postgres (\"SYSTEMTAP_TEST_SDT\" not in env)" +if {! [info exists env(SYSTEMTAP_TESTAPPS)] || ( + ! [string match "tcl" $env(SYSTEMTAP_TESTAPPS)] && + ! [string match "all" $env(SYSTEMTAP_TESTAPPS)])} { + untested "$test sdt app" return } diff --git a/testsuite/systemtap.apps/stap-tcl.stp b/testsuite/systemtap.apps/stap-tcl.stp index d3293b098..db3e36900 100644 --- a/testsuite/systemtap.apps/stap-tcl.stp +++ b/testsuite/systemtap.apps/stap-tcl.stp @@ -1,6 +1,6 @@ global counts -probe process(@1).mark("*") { +probe process(@1).library(@2).mark("*") { counts[$$name]<<<1 # PR10878; check also $$parms length } diff --git a/testsuite/systemtap.apps/tcl.exp b/testsuite/systemtap.apps/tcl.exp index bfcf22398..c95fa5e08 100644 --- a/testsuite/systemtap.apps/tcl.exp +++ b/testsuite/systemtap.apps/tcl.exp @@ -29,7 +29,8 @@ if {$rc != 0} { } set test "stap-tcl.stp compilation" -set rc [catch {exec stap -DMAXSKIPPED=8024 -t -p4 $srcdir/$subdir/stap-tcl.stp tcl/install/lib/libtcl${tclreleasemajor}.so} out] +verbose -log "spawn stap -DMAXSKIPPED=8024 -t -p4 $srcdir/$subdir/stap-tcl.stp tcl/install/bin/tclsh${tclreleasemajor} tcl/install/lib/libtcl${tclreleasemajor}.so" +set rc [catch {exec stap -DMAXSKIPPED=8024 -t -p4 $srcdir/$subdir/stap-tcl.stp tcl/install/bin/tclsh${tclreleasemajor} tcl/install/lib/libtcl${tclreleasemajor}.so} out] clone_output $out if {$rc != 0} { fail $test @@ -47,7 +48,8 @@ if {![installtest_p]} { set ok 0 set ko 0 set lines 0 -spawn stap -DMAXSKIPPED=8024 -t -c "tcl/install/bin/tclsh${tclreleasemajor} tcl/src/tests/all.tcl > tcl-test.out" $srcdir/$subdir/stap-tcl.stp tcl/install/lib/libtcl${tclreleasemajor}.so +verbose -log "spawn stap -DMAXSKIPPED=8024 -t -c \"tcl/install/bin/tclsh${tclreleasemajor} tcl/src/tests/all.tcl > tcl-test.out\" $srcdir/$subdir/stap-tcl.stp tcl/install/bin/tclsh${tclreleasemajor} tcl/install/lib/libtcl${tclreleasemajor}.so" +spawn stap -DMAXSKIPPED=8024 -t -c "tcl/install/bin/tclsh${tclreleasemajor} tcl/src/tests/all.tcl > tcl-test.out" $srcdir/$subdir/stap-tcl.stp tcl/install/bin/tclsh${tclreleasemajor} tcl/install/lib/libtcl${tclreleasemajor}.so expect { -timeout 1000 -re {^OK [^\r\n]*[\r\n]} { incr ok; exp_continue } -- 2.43.5