From baeaf0059efac2e8298161b14de86094c770e3e2 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Fri, 20 Oct 2023 11:29:03 -0400 Subject: [PATCH] Allow sdt_buildid.exp to run with and without DEBUGINFOD_URLS environment var 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testsuite/systemtap.base/sdt_buildid.exp b/testsuite/systemtap.base/sdt_buildid.exp index c7a3f371f..3939159f1 100644 --- a/testsuite/systemtap.base/sdt_buildid.exp +++ b/testsuite/systemtap.base/sdt_buildid.exp @@ -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" -- 2.43.5