From 44a36e39fc7df2a3e2f9f278f79f65233d774a48 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 6 Sep 2021 21:48:38 +0200 Subject: [PATCH] tests: Set DEBUGINFOD_CACHE_PATH for run-debuginfod-{file,query-retry}.sh --- tests/ChangeLog | 7 +++++++ tests/run-debuginfod-file.sh | 6 +++--- tests/run-debuginfod-query-retry.sh | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index 178697bb..c1760877 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,10 @@ +2021-09-06 Mark Wielaard + + * run-debuginfod-file.sh: Set DEBUGINFOD_CACHE_PATH. Export + correct DEBUGINFOD_URLS. + * run-debuginfod-query-retry.sh: Add DEBUGINFOD_CACHE_PATH + to env. + 2021-09-03 Mark Wielaard * run-debuginfod-000-permission.sh: Set DEBUGINFOD_CACHE_PATH diff --git a/tests/run-debuginfod-file.sh b/tests/run-debuginfod-file.sh index 22c956dd..341bbc68 100755 --- a/tests/run-debuginfod-file.sh +++ b/tests/run-debuginfod-file.sh @@ -22,7 +22,7 @@ set -x unset VALGRIND_CMD -export DEBUGINFOD_URLS=http://127.0.0.1:$PORT1/ # or without trailing / +export DEBUGINFOD_CACHE_PATH=${PWD}/.client_cache # Test fetching a file using file:// . No debuginfod server needs to be run for # this test. @@ -30,11 +30,11 @@ local_dir=${PWD}/mocktree/buildid/aaaaaaaaaabbbbbbbbbbccccccccccdddddddddd/sourc mkdir -p ${local_dir} echo "int main() { return 0; }" > ${local_dir}/main.c # first test that is doesn't work, when no DEBUGINFOD_URLS is set -DEBUGINFOD_URLS="" +export DEBUGINFOD_URLS="" testrun ${abs_top_builddir}/debuginfod/debuginfod-find source aaaaaaaaaabbbbbbbbbbccccccccccdddddddddd /my/path/main.c && false || true # Now test is with proper DEBUGINFOD_URLS -DEBUGINFOD_URLS="file://${PWD}/mocktree/" +export DEBUGINFOD_URLS="file://${PWD}/mocktree/" filename=`testrun ${abs_top_builddir}/debuginfod/debuginfod-find source aaaaaaaaaabbbbbbbbbbccccccccccdddddddddd /my/path/main.c` cmp $filename ${local_dir}/main.c diff --git a/tests/run-debuginfod-query-retry.sh b/tests/run-debuginfod-query-retry.sh index 3c5542d5..c9192510 100755 --- a/tests/run-debuginfod-query-retry.sh +++ b/tests/run-debuginfod-query-retry.sh @@ -24,7 +24,7 @@ unset VALGRIND_CMD ######################################################################## # set up tests for retrying failed queries. -retry_attempts=`(testrun env DEBUGINFOD_URLS=http://255.255.255.255/JUNKJUNK DEBUGINFOD_RETRY_LIMIT=10 DEBUGINFOD_VERBOSE=1 \ +retry_attempts=`(testrun env DEBUGINFOD_URLS=http://255.255.255.255/JUNKJUNK DEBUGINFOD_RETRY_LIMIT=10 DEBUGINFOD_VERBOSE=1 DEBUGINFOD_CACHE_PATH=${PWD}/.client_cache \ ${abs_top_builddir}/debuginfod/debuginfod-find debuginfo /bin/ls || true) 2>&1 >/dev/null \ | grep -c 'Retry failed query'` if [ $retry_attempts -ne 10 ]; then -- 2.32.0