diff options
| author | Aaron Merey <[email protected]> | 2025-08-10 15:25:39 -0400 |
|---|---|---|
| committer | Aaron Merey <[email protected]> | 2025-08-11 11:54:43 -0400 |
| commit | d7cb72f70377b033028a6d66dd5e27e40832d0d0 (patch) | |
| tree | df053b0ffb1046d19a3a7c78217667eaa6737d15 /tests | |
| parent | 2e2779857e56151d6bcca4e5cbe088ba0fcfd471 (diff) | |
debuginfod-find.c: Avoid leaving temp files in the cache
Add a SIGINT handler to debuginfod-find so that ctrl-c during
a download causes clean up to occur instead of immediately killing
the process and possibly leaving temp files in the client cache.
This change requires setting the client progressfn unconditionally
instead of only when --verbose is given. This in turn requires a small
change to a debuginfod-find testcase in run-debuginfod-artifact-running.sh
to account for output differences between the debuginfod-find progressfn
and the debuginfod_client default_progressfn which was previously used
when debuginfod-find lacked -v but had DEBUGINFOD_PROGRESS=1 set.
https://sourceware.org/bugzilla/show_bug.cgi?id=33163
Signed-off-by: Aaron Merey <[email protected]>
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/run-debuginfod-artifact-running.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/run-debuginfod-artifact-running.sh b/tests/run-debuginfod-artifact-running.sh index df42957b..2d5d834d 100755 --- a/tests/run-debuginfod-artifact-running.sh +++ b/tests/run-debuginfod-artifact-running.sh @@ -105,10 +105,10 @@ cmp $filename F/prog2 grep -q Progress vlog grep -q Downloaded.from vlog tempfiles vlog -filename=`testrun env DEBUGINFOD_PROGRESS=1 ${abs_top_builddir}/debuginfod/debuginfod-find executable $BUILDID2 2>vlog2` +filename=`testrun env DEBUGINFOD_PROGRESS=1 ${abs_top_builddir}/debuginfod/debuginfod-find -v executable $BUILDID2 2>vlog2` cmp $filename F/prog2 -grep -q 'Downloading.*http' vlog2 tempfiles vlog2 +grep -q 'Progress' vlog2 filename=`testrun ${abs_top_builddir}/debuginfod/debuginfod-find source $BUILDID2 ${PWD}/prog2.c` cmp $filename ${PWD}/prog2.c |
