]> sourceware.org Git - systemtap.git/commitdiff
Allow sdt_buildid.exp to run with and without DEBUGINFOD_URLS environment var
authorWilliam Cohen <wcohen@redhat.com>
Fri, 20 Oct 2023 15:29:03 +0000 (11:29 -0400)
committerWilliam Cohen <wcohen@redhat.com>
Fri, 20 Oct 2023 15:29:03 +0000 (11:29 -0400)
The sdt_buildid.exp test would have an error and fail to run if the
environment did not have DEBUGINFOD_URLS.  It now checks that the
DEBUGINFOD_URLS environment variable is available before trying to use
it.

testsuite/systemtap.base/sdt_buildid.exp

index c7a3f371f4880aa0ae2e46d802e35e46226a7760..3939159f167daeabd89e644f42672d11eb984bae 100644 (file)
@@ -100,7 +100,11 @@ if [catch {exec /usr/bin/which debuginfod} debuginfod] then {
     # give it time to scan the build directory
     sleep 10
     # XXX: we could expect some verbose traffic
-    set env(DEBUGINFOD_URLS) "http://localhost:$port $env(DEBUGINFOD_URLS)"
+    if [info exists env(DEBUGINFOD_URLS)] {
+       set env(DEBUGINFOD_URLS) "http://localhost:$port $env(DEBUGINFOD_URLS)"
+    } else {
+       set env(DEBUGINFOD_URLS) "http://localhost:$port"
+    }
     verbose -log "started debuginfod on port $port"
 
     set subtest "$test debuginfod buildid-exe buildid-solib"
This page took 0.028908 seconds and 5 git commands to generate.