From ebcb173dc614db9a143febec19c8fc6a7b17cf2a Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 13 Nov 2008 16:24:30 +0100 Subject: Testsuite, pick up the correct stap being tested when executing under sudo. --- testsuite/systemtap.base/bz6850.exp | 4 +++- testsuite/systemtap.base/uprobes.exp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'testsuite/systemtap.base') diff --git a/testsuite/systemtap.base/bz6850.exp b/testsuite/systemtap.base/bz6850.exp index cd56ddce..b06b1696 100644 --- a/testsuite/systemtap.base/bz6850.exp +++ b/testsuite/systemtap.base/bz6850.exp @@ -8,7 +8,9 @@ if {$rc == 0} then { pass "$test -p4" } else { fail "$test -p4" } if {! [installtest_p]} { untested "$test -p5"; return } -spawn sudo stap $srcdir/$subdir/bz6850.stp -c ./bz6850 +# Pick up the stap being tested. +set stapexe [exec /usr/bin/which stap] +spawn sudo $stapexe $srcdir/$subdir/bz6850.stp -c ./bz6850 expect { -timeout 60 -re {[^\r\n]*called\r\n} { exp_continue } diff --git a/testsuite/systemtap.base/uprobes.exp b/testsuite/systemtap.base/uprobes.exp index 02a0fd33..c1b9968c 100644 --- a/testsuite/systemtap.base/uprobes.exp +++ b/testsuite/systemtap.base/uprobes.exp @@ -23,7 +23,9 @@ if {$rc == 0} then { pass "$test -p4" } else { fail "$test -p4" } if {! [installtest_p]} { untested "$test -p5"; exec rm -f jennie.c jennie; return } -spawn sudo stap -v $srcdir/$subdir/uprobes.stp -c "./jennie 1 2 3 4" +# Pick up the stap being tested. +set stapexe [exec /usr/bin/which stap] +spawn sudo $stapexe -v $srcdir/$subdir/uprobes.stp -c "./jennie 1 2 3 4" set ok 0 expect { -re {^Pass[^\r\n]*\r\n} { exp_continue } -- cgit