From: Mark Wielaard Date: Mon, 6 Sep 2021 19:48:38 +0000 (+0200) Subject: tests: Set DEBUGINFOD_CACHE_PATH for run-debuginfod-{file,query-retry}.sh X-Git-Tag: elfutils-0.186~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44a36e39fc7df2a3e2f9f278f79f65233d774a48;p=thirdparty%2Felfutils.git tests: Set DEBUGINFOD_CACHE_PATH for run-debuginfod-{file,query-retry}.sh --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 178697bb7..c1760877f 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 22c956dd1..341bbc681 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 3c5542d58..c9192510e 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