+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
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.
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
########################################################################
# 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