From f71cda0c26d5f1e5f7ed91861bd4a8e26dfe9786 Mon Sep 17 00:00:00 2001 From: fche Date: Mon, 28 Jan 2008 15:16:34 +0000 Subject: perms2 --- testsuite/parseko/probepoint04.stp | 0 testsuite/parseko/probepoint05.stp | 0 testsuite/parseko/probepoint06.stp | 0 testsuite/parseko/probepoint07.stp | 0 testsuite/parseko/probepoint08.stp | 0 testsuite/parseko/probepoint09.stp | 0 testsuite/semko/maxactive04.stp | 0 testsuite/semko/maxactive05.stp | 0 testsuite/semok/twentynine.stp | 0 9 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 testsuite/parseko/probepoint04.stp mode change 100644 => 100755 testsuite/parseko/probepoint05.stp mode change 100644 => 100755 testsuite/parseko/probepoint06.stp mode change 100644 => 100755 testsuite/parseko/probepoint07.stp mode change 100644 => 100755 testsuite/parseko/probepoint08.stp mode change 100644 => 100755 testsuite/parseko/probepoint09.stp mode change 100644 => 100755 testsuite/semko/maxactive04.stp mode change 100644 => 100755 testsuite/semko/maxactive05.stp mode change 100644 => 100755 testsuite/semok/twentynine.stp (limited to 'testsuite') diff --git a/testsuite/parseko/probepoint04.stp b/testsuite/parseko/probepoint04.stp old mode 100644 new mode 100755 diff --git a/testsuite/parseko/probepoint05.stp b/testsuite/parseko/probepoint05.stp old mode 100644 new mode 100755 diff --git a/testsuite/parseko/probepoint06.stp b/testsuite/parseko/probepoint06.stp old mode 100644 new mode 100755 diff --git a/testsuite/parseko/probepoint07.stp b/testsuite/parseko/probepoint07.stp old mode 100644 new mode 100755 diff --git a/testsuite/parseko/probepoint08.stp b/testsuite/parseko/probepoint08.stp old mode 100644 new mode 100755 diff --git a/testsuite/parseko/probepoint09.stp b/testsuite/parseko/probepoint09.stp old mode 100644 new mode 100755 diff --git a/testsuite/semko/maxactive04.stp b/testsuite/semko/maxactive04.stp old mode 100644 new mode 100755 diff --git a/testsuite/semko/maxactive05.stp b/testsuite/semko/maxactive05.stp old mode 100644 new mode 100755 diff --git a/testsuite/semok/twentynine.stp b/testsuite/semok/twentynine.stp old mode 100644 new mode 100755 -- cgit From f105e61a402fcea5467ea4ccdee440aad9b7e897 Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 29 Jan 2008 15:41:11 +0000 Subject: Allow "make clean" to succeed even if root-owned .systemtap/cache/* files exist. 2008-01-29 Frank Ch. Eigler * Makefile.am (clean-local): Allow "rm -rf" to fail due to root-owned .ko files in the local cache. * Makefile.in: Regenerated. --- testsuite/ChangeLog | 6 ++++++ testsuite/Makefile.am | 4 ++-- testsuite/Makefile.in | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'testsuite') diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 4b5a3ce8..d509d558 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-01-29 Frank Ch. Eigler + + * Makefile.am (clean-local): Allow "rm -rf" to fail due to + root-owned .ko files in the local cache. + * Makefile.in: Regenerated. + 2008-01-26 Frank Ch. Eigler PR 5673. diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 6b14bd60..edaaff3c 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -8,8 +8,8 @@ all-local: @echo Run \"make check\" or \"make installcheck\". clean-local: - @rm -f ./stap site.exp systemtap.sum systemtap.log - @rm -rf .systemtap .cache_test + -rm -f ./stap site.exp systemtap.sum systemtap.log + -rm -rf .systemtap .cache_test 2>/dev/null installcheck-local: clean site.exp $(MAKE) AM_RUNTESTFLAGS="--tool_opts install" check-DEJAGNU diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 8907c519..99acf141 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -458,8 +458,8 @@ all-local: @echo Run \"make check\" or \"make installcheck\". clean-local: - @rm -f ./stap site.exp systemtap.sum systemtap.log - @rm -rf .systemtap .cache_test + -rm -f ./stap site.exp systemtap.sum systemtap.log + -rm -rf .systemtap .cache_test 2>/dev/null installcheck-local: clean site.exp $(MAKE) AM_RUNTESTFLAGS="--tool_opts install" check-DEJAGNU -- cgit From 90a9d9a51bbed3b989f1c16384ae3bc271eb48ca Mon Sep 17 00:00:00 2001 From: wcohen Date: Thu, 31 Jan 2008 20:58:30 +0000 Subject: 2008-01-31 Will Cohen * systemtap.pass1-4/buildok.exp: Add some kfails. --- testsuite/ChangeLog | 4 ++++ testsuite/systemtap.pass1-4/buildok.exp | 1 + 2 files changed, 5 insertions(+) (limited to 'testsuite') diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index d509d558..6240b82a 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-01-31 Will Cohen + + * systemtap.pass1-4/buildok.exp: Add some kfails. + 2008-01-29 Frank Ch. Eigler * Makefile.am (clean-local): Allow "rm -rf" to fail due to diff --git a/testsuite/systemtap.pass1-4/buildok.exp b/testsuite/systemtap.pass1-4/buildok.exp index 77e77181..cfa09f53 100644 --- a/testsuite/systemtap.pass1-4/buildok.exp +++ b/testsuite/systemtap.pass1-4/buildok.exp @@ -6,6 +6,7 @@ foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] { # some tests are known to fail. switch $test { buildok/perfmon01.stp {setup_kfail 909 *-*-*} + buildok/seventeen.stp {setup_kfail 4393 *-*-*} buildok/twentysix.stp {setup_kfail 4105 *-*-*} buildok/twentyseven.stp {setup_kfail 4166 *-*-*} buildok/process_test.stp {setup_kfail 1155 *-*-*} -- cgit From 2129d358c4aba84430a18f86309f2aa70a8fd123 Mon Sep 17 00:00:00 2001 From: hunt Date: Fri, 1 Feb 2008 19:06:02 +0000 Subject: 2008-02-01 Martin Hunt PR4736 * systemtap.printf/stap_merge.tcl: Copied here so it will always be available. --- testsuite/ChangeLog | 5 ++ testsuite/systemtap.printf/end1b.exp | 8 +-- testsuite/systemtap.printf/mixed_outb.exp | 8 +-- testsuite/systemtap.printf/out1b.exp | 8 +-- testsuite/systemtap.printf/out2b.exp | 8 +-- testsuite/systemtap.printf/out3b.exp | 8 +-- testsuite/systemtap.printf/stap_merge.tcl | 102 ++++++++++++++++++++++++++++++ 7 files changed, 112 insertions(+), 35 deletions(-) create mode 100755 testsuite/systemtap.printf/stap_merge.tcl (limited to 'testsuite') diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 6240b82a..65d656e0 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-02-01 Martin Hunt + PR4736 + * systemtap.printf/stap_merge.tcl: Copied here so + it will always be available. + 2008-01-31 Will Cohen * systemtap.pass1-4/buildok.exp: Add some kfails. diff --git a/testsuite/systemtap.printf/end1b.exp b/testsuite/systemtap.printf/end1b.exp index 6168f66e..e23d6bc7 100644 --- a/testsuite/systemtap.printf/end1b.exp +++ b/testsuite/systemtap.printf/end1b.exp @@ -3,13 +3,7 @@ set TEST_NAME "$subdir/end1b" if {![installtest_p]} { untested $TEST_NAME; return } -# Look for stap_merge in the toplevel build directory -# and if that fails, use "which" to try to find a copy -# in the path. -set stap_merge_path "$srcdir/../runtime/staprun/stap_merge.tcl" -if (![file executable $stap_merge_path]) { - catch {exec which stap_merge} stap_merge_path -} +set stap_merge_path "$srcdir/$subdir/stap_merge.tcl" if (![file executable $stap_merge_path]) { fail "$TEST_NAME : could not find stap_merge" return diff --git a/testsuite/systemtap.printf/mixed_outb.exp b/testsuite/systemtap.printf/mixed_outb.exp index 6d352dd4..6f591c45 100644 --- a/testsuite/systemtap.printf/mixed_outb.exp +++ b/testsuite/systemtap.printf/mixed_outb.exp @@ -3,13 +3,7 @@ set TEST_NAME "$subdir/mixed_outb" if {![installtest_p]} { untested $TEST_NAME; return } -# Look for stap_merge in the toplevel build directory -# and if that fails, use "which" to try to find a copy -# in the path. -set stap_merge_path "$srcdir/../runtime/staprun/stap_merge.tcl" -if (![file executable $stap_merge_path]) { - catch {exec which stap_merge} stap_merge_path -} +set stap_merge_path "$srcdir/$subdir/stap_merge.tcl" if (![file executable $stap_merge_path]) { fail "$TEST_NAME : could not find stap_merge" return diff --git a/testsuite/systemtap.printf/out1b.exp b/testsuite/systemtap.printf/out1b.exp index 723238c5..0de48546 100644 --- a/testsuite/systemtap.printf/out1b.exp +++ b/testsuite/systemtap.printf/out1b.exp @@ -3,13 +3,7 @@ set TEST_NAME "$subdir/out1b" if {![installtest_p]} { untested $TEST_NAME; return } -# Look for stap_merge in the toplevel build directory -# and if that fails, use "which" to try to find a copy -# in the path. -set stap_merge_path "$srcdir/../runtime/staprun/stap_merge.tcl" -if (![file executable $stap_merge_path]) { - catch {exec which stap_merge} stap_merge_path -} +set stap_merge_path "$srcdir/$subdir/stap_merge.tcl" if (![file executable $stap_merge_path]) { fail "$TEST_NAME : could not find stap_merge" return diff --git a/testsuite/systemtap.printf/out2b.exp b/testsuite/systemtap.printf/out2b.exp index 085cfa14..883deedc 100644 --- a/testsuite/systemtap.printf/out2b.exp +++ b/testsuite/systemtap.printf/out2b.exp @@ -3,13 +3,7 @@ set TEST_NAME "$subdir/out2b" if {![installtest_p]} { untested $TEST_NAME; return } -# Look for stap_merge in the toplevel build directory -# and if that fails, use "which" to try to find a copy -# in the path. -set stap_merge_path "$srcdir/../runtime/staprun/stap_merge.tcl" -if (![file executable $stap_merge_path]) { - catch {exec which stap_merge} stap_merge_path -} +set stap_merge_path "$srcdir/$subdir/stap_merge.tcl" if (![file executable $stap_merge_path]) { fail "$TEST_NAME : could not find stap_merge" return diff --git a/testsuite/systemtap.printf/out3b.exp b/testsuite/systemtap.printf/out3b.exp index 395363fc..dfafc170 100644 --- a/testsuite/systemtap.printf/out3b.exp +++ b/testsuite/systemtap.printf/out3b.exp @@ -3,13 +3,7 @@ set TEST_NAME "$subdir/out3b" if {![installtest_p]} { untested $TEST_NAME; return } -# Look for stap_merge in the toplevel build directory -# and if that fails, use "which" to try to find a copy -# in the path. -set stap_merge_path "$srcdir/../runtime/staprun/stap_merge.tcl" -if (![file executable $stap_merge_path]) { - catch {exec which stap_merge} stap_merge_path -} +set stap_merge_path "$srcdir/$subdir/stap_merge.tcl" if (![file executable $stap_merge_path]) { fail "$TEST_NAME : could not find stap_merge" return diff --git a/testsuite/systemtap.printf/stap_merge.tcl b/testsuite/systemtap.printf/stap_merge.tcl new file mode 100755 index 00000000..47d419ce --- /dev/null +++ b/testsuite/systemtap.printf/stap_merge.tcl @@ -0,0 +1,102 @@ +#!/usr/bin/env tclsh +# +# stap_merge.tcl - systemtap merge program +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) Red Hat Inc, 2007 +# +# + +proc usage {} { + puts stderr "$::argv0 \[-v\] \[-o output_filename\] input_files ...\n" + exit 1 +} + +set outfile "stdout" +set verbose 0 +set index 0 +while {[string match -* [lindex $argv $index]]} { + switch -glob -- [lindex $argv $index] { + -v {set verbose 1} + -o {incr index; set outfile [lindex $argv $index]} + default {usage} + } + incr index +} + +if {$tcl_platform(byteOrder) == "littleEndian"} { + set int_format i +} else { + set int_format I +} + +set files [lrange $argv $index end] + +set n 0 +foreach file $files { + if {[catch {open $file} fd($n)]} { + puts stderr $fd($n) + exit 1 + } + fconfigure $fd($n) -translation binary + if {![binary scan [read $fd($n) 4] $int_format timestamp($n)]} { + continue + } + set timestamp($n) [expr $timestamp($n) & 0xFFFFFFFF] + incr n +} +set ncpus $n + +if {$outfile != "stdout"} { + if {[catch {open $outfile w} outfile]} { + puts stderr $outfile + exit 1 + } +} +fconfigure $outfile -translation binary + +while {1} { + set mincpu -1 + for {set n 0} {$n < $ncpus} {incr n} { + if {[info exists fd($n)] && (![info exists min] || $timestamp($n) <= $min)} { + set min $timestamp($n) + set mincpu $n + } + } + + if {![info exists min]} {break} + + if {![binary scan [read $fd($mincpu) 4] $int_format len]} { + puts stderr "Error reading length from channel $mincpu" + exit 1 + } + + if {$verbose == 1} { + puts stderr "\[CPU:$mincpu, seq=$min, length=$len\]" + } + + set data [read $fd($mincpu) $len] + puts -nonewline $outfile $data + + set data [read $fd($mincpu) 4] + if {$data == ""} { + unset fd($mincpu) + } else { + binary scan $data $int_format timestamp($mincpu) + set timestamp($mincpu) [expr $timestamp($mincpu) & 0xFFFFFFFF] + } + unset min +} -- cgit From 61e4ec4c74b7571ade18f93c5afdd40ac3d124af Mon Sep 17 00:00:00 2001 From: dsmith Date: Mon, 4 Feb 2008 21:14:20 +0000 Subject: 2008-02-04 David Smith PR 4446. * systemtap.base/marker.exp: Added tests for marker "$format" variable. --- testsuite/ChangeLog | 6 +++++ testsuite/systemtap.base/marker.exp | 46 ++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) (limited to 'testsuite') 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 + + PR 4446. + * systemtap.base/marker.exp: Added tests for marker "$format" + variable. + 2008-02-01 Martin Hunt 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 +} -- cgit From 3f545051d7334d4afcc95cca9f9de33a07462f44 Mon Sep 17 00:00:00 2001 From: hiramatu Date: Wed, 6 Feb 2008 17:30:41 +0000 Subject: 2008-02-06 Masami Hiramatsu * systemtap.base/procfs.exp: Added PROCFS.ko cleanup. * systemtap.context/context.exp: Added cleanup call. * systemtap.printf/end1b.exp: Passed evaluated command string to as_root. * systemtap.printf/mixed_outb.exp: Ditto. * systemtap.printf/out1b.exp: Ditto. * systemtap.printf/out2b.exp: Ditto. * systemtap.printf/out3b.exp: Ditto. --- testsuite/ChangeLog | 11 +++++++++++ testsuite/systemtap.base/procfs.exp | 2 ++ testsuite/systemtap.context/context.exp | 3 +-- testsuite/systemtap.printf/end1b.exp | 8 ++++---- testsuite/systemtap.printf/mixed_outb.exp | 8 ++++---- testsuite/systemtap.printf/out1b.exp | 8 ++++---- testsuite/systemtap.printf/out2b.exp | 8 ++++---- testsuite/systemtap.printf/out3b.exp | 8 ++++---- 8 files changed, 34 insertions(+), 22 deletions(-) (limited to 'testsuite') diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 0f804ee0..3a4a24ab 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2008-02-06 Masami Hiramatsu + + * systemtap.base/procfs.exp: Added PROCFS.ko cleanup. + * systemtap.context/context.exp: Added cleanup call. + * systemtap.printf/end1b.exp: Passed evaluated command string to + as_root. + * systemtap.printf/mixed_outb.exp: Ditto. + * systemtap.printf/out1b.exp: Ditto. + * systemtap.printf/out2b.exp: Ditto. + * systemtap.printf/out3b.exp: Ditto. + 2008-02-04 David Smith PR 4446. diff --git a/testsuite/systemtap.base/procfs.exp b/testsuite/systemtap.base/procfs.exp index ac00acc6..182f1e2e 100644 --- a/testsuite/systemtap.base/procfs.exp +++ b/testsuite/systemtap.base/procfs.exp @@ -110,3 +110,5 @@ set systemtap_script { # test procfs probes set output_string "\\mfinal value = goodbye\\M\r\n" stap_run $test proc_read_write $output_string -e $systemtap_script -m $test + +exec /bin/rm -f ${test}.ko diff --git a/testsuite/systemtap.context/context.exp b/testsuite/systemtap.context/context.exp index bc5f8ebe..472609f7 100644 --- a/testsuite/systemtap.context/context.exp +++ b/testsuite/systemtap.context/context.exp @@ -76,6 +76,5 @@ foreach test $testlist { source $test.tcl } - - +cleanup diff --git a/testsuite/systemtap.printf/end1b.exp b/testsuite/systemtap.printf/end1b.exp index e23d6bc7..e28dce5b 100644 --- a/testsuite/systemtap.printf/end1b.exp +++ b/testsuite/systemtap.printf/end1b.exp @@ -18,24 +18,24 @@ if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} { if {[catch {exec stap -b -o $tmpfile $test} res]} { untested $TEST_NAME puts "stap failed: $res" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } if {[catch {eval [list exec $stap_merge_path -o $tmpfile] [glob "${tmpfile}_*"]} res]} { puts "merge failed: $res" fail "$TEST_NAME failed" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { puts "$res" fail "$TEST_NAME failed" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } pass "$TEST_NAME passed" -as_root {/bin/rm -f [glob ${tmpfile}*]} +as_root "/bin/rm -f [glob ${tmpfile}*]" diff --git a/testsuite/systemtap.printf/mixed_outb.exp b/testsuite/systemtap.printf/mixed_outb.exp index 6f591c45..748dd0f2 100644 --- a/testsuite/systemtap.printf/mixed_outb.exp +++ b/testsuite/systemtap.printf/mixed_outb.exp @@ -18,24 +18,24 @@ if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} { if {[catch {exec stap -DMAXACTION=100000 -b -o $tmpfile $test} res]} { untested $TEST_NAME puts "stap failed: $res" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } if {[catch {eval [list exec $stap_merge_path -o $tmpfile] [glob "${tmpfile}_*"]} res]} { puts "merge failed: $res" fail "$TEST_NAME failed" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { puts "$res" fail "$TEST_NAME failed" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } pass "$TEST_NAME passed" -as_root {/bin/rm -f [glob ${tmpfile}*]} +as_root "/bin/rm -f [glob ${tmpfile}*]" diff --git a/testsuite/systemtap.printf/out1b.exp b/testsuite/systemtap.printf/out1b.exp index 0de48546..6edb8772 100644 --- a/testsuite/systemtap.printf/out1b.exp +++ b/testsuite/systemtap.printf/out1b.exp @@ -18,24 +18,24 @@ if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} { if {[catch {exec stap -b -o $tmpfile $test} res]} { untested $TEST_NAME puts "stap failed: $res" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } if {[catch {eval [list exec $stap_merge_path -o $tmpfile] [glob "${tmpfile}_*"]} res]} { puts "merge failed: $res" fail "$TEST_NAME failed" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { puts "$res" fail "$TEST_NAME failed" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } pass "$TEST_NAME passed" -as_root {/bin/rm -f [glob ${tmpfile}*]} +as_root "/bin/rm -f [glob ${tmpfile}*]" diff --git a/testsuite/systemtap.printf/out2b.exp b/testsuite/systemtap.printf/out2b.exp index 883deedc..fc3301ab 100644 --- a/testsuite/systemtap.printf/out2b.exp +++ b/testsuite/systemtap.printf/out2b.exp @@ -18,24 +18,24 @@ if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} { if {[catch {exec stap -b -o $tmpfile $test} res]} { untested $TEST_NAME puts "stap failed: $res" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } if {[catch {eval [list exec $stap_merge_path -o $tmpfile] [glob "${tmpfile}_*"]} res]} { puts "merge failed: $res" fail "$TEST_NAME failed" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { puts "$res" fail "$TEST_NAME failed" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } pass "$TEST_NAME passed" -as_root {/bin/rm -f [glob ${tmpfile}*]} +as_root "/bin/rm -f [glob ${tmpfile}*]" diff --git a/testsuite/systemtap.printf/out3b.exp b/testsuite/systemtap.printf/out3b.exp index dfafc170..af0d6be7 100644 --- a/testsuite/systemtap.printf/out3b.exp +++ b/testsuite/systemtap.printf/out3b.exp @@ -18,24 +18,24 @@ if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} { if {[catch {exec stap -DMAXACTION=100000 -b -o $tmpfile $test} res]} { untested $TEST_NAME puts "stap failed: $res" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } if {[catch {eval [list exec $stap_merge_path -o $tmpfile] [glob "${tmpfile}_*"]} res]} { puts "merge failed: $res" fail "$TEST_NAME failed" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { puts "$res" fail "$TEST_NAME failed" - as_root {/bin/rm -f [glob ${tmpfile}*]} + as_root "/bin/rm -f [glob ${tmpfile}*]" return } pass "$TEST_NAME passed" -as_root {/bin/rm -f [glob ${tmpfile}*]} +as_root "/bin/rm -f [glob ${tmpfile}*]" -- cgit From 983aeb407de6b516a794d750d329b3780149ed4f Mon Sep 17 00:00:00 2001 From: hiramatu Date: Wed, 6 Feb 2008 21:43:54 +0000 Subject: 2008-02-06 Masami Hiramatsu * systemtap.base/cmd_parse.exp: Added 'wait' between tests for preventing unexpected EOF. --- testsuite/ChangeLog | 5 +++++ testsuite/systemtap.base/cmd_parse.exp | 7 +++++++ 2 files changed, 12 insertions(+) (limited to 'testsuite') diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 3a4a24ab..3156de54 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-02-06 Masami Hiramatsu + + * systemtap.base/cmd_parse.exp: Added 'wait' between tests for + preventing unexpected EOF. + 2008-02-06 Masami Hiramatsu * systemtap.base/procfs.exp: Added PROCFS.ko cleanup. diff --git a/testsuite/systemtap.base/cmd_parse.exp b/testsuite/systemtap.base/cmd_parse.exp index 31676a6f..cf15698f 100644 --- a/testsuite/systemtap.base/cmd_parse.exp +++ b/testsuite/systemtap.base/cmd_parse.exp @@ -13,6 +13,7 @@ expect { timeout {fail "cmd_parse1: unexpected timeout"} eof {fail "cmd_parse1: unexpected EOF"} } +wait # stap -c 'echo "hello "\"world\"' -e 'probe begin {}' spawn stap -c {echo "hello "\"world\"} -e {probe begin {}} @@ -22,6 +23,7 @@ expect { timeout {fail "cmd_parse2: unexpected timeout"} eof {fail "cmd_parse2: unexpected EOF"} } +wait #stap -c '(a="hello world"; echo $a)' -e 'probe begin {}' spawn stap -c {(a="hello world"; echo $a)} -e {probe begin {}} @@ -31,6 +33,7 @@ expect { timeout {fail "cmd_parse3: unexpected timeout"} eof {fail "cmd_parse3: unexpected EOF"} } +wait #stap -c '(a="hello "\"world\"; echo $a)' -e 'probe begin {}' spawn stap -c {(a="hello "\"world\"; echo $a)} -e {probe begin {}} @@ -40,6 +43,7 @@ expect { timeout {fail "cmd_parse4: unexpected timeout"} eof {fail "cmd_parse4: unexpected EOF"} } +wait #stap -c '(a="hello "world; echo $a)' -e 'probe begin {}' spawn stap -c {(a="hello "world; echo $a)} -e {probe begin {}} @@ -49,6 +53,7 @@ expect { timeout {fail "cmd_parse5: unexpected timeout"} eof {fail "cmd_parse5: unexpected EOF"} } +wait #stap -c '(((a=42+7)); echo "The answer is $a")' -e 'probe begin {}' spawn stap -c {(((a=42+7)); echo "The answer is $a")} -e {probe begin {}} @@ -58,6 +63,7 @@ expect { timeout {fail "cmd_parse6: unexpected timeout"} eof {fail "cmd_parse6: unexpected EOF"} } +wait #stap -c '(echo "Hello World" 1>&2) > /dev/null' -e 'probe begin {}' spawn stap -c {(echo "Hello World" 1>&2) > /dev/null} -e {probe begin {}} @@ -67,3 +73,4 @@ expect { timeout {fail "cmd_parse7: unexpected timeout"} eof {fail "cmd_parse7: unexpected EOF"} } +wait -- cgit From 47683be64546814f9bf7f48e62c916d7901e336e Mon Sep 17 00:00:00 2001 From: hiramatu Date: Wed, 6 Feb 2008 22:07:42 +0000 Subject: 2008-02-06 Masami Hiramatsu * stack-ia64.c (__stp_show_stack_sym): Skip printing symbol if (ip == REG_IP(regs)). 2008-02-06 Masami Hiramatsu * systemtap.context/backtrace.tcl: Fixed regular expressions and Added new expression for return probe on ia64. * systemtap.context/backtrace.stp(print_all_trace_info): Added trace point output before calling print_stack(). --- testsuite/ChangeLog | 7 +++++++ testsuite/systemtap.context/backtrace.stp | 2 +- testsuite/systemtap.context/backtrace.tcl | 12 +++++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) (limited to 'testsuite') diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 3156de54..9f82e039 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2008-02-06 Masami Hiramatsu + + * systemtap.context/backtrace.tcl: Fixed regular expressions and Added + new expression for checking return probe's stacktrace on ia64. + * systemtap.context/backtrace.stp (print_all_trace_info): Added + trace point output before calling print_stack(). + 2008-02-06 Masami Hiramatsu * systemtap.base/cmd_parse.exp: Added 'wait' between tests for diff --git a/testsuite/systemtap.context/backtrace.stp b/testsuite/systemtap.context/backtrace.stp index 73781371..c14d071c 100644 --- a/testsuite/systemtap.context/backtrace.stp +++ b/testsuite/systemtap.context/backtrace.stp @@ -4,7 +4,7 @@ function print_all_trace_info(point:string) { print("--------\n") bt = backtrace() printf("the %s stack is %s\n", point, bt) - print("--------\n") + printf("--<%s>--\n", point) print_stack(bt); print("--------\n") } diff --git a/testsuite/systemtap.context/backtrace.tcl b/testsuite/systemtap.context/backtrace.tcl index e35832ee..409cf693 100644 --- a/testsuite/systemtap.context/backtrace.tcl +++ b/testsuite/systemtap.context/backtrace.tcl @@ -5,6 +5,12 @@ set m4 0 set m5 0 set m6 0 +if {[istarget ia64-*-*]} { + set retexp {.*return\>--\r\n 0x[a-f0-9]+ : yyy_func3[^\[]+\[systemtap_test_module2\]\r\n} +} else { + set retexp {.*return\>--\r\n 0x[a-f0-9]+ : kretprobe_trampoline_holder[^\r\n]+\r\n} +} + spawn stap backtrace.stp #exp_internal 1 expect { @@ -36,7 +42,7 @@ expect { incr m2 expect { -timeout 5 - -re {.*---\r\n 0x[a-f0-9]+ : yyy_func3[^\[]+\[systemtap_test_module2\]\r\n} { + -re {.*call\>--\r\n 0x[a-f0-9]+ : yyy_func3[^\[]+\[systemtap_test_module2\]\r\n} { if {$m2 == 1} {incr m2} exp_continue } @@ -76,7 +82,7 @@ expect { incr m4 expect { -timeout 5 - -re {.*0x[a-f0-9]+ : kretprobe_trampoline_holder[^\[]+\[\]\r\n} { + -re $retexp { if {$m4 == 1} {incr m4} exp_continue } @@ -104,7 +110,7 @@ expect { incr m6 expect { -timeout 5 - -re {.*---\r\n 0x[a-f0-9]+[^\r\n]+\r\n} { + -re {.*profile>--\r\n 0x[a-f0-9]+[^\r\n]+\r\n} { if {$m6 == 1} {incr m6} } } -- cgit From dd09faf3e937d62dce3629e33689a8f2f64ce4ad Mon Sep 17 00:00:00 2001 From: hunt Date: Thu, 7 Feb 2008 18:26:10 +0000 Subject: 2008-02-07 Martin Hunt * systemtap.base/debugpath.exp: Remove explicit closes. Stap will terminate without help, and cleanup after itself. --- testsuite/ChangeLog | 5 +++++ testsuite/systemtap.base/debugpath.exp | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'testsuite') diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 9f82e039..07af851d 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-02-07 Martin Hunt + + * systemtap.base/debugpath.exp: Remove explicit closes. + Stap will terminate without help, and cleanup after itself. + 2008-02-06 Masami Hiramatsu * systemtap.context/backtrace.tcl: Fixed regular expressions and Added diff --git a/testsuite/systemtap.base/debugpath.exp b/testsuite/systemtap.base/debugpath.exp index 67b9eb70..ffa4ba7b 100644 --- a/testsuite/systemtap.base/debugpath.exp +++ b/testsuite/systemtap.base/debugpath.exp @@ -6,7 +6,8 @@ expect { timeout { fail "$test (timeout1)" } eof { fail "$test (eof)" } } -catch { close; wait } + +wait set test "debugpath-good" spawn env SYSTEMTAP_DEBUGINFO_PATH=:/usr/lib/debug stap -e "probe kernel.function(\"sys_open\") {}" -p2 @@ -15,4 +16,4 @@ expect { timeout { fail "$test (timeout2)" } eof { fail "$test (eof)" } } -catch { close ; wait } + -- cgit From 6a0e95e23737a7405a416be25cde6db740032a5f Mon Sep 17 00:00:00 2001 From: hunt Date: Thu, 7 Feb 2008 18:32:19 +0000 Subject: Restore accidently deleted line. --- testsuite/systemtap.base/debugpath.exp | 1 + 1 file changed, 1 insertion(+) (limited to 'testsuite') diff --git a/testsuite/systemtap.base/debugpath.exp b/testsuite/systemtap.base/debugpath.exp index ffa4ba7b..b0b12207 100644 --- a/testsuite/systemtap.base/debugpath.exp +++ b/testsuite/systemtap.base/debugpath.exp @@ -17,3 +17,4 @@ expect { eof { fail "$test (eof)" } } +wait -- cgit From 21beacc9a00ea48763048151c370e205c5f23379 Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 12 Feb 2008 21:25:42 +0000 Subject: PR4393: fix relocatable-kernel global $variable access 2008-02-12 Frank Ch. Eigler PR 4393 * tapsets.cxx (emit_address): Support relocatable kernels. (dwarf_derived_probe ctor): Hack around for missing USHRT_MAX. * elaborate.cxx (semantic_pass): Increment rc if exception caught. 2008-02-12 Frank Ch. Eigler * systemtap.pass1-4/buildok.exp: No longer kfail buildok/seventeen. --- testsuite/ChangeLog | 4 ++++ testsuite/systemtap.pass1-4/buildok.exp | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'testsuite') diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 07af851d..da48742e 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-02-12 Frank Ch. Eigler + + * systemtap.pass1-4/buildok.exp: No longer kfail buildok/seventeen. + 2008-02-07 Martin Hunt * systemtap.base/debugpath.exp: Remove explicit closes. diff --git a/testsuite/systemtap.pass1-4/buildok.exp b/testsuite/systemtap.pass1-4/buildok.exp index cfa09f53..77e77181 100644 --- a/testsuite/systemtap.pass1-4/buildok.exp +++ b/testsuite/systemtap.pass1-4/buildok.exp @@ -6,7 +6,6 @@ foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] { # some tests are known to fail. switch $test { buildok/perfmon01.stp {setup_kfail 909 *-*-*} - buildok/seventeen.stp {setup_kfail 4393 *-*-*} buildok/twentysix.stp {setup_kfail 4105 *-*-*} buildok/twentyseven.stp {setup_kfail 4166 *-*-*} buildok/process_test.stp {setup_kfail 1155 *-*-*} -- cgit From 4bab8964266929ec9356590db0d0fe51607c4b6b Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 13 Feb 2008 03:33:18 +0000 Subject: 2008-02-12 Frank Ch. Eigler * systemtap.context/context.exp: Build temporary modules under build tree, to tolerate read-only source trees. * {args,backtrace,pid}.tcl: Corresponding changes. * systemtap_test_module2.c: Add a bunch of asm("")'s to prevent inlining even better than noinline does. --- testsuite/ChangeLog | 8 ++++++++ testsuite/systemtap.context/args.tcl | 2 +- testsuite/systemtap.context/backtrace.tcl | 2 +- testsuite/systemtap.context/context.exp | 15 +++++++++++---- testsuite/systemtap.context/pid.tcl | 2 +- testsuite/systemtap.context/systemtap_test_module2.c | 10 ++++++++++ 6 files changed, 32 insertions(+), 7 deletions(-) (limited to 'testsuite') diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index da48742e..11af94f3 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2008-02-12 Frank Ch. Eigler + + * systemtap.context/context.exp: Build temporary modules under + build tree, to tolerate read-only source trees. + * {args,backtrace,pid}.tcl: Corresponding changes. + * systemtap_test_module2.c: Add a bunch of asm("")'s to prevent + inlining even better than noinline does. + 2008-02-12 Frank Ch. Eigler * systemtap.pass1-4/buildok.exp: No longer kfail buildok/seventeen. diff --git a/testsuite/systemtap.context/args.tcl b/testsuite/systemtap.context/args.tcl index 6c14c4b7..37a43823 100644 --- a/testsuite/systemtap.context/args.tcl +++ b/testsuite/systemtap.context/args.tcl @@ -1,4 +1,4 @@ -spawn stap args.stp +spawn stap $srcdir/$subdir/args.stp expect { -timeout 240 "READY" { diff --git a/testsuite/systemtap.context/backtrace.tcl b/testsuite/systemtap.context/backtrace.tcl index 409cf693..703f0ec2 100644 --- a/testsuite/systemtap.context/backtrace.tcl +++ b/testsuite/systemtap.context/backtrace.tcl @@ -11,7 +11,7 @@ if {[istarget ia64-*-*]} { set retexp {.*return\>--\r\n 0x[a-f0-9]+ : kretprobe_trampoline_holder[^\r\n]+\r\n} } -spawn stap backtrace.stp +spawn stap $srcdir/$subdir/backtrace.stp #exp_internal 1 expect { -timeout 240 diff --git a/testsuite/systemtap.context/context.exp b/testsuite/systemtap.context/context.exp index 472609f7..11c0f2fc 100644 --- a/testsuite/systemtap.context/context.exp +++ b/testsuite/systemtap.context/context.exp @@ -21,20 +21,21 @@ proc cleanup {} { proc build_modules {} { global build_dir + global srcdir subdir if {[catch {exec mktemp -d staptestXXXXX} build_dir]} { puts stderr "Failed to create temporary directory: $build_dir" return 0 } - foreach f [glob systemtap_test_module*.c] { + foreach f [glob $srcdir/$subdir/systemtap_test_module*.c] { exec cp $f $build_dir } set old_dir [pwd] cd $build_dir foreach n {2 1} { - exec cp $old_dir/makefile$n Makefile + exec cp $srcdir/$subdir/makefile$n Makefile if {[catch {exec make clean} res]} { puts $res cd $old_dir @@ -61,7 +62,13 @@ proc build_modules {} { } # first build the modules -cd $srcdir/$subdir + +# NB: We cannot "cd" on behalf the whole dejagnu process, especially +# without going back to the build tree, and especially not to the +# source tree expecting to be able to write there. +# +# cd $srcdir/$subdir + set uname [exec /bin/uname -r] if {[build_modules] == 0} { @@ -73,7 +80,7 @@ if {[build_modules] == 0} { } foreach test $testlist { - source $test.tcl + source $srcdir/$subdir/$test.tcl } cleanup diff --git a/testsuite/systemtap.context/pid.tcl b/testsuite/systemtap.context/pid.tcl index c96d922f..a2c091f1 100644 --- a/testsuite/systemtap.context/pid.tcl +++ b/testsuite/systemtap.context/pid.tcl @@ -1,5 +1,5 @@ set tests [list execname pexecname pid ppid tid uid euid gid egid] -spawn stap pid.stp +spawn stap $srcdir/$subdir/pid.stp #exp_internal 1 expect { -timeout 240 diff --git a/testsuite/systemtap.context/systemtap_test_module2.c b/testsuite/systemtap.context/systemtap_test_module2.c index 51cb58bb..b0d47428 100644 --- a/testsuite/systemtap.context/systemtap_test_module2.c +++ b/testsuite/systemtap.context/systemtap_test_module2.c @@ -22,19 +22,23 @@ /* some nested functions to test backtraces */ int noinline yyy_func4 (int foo) { + asm (""); return foo + 1; } int noinline yyy_func3 (int foo) { foo = yyy_func4(foo); + asm (""); return foo + 1; } int noinline yyy_func2 (int foo) { foo = yyy_func3(foo); + asm (""); return foo + 1; } int noinline yyy_func1 (int foo) { foo = yyy_func2(foo); + asm (""); return foo + 1; } EXPORT_SYMBOL(yyy_func1); @@ -42,31 +46,37 @@ EXPORT_SYMBOL(yyy_func1); /* 1. int argument testing */ int noinline yyy_int(int a, int b, int c) { + asm (""); return a+b+c; } /* 2. uint argument testing */ unsigned noinline yyy_uint(unsigned a, unsigned b, unsigned c) { + asm (""); return a+b+c; } /* 3. long argument testing */ long noinline yyy_long(long a, long b, long c) { + asm (""); return a+b+c; } /* 4. int64_t argument testing */ int noinline yyy_int64(int64_t a, int64_t b, int64_t c) { + asm (""); return a+b+c; } /* 5. char argument testing */ char noinline yyy_char(char a, char b, char c) { + asm (""); return 'Q'; } /* 5. string argument testing */ char * noinline yyy_str(char *a, char *b, char *c) { + asm (""); return "XYZZY"; } -- cgit From 2c5a19c6ba969d8fa30070e7579c1597a0e1c194 Mon Sep 17 00:00:00 2001 From: brolley Date: Wed, 13 Feb 2008 16:43:08 +0000 Subject: 2008-02-13 Dave Brolley PR5609 * staptree.h (probe::collect_derivation_chain): Now takes vector. (probe::get_alias): New virtual method. * elaborate.h (derived_probe::collect_derivation_chain): Now takes vector. * staptree.cxx (probe::collect_derivation_chain): Now takes vector. Don't cast 'this' to (derived_probe*). * elaborate.cxx (derived_probe::collect_derivation_chain): Now takes vector. (alias_derived_probe::get_alias): New virtual method. (alias_derived_probe::alias): New member. (alias_expansion_builder::build): Call checkForRecursiveExpansion and emit a diagnostic if recursion is detected. Pass alias to constructor of alias_derived_probe. (alias_expansion_builder::checkForRecursiveExpansion): New method. * coveragedb.cxx: Pass vector on all calls to collect_derivation_chain. --- testsuite/semko/fortyfour.stp | 5 +++++ testsuite/semko/fortythree.stp | 4 ++++ testsuite/semok/thirty.stp | 9 +++++++++ 3 files changed, 18 insertions(+) create mode 100755 testsuite/semko/fortyfour.stp create mode 100755 testsuite/semko/fortythree.stp create mode 100755 testsuite/semok/thirty.stp (limited to 'testsuite') diff --git a/testsuite/semko/fortyfour.stp b/testsuite/semko/fortyfour.stp new file mode 100755 index 00000000..8f3caeeb --- /dev/null +++ b/testsuite/semko/fortyfour.stp @@ -0,0 +1,5 @@ +#! stap -p2 + +probe foo = bar {} +probe bar = foo {} +probe foo {} diff --git a/testsuite/semko/fortythree.stp b/testsuite/semko/fortythree.stp new file mode 100755 index 00000000..cbf52a91 --- /dev/null +++ b/testsuite/semko/fortythree.stp @@ -0,0 +1,4 @@ +#! stap -p2 + +probe foo.bar = foo.* { } +probe foo.* { } diff --git a/testsuite/semok/thirty.stp b/testsuite/semok/thirty.stp new file mode 100755 index 00000000..27612ed0 --- /dev/null +++ b/testsuite/semok/thirty.stp @@ -0,0 +1,9 @@ +#! stap -p2 + +probe foo.a.one = foo.b, foo.c {} // not recursive +probe foo.a.two = foo.c, foo.b {} // not recursive +probe foo.b = foo.c {} +probe foo.c = begin {} +probe foo.a.one {} +probe foo.a.two {} + -- cgit