]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
tests: Only export DEBUGINFOD_URLS when necessary
authorMark Wielaard <mark@klomp.org>
Mon, 6 Sep 2021 22:31:00 +0000 (00:31 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 6 Sep 2021 22:31:05 +0000 (00:31 +0200)
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 <mark@klomp.org>
tests/ChangeLog
tests/run-debuginfod-archive-groom.sh
tests/run-debuginfod-archive-rename.sh
tests/run-debuginfod-federation-link.sh
tests/run-debuginfod-federation-metrics.sh
tests/run-debuginfod-federation-sqlite.sh

index 14eb4d9831770ec5cd4d67d9a98694d6b821c8e2..436a1c452f173290bff3753a1d62c439525eb6b5 100644 (file)
@@ -1,3 +1,13 @@
+2021-09-06  Mark Wielaard  <mark@klomp.org>
+
+       * 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  <mark@klomp.org>
 
        * debuginfod-subr.sh (err): Change ports to port in for loop so both
index 4b991f536469797cf850f71cf9a74766cfea1742..1e61644809a7fe2c25f50b9bb1d6fa6d4e03c259 100755 (executable)
@@ -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
index 38697eee6b0503c73563ed14b5355ad7f7773e2f..7ad4786ec6b882748236ed5e1c9774aa3189f589 100755 (executable)
@@ -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
index ae5d438187c147ae8f10f44fc7255fd22148b2f9..42b8f1014750ea530e308a1bb8671af8deb058ef 100755 (executable)
@@ -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
index 9998a04a0acfc33c4ec39b93e1d927f0e3e8e26f..2e7550a649dddba58bae6704b07444ca32284d2a 100755 (executable)
@@ -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
index d10a3385dad6683b1491645b65ad8412b913ec5d..a323b98e6e548fc86933f76c21479c798bf7d3b8 100755 (executable)
@@ -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