]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
tests: Set DEBUGINFOD_CACHE_PATH for run-debuginfod-{file,query-retry}.sh
authorMark Wielaard <mark@klomp.org>
Mon, 6 Sep 2021 19:48:38 +0000 (21:48 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 6 Sep 2021 19:48:38 +0000 (21:48 +0200)
tests/ChangeLog
tests/run-debuginfod-file.sh
tests/run-debuginfod-query-retry.sh

index 178697bb7216fd82fa95b6b251cfe049bee8599b..c1760877f77114d9ca51dc7a64fc72f64f224f90 100644 (file)
@@ -1,3 +1,10 @@
+2021-09-06  Mark Wielaard  <mark@klomp.org>
+
+       * 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  <mark@klomp.org>
 
        * run-debuginfod-000-permission.sh: Set DEBUGINFOD_CACHE_PATH
index 22c956dd1869ba708ae84020e160ec940d2f91d6..341bbc6813ad771839259caedaf83c87d1c3d65a 100755 (executable)
@@ -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
 
index 3c5542d58737c82f9632a28eb2a0036c65e64ae3..c9192510e205f294922c1140fffdefcc9d2946db 100755 (executable)
@@ -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