From 8e6335965169b37a977fd923ddf7bbe9fd5c3aef Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 4 Oct 2008 17:38:07 +0200 Subject: Guess where debuginfo is installed for debugpath.exp test. --- testsuite/systemtap.base/debugpath.exp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'testsuite/systemtap.base') diff --git a/testsuite/systemtap.base/debugpath.exp b/testsuite/systemtap.base/debugpath.exp index 9c42295d..bc92c081 100644 --- a/testsuite/systemtap.base/debugpath.exp +++ b/testsuite/systemtap.base/debugpath.exp @@ -11,7 +11,17 @@ wait set test "debugpath-good" set uname [exec /bin/uname -r] -spawn env SYSTEMTAP_DEBUGINFO_PATH=/lib/modules/$uname/build stap -e "probe kernel.function(\"sys_open\") {}" -p2 + +# Guess where debuginfo is installed +if [file isdirectory /usr/lib/debug/lib/modules/$uname] { + set debuginfo_path "/usr/lib/debug/lib/modules/$uname" +} elseif [file isdirectory /lib/modules/$uname/build] { + set debuginfo_path "/lib/modules/$uname/build" +} else { + set debuginfo_path "/lib/modules/$uname" +} + +spawn env SYSTEMTAP_DEBUGINFO_PATH=$debuginfo_path stap -e "probe kernel.function(\"sys_open\") {}" -p2 expect { -re {kernel.function.*pc=} { pass $test } timeout { fail "$test (timeout2)" } -- cgit