From d5d7f324c3d0efd0c3072fc0c54f8f0cf070ddf4 Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 2 Jan 2008 19:25:25 +0000 Subject: none --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index e2a6cc8d..07eb2c2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-01-02 Frank Ch. Eigler + + From Mark McLoughlin : + * main.cxx (main): Set/restore umask around mkdtemp(). + 2007-12-27 Jim Keniston * runtime/uprobes/uprobes_x86_64.c: Fix handling of indirect -- cgit From 9fcddfc27d30b644044102cb829ef1c94492805c Mon Sep 17 00:00:00 2001 From: hiramatu Date: Fri, 4 Jan 2008 17:29:04 +0000 Subject: 2008-1-4 Masami Hiramatsu PR5152 * scheduler.stp (scheduler.ctxswitch): Change probe point __switch_to to context_switch on ia64. --- tapset/ChangeLog | 6 ++++++ tapset/scheduler.stp | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 5a305cd3..0cec6fc3 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,9 @@ +2008-1-4 Masami Hiramatsu + + PR5152 + * scheduler.stp (scheduler.ctxswitch): Change probe point __switch_to + to context_switch on ia64. + 2007-12-27 Zhaolei From Yang Zhiguo diff --git a/tapset/scheduler.stp b/tapset/scheduler.stp index 8b6db182..55e230c2 100644 --- a/tapset/scheduler.stp +++ b/tapset/scheduler.stp @@ -121,10 +121,14 @@ probe scheduler.balance = kernel.function("idle_balance")? {} * prevtsk_state: the state of the process to be switched out */ probe scheduler.ctxswitch = -%( arch == "x86_64" %? +%( arch != "x86_64" %? + %( arch != "ia64" %? + kernel.function("__switch_to") + %: kernel.function("context_switch") + %) %: - kernel.function("__switch_to") + kernel.function("context_switch") %) { %( arch == "ppc64" %? @@ -139,11 +143,17 @@ probe scheduler.ctxswitch = prev_task = $prev next_task = $next prevtsk_state = $prev->state +%: %( arch == "ia64" %? + prev_pid = $prev->pid + next_pid = $next->pid + prev_task = $prev + next_task = $next + prevtsk_state = $prev->state %: prev_pid = $prev_p->pid next_pid = $next_p->pid prev_task = $prev_p next_task = $next_p prevtsk_state = $prev_p->state -%) %) +%) %) %) } -- cgit From 359d2f90a10e8e374f259d2bc0a5c0d460815842 Mon Sep 17 00:00:00 2001 From: dsmith Date: Fri, 4 Jan 2008 18:16:04 +0000 Subject: 2008-01-04 David Smith * systemtap.base/marker.exp: Improved regexp that finds markers with arguments. --- testsuite/ChangeLog | 5 +++++ testsuite/systemtap.base/marker.exp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index b60527ee..f2ec2544 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-01-04 David Smith + + * systemtap.base/marker.exp: Improved regexp that finds markers + with arguments. + 2007-12-12 Martin Hunt Detect crashing stap and report as a test failure. * lib/systemtap.exp (stap_run_batch): Return -1 if stap diff --git a/testsuite/systemtap.base/marker.exp b/testsuite/systemtap.base/marker.exp index 1b750409..01d1ed54 100644 --- a/testsuite/systemtap.base/marker.exp +++ b/testsuite/systemtap.base/marker.exp @@ -59,7 +59,7 @@ if {! [catch {open $path RDONLY} fl]} { while {[gets $fl s] >= 0} { # This regexp only picks up markers that contain arguments. # This helps ensure that K_MARKER04 passes correctly. - if [regexp {^([^ \t]+)\t[^ \t]+.+$} $s match name] { + if [regexp {^([^ \t]+)\t[^ \t]+.*%.+$} $s match name] { set kernel_markers_found 1 lappend kernel_marker_names $name } -- cgit From b5121873c8e4cf5c89105d93b76c1fe7c8f10811 Mon Sep 17 00:00:00 2001 From: hiramatu Date: Fri, 4 Jan 2008 19:39:54 +0000 Subject: 2008-1-4 Masami Hiramatsu * aux_syscalls.stp (_stp_fork_list): Check kernel version for new flags. --- tapset/ChangeLog | 5 +++++ tapset/aux_syscalls.stp | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 0cec6fc3..5519ef58 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,8 @@ +2008-1-4 Masami Hiramatsu + + * aux_syscalls.stp (_stp_fork_list): Check kernel version for new + flags. + 2008-1-4 Masami Hiramatsu PR5152 diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp index 9120c4e6..da72a7ff 100644 --- a/tapset/aux_syscalls.stp +++ b/tapset/aux_syscalls.stp @@ -1685,8 +1685,12 @@ const _stp_val_array const _stp_fork_list[] = { V(CLONE_UNTRACED), V(CLONE_CHILD_SETTID), V(CLONE_STOPPED), +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) V(CLONE_NEWIPC), +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23) V(CLONE_NEWUSER), +#endif {0, NULL} }; %} -- cgit From 14b31996a7752ab19f1b9017c65742c866394c1e Mon Sep 17 00:00:00 2001 From: wcohen Date: Mon, 7 Jan 2008 21:12:53 +0000 Subject: 2008-01-07 William Cohen * testsuite/lib/systemtap.exp (as_root): new proc. * testsuite/systemtap.context/context.exp: * testsuite/systemtap.printf/end1b.exp: * testsuite/systemtap.printf/mixed_outb.exp: * testsuite/systemtap.printf/out1b.exp: * testsuite/systemtap.printf/out2b.exp: * testsuite/systemtap.printf/out3b.exp: Use as_root proc. --- ChangeLog | 9 +++++++++ testsuite/lib/systemtap.exp | 11 +++++++++++ testsuite/systemtap.context/context.exp | 9 +++++---- 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, 45 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 07eb2c2a..e30f8b65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-01-07 William Cohen + * testsuite/lib/systemtap.exp (as_root): new proc. + * testsuite/systemtap.context/context.exp: + * testsuite/systemtap.printf/end1b.exp: + * testsuite/systemtap.printf/mixed_outb.exp: + * testsuite/systemtap.printf/out1b.exp: + * testsuite/systemtap.printf/out2b.exp: + * testsuite/systemtap.printf/out3b.exp: Use as_root proc. + 2008-01-02 Frank Ch. Eigler From Mark McLoughlin : diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index 7fb1e317..3b66b05a 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -111,3 +111,14 @@ proc stap_run_batch {args} { return [lindex $results 3] } } + +proc as_root { command } { + + set effective_pid [exec /usr/bin/id -u] + + if {$effective_pid != 0} { + set command "sudo $command" + } + set res [catch {eval exec $command} value] + return $res + } diff --git a/testsuite/systemtap.context/context.exp b/testsuite/systemtap.context/context.exp index 3b4a0328..bc5f8ebe 100644 --- a/testsuite/systemtap.context/context.exp +++ b/testsuite/systemtap.context/context.exp @@ -13,8 +13,8 @@ proc cleanup {} { global build_dir catch {send "\003"} foreach n {1 2} { - catch {exec sudo /bin/rm -f /lib/modules/$::uname/kernel/systemtap_test_module$n.ko} - catch {exec sudo /sbin/rmmod systemtap_test_module$n} + as_root [list /bin/rm -f /lib/modules/$::uname/kernel/systemtap_test_module$n.ko] + as_root [list /sbin/rmmod systemtap_test_module$n] } if {$build_dir != ""} {exec rm -rf $build_dir} } @@ -46,14 +46,15 @@ proc build_modules {} { cd $old_dir return 0 } - if {[catch {exec sudo cp systemtap_test_module$n.ko /lib/modules/$::uname/kernel} res]} { + set res [as_root [list cp systemtap_test_module$n.ko /lib/modules/$::uname/kernel]] + if { $res != 0 } { puts $res cd $old_dir return 0 } } foreach n {2 1} { - catch {exec sudo /sbin/insmod systemtap_test_module$n.ko} + as_root [list /sbin/insmod systemtap_test_module$n.ko] } cd $old_dir return 1 diff --git a/testsuite/systemtap.printf/end1b.exp b/testsuite/systemtap.printf/end1b.exp index b1b75c52..6168f66e 100644 --- a/testsuite/systemtap.printf/end1b.exp +++ b/testsuite/systemtap.printf/end1b.exp @@ -24,24 +24,24 @@ if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} { if {[catch {exec stap -b -o $tmpfile $test} res]} { untested $TEST_NAME puts "stap failed: $res" - catch {eval [list exec sudo /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" - catch {eval [list exec sudo /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" - catch {eval [list exec sudo /bin/rm -f] [glob ${tmpfile}*]} + as_root {/bin/rm -f [glob ${tmpfile}*]} return } pass "$TEST_NAME passed" -catch {eval [list exec sudo /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 9d1be4c6..6d352dd4 100644 --- a/testsuite/systemtap.printf/mixed_outb.exp +++ b/testsuite/systemtap.printf/mixed_outb.exp @@ -24,24 +24,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" - catch {eval [list exec sudo /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" - catch {eval [list exec sudo /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" - catch {eval [list exec sudo /bin/rm -f] [glob ${tmpfile}*]} + as_root {/bin/rm -f [glob ${tmpfile}*]} return } pass "$TEST_NAME passed" -catch {eval [list exec sudo /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 0242dee6..723238c5 100644 --- a/testsuite/systemtap.printf/out1b.exp +++ b/testsuite/systemtap.printf/out1b.exp @@ -24,24 +24,24 @@ if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} { if {[catch {exec stap -b -o $tmpfile $test} res]} { untested $TEST_NAME puts "stap failed: $res" - catch {eval [list exec sudo /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" - catch {eval [list exec sudo /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" - catch {eval [list exec sudo /bin/rm -f] [glob ${tmpfile}*]} + as_root {/bin/rm -f [glob ${tmpfile}*]} return } pass "$TEST_NAME passed" -catch {eval [list exec sudo /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 be050854..085cfa14 100644 --- a/testsuite/systemtap.printf/out2b.exp +++ b/testsuite/systemtap.printf/out2b.exp @@ -24,24 +24,24 @@ if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} { if {[catch {exec stap -b -o $tmpfile $test} res]} { untested $TEST_NAME puts "stap failed: $res" - catch {eval [list exec sudo /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" - catch {eval [list exec sudo /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" - catch {eval [list exec sudo /bin/rm -f] [glob ${tmpfile}*]} + as_root {/bin/rm -f [glob ${tmpfile}*]} return } pass "$TEST_NAME passed" -catch {eval [list exec sudo /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 2d2b3d0b..395363fc 100644 --- a/testsuite/systemtap.printf/out3b.exp +++ b/testsuite/systemtap.printf/out3b.exp @@ -24,24 +24,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" - catch {eval [list exec sudo /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" - catch {eval [list exec sudo /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" - catch {eval [list exec sudo /bin/rm -f] [glob ${tmpfile}*]} + as_root {/bin/rm -f [glob ${tmpfile}*]} return } pass "$TEST_NAME passed" -catch {eval [list exec sudo /bin/rm -f] [glob ${tmpfile}*]} +as_root {/bin/rm -f [glob ${tmpfile}*]} -- cgit From 0310565fd41e6f884b13d56c2531e7d3305341f0 Mon Sep 17 00:00:00 2001 From: wcohen Date: Mon, 7 Jan 2008 22:31:02 +0000 Subject: Put the ChangeLog entry in the correct place. --- ChangeLog | 9 --------- testsuite/ChangeLog | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index e30f8b65..07eb2c2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,3 @@ -2008-01-07 William Cohen - * testsuite/lib/systemtap.exp (as_root): new proc. - * testsuite/systemtap.context/context.exp: - * testsuite/systemtap.printf/end1b.exp: - * testsuite/systemtap.printf/mixed_outb.exp: - * testsuite/systemtap.printf/out1b.exp: - * testsuite/systemtap.printf/out2b.exp: - * testsuite/systemtap.printf/out3b.exp: Use as_root proc. - 2008-01-02 Frank Ch. Eigler From Mark McLoughlin : diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index f2ec2544..42de95f4 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2008-01-07 William Cohen + * lib/systemtap.exp (as_root): new proc. + * systemtap.context/context.exp: + * systemtap.printf/end1b.exp: + * systemtap.printf/mixed_outb.exp: + * systemtap.printf/out1b.exp: + * systemtap.printf/out2b.exp: + * systemtap.printf/out3b.exp: Use as_root proc. + 2008-01-04 David Smith * systemtap.base/marker.exp: Improved regexp that finds markers -- cgit