From 68d47ee749911aa9babdfe37efd85db115e316be Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 5 Aug 2009 17:56:44 -0700 Subject: [PATCH] Remove as_root calls from the printf testsuite Once upon a time, we would use sudo staprun, and so output files from "-o" were owned by root. For a while now we've used a setuid staprun instead, and the output files are created by stapio as the user. Thus, we don't need as_root to remove those files anymore. * testsuite/systemtap.printf/end1b.exp: Clean up without as_root. * testsuite/systemtap.printf/mixed_outb.exp: Ditto. * testsuite/systemtap.printf/out1b.exp: Ditto. * testsuite/systemtap.printf/out2b.exp: Ditto. * testsuite/systemtap.printf/out3b.exp: Ditto. --- 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 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/testsuite/systemtap.printf/end1b.exp b/testsuite/systemtap.printf/end1b.exp index 46cdc9c77..c3c9d4cf2 100644 --- a/testsuite/systemtap.printf/end1b.exp +++ b/testsuite/systemtap.printf/end1b.exp @@ -18,24 +18,24 @@ if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} { if {[catch {exec stap -b -o $tmpfile $test} res]} { puts "stap failed: $res" fail $TEST_NAME - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /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 - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /bin/rm -f] [glob "${tmpfile}*"] return } if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { puts "$res" fail $TEST_NAME - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /bin/rm -f] [glob "${tmpfile}*"] return } pass $TEST_NAME -as_root "/bin/rm -f [glob ${tmpfile}*]" +eval [list exec /bin/rm -f] [glob "${tmpfile}*"] diff --git a/testsuite/systemtap.printf/mixed_outb.exp b/testsuite/systemtap.printf/mixed_outb.exp index c15520b14..1225f9ce5 100644 --- a/testsuite/systemtap.printf/mixed_outb.exp +++ b/testsuite/systemtap.printf/mixed_outb.exp @@ -18,24 +18,24 @@ if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} { if {[catch {exec stap -DMAXACTION=100000 -b -o $tmpfile $test} res]} { fail $TEST_NAME puts "stap failed: $res" - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /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 - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /bin/rm -f] [glob "${tmpfile}*"] return } if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { puts "$res" fail $TEST_NAME - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /bin/rm -f] [glob "${tmpfile}*"] return } pass $TEST_NAME -as_root "/bin/rm -f [glob ${tmpfile}*]" +eval [list exec /bin/rm -f] [glob "${tmpfile}*"] diff --git a/testsuite/systemtap.printf/out1b.exp b/testsuite/systemtap.printf/out1b.exp index 24efbf4cf..d09dadef8 100644 --- a/testsuite/systemtap.printf/out1b.exp +++ b/testsuite/systemtap.printf/out1b.exp @@ -18,24 +18,24 @@ if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} { if {[catch {exec stap -b -o $tmpfile $test} res]} { fail $TEST_NAME puts "stap failed: $res" - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /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 - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /bin/rm -f] [glob "${tmpfile}*"] return } if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { puts "$res" fail $TEST_NAME - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /bin/rm -f] [glob "${tmpfile}*"] return } pass $TEST_NAME -as_root "/bin/rm -f [glob ${tmpfile}*]" +eval [list exec /bin/rm -f] [glob "${tmpfile}*"] diff --git a/testsuite/systemtap.printf/out2b.exp b/testsuite/systemtap.printf/out2b.exp index 70a98ea2d..bb732c42e 100644 --- a/testsuite/systemtap.printf/out2b.exp +++ b/testsuite/systemtap.printf/out2b.exp @@ -18,24 +18,24 @@ if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} { if {[catch {exec stap -b -o $tmpfile $test} res]} { fail $TEST_NAME puts "stap failed: $res" - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /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 - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /bin/rm -f] [glob "${tmpfile}*"] return } if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { puts "$res" fail $TEST_NAME - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /bin/rm -f] [glob "${tmpfile}*"] return } pass $TEST_NAME -as_root "/bin/rm -f [glob ${tmpfile}*]" +eval [list exec /bin/rm -f] [glob "${tmpfile}*"] diff --git a/testsuite/systemtap.printf/out3b.exp b/testsuite/systemtap.printf/out3b.exp index d49625e9c..5d82512a2 100644 --- a/testsuite/systemtap.printf/out3b.exp +++ b/testsuite/systemtap.printf/out3b.exp @@ -18,24 +18,24 @@ if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} { if {[catch {exec stap -DMAXACTION=100000 -b -o $tmpfile $test} res]} { fail $TEST_NAME puts "stap failed: $res" - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /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 - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /bin/rm -f] [glob "${tmpfile}*"] return } if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { puts "$res" fail $TEST_NAME - as_root "/bin/rm -f [glob ${tmpfile}*]" + eval [list exec /bin/rm -f] [glob "${tmpfile}*"] return } pass $TEST_NAME -as_root "/bin/rm -f [glob ${tmpfile}*]" +eval [list exec /bin/rm -f] [glob "${tmpfile}*"] -- 2.43.5