summaryrefslogtreecommitdiff
path: root/tests/run-debuginfod-federation-link.sh
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2021-09-09 18:50:54 +0200
committerMark Wielaard <mark@klomp.org>2021-09-09 18:50:54 +0200
commitfdbf472a7b0120ec66b546a3067d67bbf8e17f8a (patch)
tree8318c7d0de6995289c02385f0bb299ea54d66abe /tests/run-debuginfod-federation-link.sh
parentc1a67b39611f3e396121cf5333b0e77b537e9741 (diff)
downloadelfutils-fdbf472a7b0120ec66b546a3067d67bbf8e17f8a.tar.gz
tests: Cleanup error handling and don't share cache between servers/client
There were still three tests that shared a cache between the servers and client that queried those servers. Give them all separate caches. Also the error handler for debuginfod tests wasn't called when a command inside a function failed. Since testrun is a function, there would be no metrics or error log files listed if the testrun command failed. Making it hard to see what went wrong. Fix this by using set -o errtrace Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'tests/run-debuginfod-federation-link.sh')
-rwxr-xr-xtests/run-debuginfod-federation-link.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/run-debuginfod-federation-link.sh b/tests/run-debuginfod-federation-link.sh
index 050bcbcf..1347e7b8 100755
--- a/tests/run-debuginfod-federation-link.sh
+++ b/tests/run-debuginfod-federation-link.sh
@@ -98,6 +98,9 @@ wait_ready $PORT2 'thread_busy{role="http-metrics"}' 1
# have clients contact the new server
export DEBUGINFOD_URLS=http://127.0.0.1:$PORT2
+# Use fresh cache for debuginfod-find client requests
+export DEBUGINFOD_CACHE_PATH=${PWD}/.client_cache3
+mkdir -p $DEBUGINFOD_CACHE_PATH
if type bsdtar 2>/dev/null; then
# copy in the deb files
@@ -117,7 +120,6 @@ if type bsdtar 2>/dev/null; then
archive_test f17a29b5a25bd4960531d82aa6b07c8abe84fa66 "" ""
fi
-rm -rf $DEBUGINFOD_CACHE_PATH
testrun ${abs_top_builddir}/debuginfod/debuginfod-find debuginfo $BUILDID
# send a request to stress XFF and User-Agent federation relay;
@@ -148,8 +150,7 @@ export DEBUGINFOD_URLS=127.0.0.1:$PORT2
testrun ${abs_top_builddir}/debuginfod/debuginfod-find debuginfo $BUILDID
# test parallel queries in client
-export DEBUGINFOD_CACHE_PATH=${PWD}/.client_cache3
-mkdir -p $DEBUGINFOD_CACHE_PATH
+rm -rf $DEBUGINFOD_CACHE_PATH
export DEBUGINFOD_URLS="BAD http://127.0.0.1:$PORT1 127.0.0.1:$PORT1 http://127.0.0.1:$PORT2 DNE"
testrun ${abs_builddir}/debuginfod_build_id_find -e F/prog 1