summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2008-10-04 17:38:07 +0200
committerMark Wielaard <mjw@redhat.com>2008-10-04 17:38:07 +0200
commit8e6335965169b37a977fd923ddf7bbe9fd5c3aef (patch)
tree3535ef3f3d9667621817b17b45e22e3e59bbcc6c
parent46fc0cc436ba4b2418082c1424f2ce205d35c95d (diff)
downloadsystemtap-steved-8e6335965169b37a977fd923ddf7bbe9fd5c3aef.tar.gz
systemtap-steved-8e6335965169b37a977fd923ddf7bbe9fd5c3aef.tar.xz
systemtap-steved-8e6335965169b37a977fd923ddf7bbe9fd5c3aef.zip
Guess where debuginfo is installed for debugpath.exp test.
-rw-r--r--testsuite/ChangeLog5
-rw-r--r--testsuite/systemtap.base/debugpath.exp12
2 files changed, 16 insertions, 1 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index 041df499..5ddee32c 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-04 Mark Wielaard <mjw@redhat.com>
+
+ * systemtap.base/debugpath.exp: Guess a bit more intelligently
+ where debuginfo is installed.
+
2008-10-03 Mark Wielaard <mjw@redhat.com>
* systemtap.base/global_end.exp: Adjust expected foreach ordering.
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)" }