diff options
author | wcohen <wcohen> | 2008-01-07 21:12:53 +0000 |
---|---|---|
committer | wcohen <wcohen> | 2008-01-07 21:12:53 +0000 |
commit | 14b31996a7752ab19f1b9017c65742c866394c1e (patch) | |
tree | 5b3fb62b169ca06f9c7bb380a1fe032ebcfc4ab7 /testsuite/systemtap.context/context.exp | |
parent | b5121873c8e4cf5c89105d93b76c1fe7c8f10811 (diff) | |
download | systemtap-steved-14b31996a7752ab19f1b9017c65742c866394c1e.tar.gz systemtap-steved-14b31996a7752ab19f1b9017c65742c866394c1e.tar.xz systemtap-steved-14b31996a7752ab19f1b9017c65742c866394c1e.zip |
2008-01-07 William Cohen <wcohen@redhat.com>
* 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.
Diffstat (limited to 'testsuite/systemtap.context/context.exp')
-rw-r--r-- | testsuite/systemtap.context/context.exp | 9 |
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 |