diff options
author | Josh Stone <jistone@redhat.com> | 2009-08-05 16:55:24 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-08-05 17:06:11 -0700 |
commit | f249edcd5f135278e15ccafb497be520c325a5e4 (patch) | |
tree | bfe1c5c56dc3c19f55406594b7d92a5182ed11f8 /testsuite/systemtap.base/uprobes.exp | |
parent | dceb9cebada8326f7eb5097475303c28e81b105b (diff) | |
download | systemtap-steved-f249edcd5f135278e15ccafb497be520c325a5e4.tar.gz systemtap-steved-f249edcd5f135278e15ccafb497be520c325a5e4.tar.xz systemtap-steved-f249edcd5f135278e15ccafb497be520c325a5e4.zip |
Don't spawn uprobes tests with sudo
Using spawn with sudo doesn't work well, because the password prompt
won't go to the correct TTY. The only reason that the uprobes tests
needed to do this is so uprobes.ko could be built as root. Now instead,
I've added a pre-check that will directly call the uprobes make with
sudo (via the as_root proc).
* testsuite/lib/systemtap.exp (uprobes_p): Check and build uprobes.ko.
* testsuite/systemtap.base/uprobes.exp: Use uprobes_p; don't spawn sudo.
* testsuite/systemtap.base/bz6850.exp: Ditto.
* testsuite/systemtap.base/bz10078.exp: Ditto.
* testsuite/systemtap.base/bz6905.exp: sudo isn't needed for -p2.
Diffstat (limited to 'testsuite/systemtap.base/uprobes.exp')
-rw-r--r-- | testsuite/systemtap.base/uprobes.exp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/testsuite/systemtap.base/uprobes.exp b/testsuite/systemtap.base/uprobes.exp index 6344cbf0..bdd620b3 100644 --- a/testsuite/systemtap.base/uprobes.exp +++ b/testsuite/systemtap.base/uprobes.exp @@ -18,7 +18,7 @@ if [file exists $path] then { pass "$test prep" } else { fail "$test prep" } catch {exec gcc -g -o jennie jennie.c} err if {$err == "" && [file exists jennie]} then { pass "$test compile" } else { fail "$test compile" } -if {![utrace_p]} { +if {! [uprobes_p]} { untested "$test -p4"; untested "$test -p5" catch {exec rm -f jennie.c jennie} return @@ -33,9 +33,7 @@ if {! [installtest_p]} { return } -# Pick up the stap being tested. -set stapexe [exec /usr/bin/which stap] -spawn sudo $stapexe $srcdir/$subdir/uprobes.stp -w -c "./jennie 1 2 3 4" +spawn stap $srcdir/$subdir/uprobes.stp -w -c "./jennie 1 2 3 4" set ok 0 expect { -re {^process[^\r\n]*jennie[^\r\n]*main[^\r\n]*argc=0x[1-5][^\r\n]*\r\n} { incr ok; exp_continue } |