summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-01-09 15:17:55 -0500
committerFrank Ch. Eigler <fche@elastic.org>2008-01-09 15:17:55 -0500
commite1ef65568215f5b68074acd08339fd5fc9fa4e3b (patch)
tree09f14093faa21258e7f5967ce72a644ef078fdea
parent9438d4e48e7102a77a75d9b9dbfefad77aecf6ef (diff)
parent0310565fd41e6f884b13d56c2531e7d3305341f0 (diff)
downloadsystemtap-steved-e1ef65568215f5b68074acd08339fd5fc9fa4e3b.tar.gz
systemtap-steved-e1ef65568215f5b68074acd08339fd5fc9fa4e3b.tar.xz
systemtap-steved-e1ef65568215f5b68074acd08339fd5fc9fa4e3b.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
-rw-r--r--ChangeLog5
-rw-r--r--tapset/ChangeLog11
-rw-r--r--tapset/aux_syscalls.stp4
-rw-r--r--tapset/scheduler.stp16
-rw-r--r--testsuite/ChangeLog14
-rw-r--r--testsuite/lib/systemtap.exp11
-rw-r--r--testsuite/systemtap.base/marker.exp2
-rw-r--r--testsuite/systemtap.context/context.exp9
-rw-r--r--testsuite/systemtap.printf/end1b.exp8
-rw-r--r--testsuite/systemtap.printf/mixed_outb.exp8
-rw-r--r--testsuite/systemtap.printf/out1b.exp8
-rw-r--r--testsuite/systemtap.printf/out2b.exp8
-rw-r--r--testsuite/systemtap.printf/out3b.exp8
13 files changed, 84 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index e2a6cc8d..07eb2c2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-02 Frank Ch. Eigler <fche@elastic.org>
+
+ From Mark McLoughlin <markmc@redhat.com>:
+ * main.cxx (main): Set/restore umask around mkdtemp().
+
2007-12-27 Jim Keniston <jkenisto@us.ibm.com>
* runtime/uprobes/uprobes_x86_64.c: Fix handling of indirect
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index 5a305cd3..5519ef58 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,3 +1,14 @@
+2008-1-4 Masami Hiramatsu <mhiramat@redhat.com>
+
+ * aux_syscalls.stp (_stp_fork_list): Check kernel version for new
+ flags.
+
+2008-1-4 Masami Hiramatsu <mhiramat@redhat.com>
+
+ PR5152
+ * scheduler.stp (scheduler.ctxswitch): Change probe point __switch_to
+ to context_switch on ia64.
+
2007-12-27 Zhaolei <zhaolei@cn.fujitsu.com>
From Yang Zhiguo <yzgcsu@cn.fujitsu.com>
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}
};
%}
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
-%) %)
+%) %) %)
}
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index b60527ee..42de95f4 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,17 @@
+2008-01-07 William Cohen <wcohen@redhat.com>
+ * 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 <dsmith@redhat.com>
+
+ * systemtap.base/marker.exp: Improved regexp that finds markers
+ with arguments.
+
2007-12-12 Martin Hunt <hunt@redhat.com>
Detect crashing stap and report as a test failure.
* lib/systemtap.exp (stap_run_batch): Return -1 if stap
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.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
}
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}*]}