From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 78F0A3857C60 for ; Mon, 6 Sep 2021 23:03:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 78F0A3857C60 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x11.wildebeest.org [172.31.17.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 23D00300BC88; Tue, 7 Sep 2021 01:03:44 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id E46D62E82169; Tue, 7 Sep 2021 01:03:43 +0200 (CEST) From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: Mark Wielaard Subject: [COMMITTED] tests: Only export DEBUGINFOD_URLS when necessary Date: Tue, 7 Sep 2021 01:03:36 +0200 Message-Id: <20210906230336.187824-1-mark@klomp.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_BADIPHTTP, KAM_DMARC_STATUS, NUMERIC_HTTP_ADDR, SPF_HELO_NONE, SPF_PASS, TXREP, WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2021 23:03:48 -0000 A couple of test set DEBUGINFOD_URLS before starting a debuginfd server causing the server to query itself or a nonexisting debuginfod server as delegate. In most cases it should be set after, except for the testcase that explicitly checks for errors when using an invalid URL. Signed-off-by: Mark Wielaard --- tests/ChangeLog | 10 ++++++++++ tests/run-debuginfod-archive-groom.sh | 3 ++- tests/run-debuginfod-archive-rename.sh | 3 ++- tests/run-debuginfod-federation-link.sh | 1 - tests/run-debuginfod-federation-metrics.sh | 2 +- tests/run-debuginfod-federation-sqlite.sh | 1 - 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index 14eb4d98..436a1c45 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,13 @@ +2021-09-06 Mark Wielaard + + * run-debuginfod-archive-groom.sh: Set DEBUGINFOD_URLS after starting + debuginfod server. + * run-debuginfod-archive-rename.sh: Likewise. + * run-debuginfod-federation-link.sh: Don't set DEBUGINFOD_URLS. + * run-debuginfod-federation-sqlite.sh: Likewise. + * run-debuginfod-federation-metrics.sh: Add comment why invalid + DEBUGINFOD_URLS is set. + 2021-09-06 Mark Wielaard * debuginfod-subr.sh (err): Change ports to port in for loop so both diff --git a/tests/run-debuginfod-archive-groom.sh b/tests/run-debuginfod-archive-groom.sh index 4b991f53..1e616448 100755 --- a/tests/run-debuginfod-archive-groom.sh +++ b/tests/run-debuginfod-archive-groom.sh @@ -29,7 +29,6 @@ DB=${PWD}/.debuginfod_tmp.sqlite tempfiles $DB export DEBUGINFOD_CACHE_PATH=${PWD}/.client_cache export DEBUGINFOD_TIMEOUT=10 -export DEBUGINFOD_URLS='http://127.0.0.1:'$PORT1 # Clean old dirictories mkdir R ${PWD}/F @@ -112,6 +111,8 @@ rm -rf extracted wait_ready $PORT1 'found_sourcerefs_total{source=".rpm archive"}' $sourcefiles +export DEBUGINFOD_URLS=http://127.0.0.1:$PORT1 + # common source file sha1 SHA=f4a1a8062be998ae93b8f1cd744a398c6de6dbb1 # fedora31 diff --git a/tests/run-debuginfod-archive-rename.sh b/tests/run-debuginfod-archive-rename.sh index 38697eee..7ad4786e 100755 --- a/tests/run-debuginfod-archive-rename.sh +++ b/tests/run-debuginfod-archive-rename.sh @@ -28,7 +28,6 @@ get_ports DB=${PWD}/.debuginfod_tmp.sqlite export DEBUGINFOD_CACHE_PATH=${PWD}/.client_cache export DEBUGINFOD_TIMEOUT=10 -export DEBUGINFOD_URLS='http://127.0.0.1:'$PORT1 tempfiles $DEBUGINFOD_CACHE_PATH $DB # Clean old dirictories mkdir R ${PWD}/F @@ -84,6 +83,8 @@ wait_ready $PORT1 'thread_work_total{role="traverse"}' 4 wait_ready $PORT1 'thread_work_pending{role="scan"}' 0 wait_ready $PORT1 'thread_busy{role="scan"}' 0 +export DEBUGINFOD_URLS=http://127.0.0.1:$PORT1 + # retest rhel7 archive_test bc1febfd03ca05e030f0d205f7659db29f8a4b30 /usr/src/debug/hello-1.0/hello.c $SHA archive_test f0aa15b8aba4f3c28cac3c2a73801fefa644a9f2 /usr/src/debug/hello-1.0/hello.c $SHA diff --git a/tests/run-debuginfod-federation-link.sh b/tests/run-debuginfod-federation-link.sh index ae5d4381..42b8f101 100755 --- a/tests/run-debuginfod-federation-link.sh +++ b/tests/run-debuginfod-federation-link.sh @@ -25,7 +25,6 @@ unset VALGRIND_CMD DB=${PWD}/.debuginfod_tmp.sqlite export DEBUGINFOD_CACHE_PATH=${PWD}/.client_cache export DEBUGINFOD_TIMEOUT=10 -export DEBUGINFOD_URLS='http://127.0.0.1:'$PORT1 tempfiles $DB # Clean old dirictories diff --git a/tests/run-debuginfod-federation-metrics.sh b/tests/run-debuginfod-federation-metrics.sh index 9998a04a..2e7550a6 100755 --- a/tests/run-debuginfod-federation-metrics.sh +++ b/tests/run-debuginfod-federation-metrics.sh @@ -25,7 +25,7 @@ unset VALGRIND_CMD DB=${PWD}/.debuginfod_tmp.sqlite export DEBUGINFOD_CACHE_PATH=${PWD}/.client_cache export DEBUGINFOD_TIMEOUT=10 -export DEBUGINFOD_URLS='http://127.0.0.1:0' # Note invalid +export DEBUGINFOD_URLS='http://127.0.0.1:0' # Note invalid, will trigger error_count metric tempfiles $DB # Clean old dirictories mkdir D L F diff --git a/tests/run-debuginfod-federation-sqlite.sh b/tests/run-debuginfod-federation-sqlite.sh index d10a3385..a323b98e 100755 --- a/tests/run-debuginfod-federation-sqlite.sh +++ b/tests/run-debuginfod-federation-sqlite.sh @@ -25,7 +25,6 @@ unset VALGRIND_CMD DB=${PWD}/.debuginfod_tmp.sqlite export DEBUGINFOD_CACHE_PATH=${PWD}/.client_cache export DEBUGINFOD_TIMEOUT=10 -export DEBUGINFOD_URLS='http://127.0.0.1:0' # Note invalid tempfiles $DB # Clean old dirictories -- 2.32.0