summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.context
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 /testsuite/systemtap.context
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
Diffstat (limited to 'testsuite/systemtap.context')
-rw-r--r--testsuite/systemtap.context/context.exp9
1 files changed, 5 insertions, 4 deletions
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