]> sourceware.org Git - systemtap.git/commitdiff
buildid.exp: Now no longer fails on RHEL5
authorChris Meek <cmeek@redhat.com>
Tue, 13 Sep 2011 18:48:06 +0000 (14:48 -0400)
committerChris Meek <cmeek@redhat.com>
Tue, 13 Sep 2011 18:50:55 +0000 (14:50 -0400)
Since systems earlier than RHEL 6 don't have build IDs,
this test used to fail on those systems. Now it just
is untested.

testsuite/systemtap.base/buildid.exp

index d831b33768f773361cc38be9e11354b38560dc25..6cecf9a70e27ba2fea4a466935a5cb817bdcc46b 100644 (file)
@@ -37,6 +37,31 @@ set bid_exepath ./buildid.x
 set res [target_compile "" $bid_exepath executable "additional_flags=buildid.ro"]
 if { [error_handler [expr {$res==""}] "$bid_exepath"] } { return }
 
+# Check that the build ID exists on this system
+set bid_check_passed 0
+set cmd [concat {/usr/bin/eu-readelf -n $bid_exepath}]
+eval spawn $cmd
+expect {
+  -timeout 180
+  -re {^[^\r\n]*GNU_BUILD_ID[^\r\n]*\r\n} {
+    set bid_check_passed 1
+    exp_continue
+  }
+  -re {^[^\r\n]*\r\n} {
+    exp_continue
+  }
+  timeout {
+    set bid_check_passed 0
+  }
+}
+catch close
+
+if {$bid_check_passed == 0} {
+  untested "Build IDs do not exist on this system"
+  cleanup_handler $verbose
+  return
+}
+
 # Since uprobes.ko may not be prebuilt in the runtime, and we don't yet have a
 # way to discover the path to the cache-build uprobes.ko, we need to preload
 # it.  This dummy run lets us go through the motions to get uprobes loaded, and
This page took 0.027904 seconds and 5 git commands to generate.