summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFrank Ch. Eigler <[email protected]>2025-03-05 15:23:49 -0500
committerFrank Ch. Eigler <[email protected]>2025-03-05 15:23:49 -0500
commit31867d468c10d26ee13efb93f5d7ddf2bcadf253 (patch)
treea108215c32489080b3e6a22d64702ee22d7f2339 /tests
parentc65c467e83431ec5189f65fe11ad9a01d82af217 (diff)
PR31862: debuginfod: client to cache x-debuginfod-* headers
This feature allows the extra http headers from debuginfod to be saved into the client cache, and also thus replayed to clients. This way they can perform IMA verification again, if they like, or a federating caching intermediate debuginfod server can replay the headers it received previously from upstream to future downstream. The headers are placed adjacent to the payload files .cache/debuginfod/BUILDID/PAYLOAD as .cache/debuginfod/BUILDID/hdr-PAYLOAD. They are aged the same atime-based way. Testing via an extension of a previous small test, and hand-running both client & server code under valgrind. No memcheck errors reported. Signed-off-by: Frank Ch. Eigler <[email protected]>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run-debuginfod-artifact-running.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/run-debuginfod-artifact-running.sh b/tests/run-debuginfod-artifact-running.sh
index 8b9aed37..df42957b 100755
--- a/tests/run-debuginfod-artifact-running.sh
+++ b/tests/run-debuginfod-artifact-running.sh
@@ -116,4 +116,11 @@ cmp $filename ${PWD}/prog2.c
kill $PID1
wait $PID1
PID1=0
+
+# PR31862: after killing debuginfod, check that the cached version still exists and holds headers!
+(DEBUGINFOD_VERBOSE=1; export DEBUGINFOD_VERBOSE
+ testrun ${abs_top_builddir}/debuginfod/debuginfod-find -v debuginfo $BUILDID2 2>&1) | tee vlog3
+tempfiles vlog3
+grep -i x-debuginfod vlog3
+
exit 0