[Bug find-debuginfo/30505] unchecked "gdb-add-index" invocation
mark at klomp dot org
sourceware-bugzilla@sourceware.org
Tue Aug 20 14:56:21 GMT 2024
https://sourceware.org/bugzilla/show_bug.cgi?id=30505
--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
commit dfe1f7ff30f4e0be538835fca1e6348723ea7aa7
Author: Keith Seitz <keiths@redhat.com>
Date: Fri Aug 16 11:54:20 2024 -0700
find-debuginfo.sh: Exit with real exit status in parallel jobs
Currently, when the script is executed in parallel (-jN), the
resulting exit status will always be 0.
The script execs an appropriate number of clones of itself, calling
run_job to run the actual workload. This then calls do_file(), saving
the exit status into "res.$jobid".
In do_file(), though, if an error occurs, exit is called. This causes
the entire exec'd shell to exit with status 0 (since there are almost
always echo calls as the last executed statement). The real exit
status is therefor never written to the "res.$jobid" files by run_job().
The simple solution is to use 'return' instead of 'exit'. A number
of minor adjustments are also made to propagate this properly so that
it is reported as the correct exit status.
While at it, I've incorporated a patch for find-debuginfo/30505.
Using this patch and another patch to the RPM package (submitted as
github issue #3215), failures of gdb-add-index.sh will now properly fail
the build instead of being swallowed. It should be much easier for
developers to figure out why their builds have failed should gdb crash.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30505
Signed-off-by: Keith Seitz <keiths@redhat.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Debugedit
mailing list