binutils: don't abort debuginfod.exp when the server cleanup kill fails
Fixes a testsuite issue where a failed kill command during debuginfod server cleanup caused the entire test file to abort instead of just failing the specific…
A patch addresses a bug in the binutils testsuite where a non-zero exit code from the kill command during debuginfod server cleanup would cause the DejaGnu test framework to abort the entire test file. This prevented subsequent tests from running. The fix wraps the kill commands in catch to prevent this spurious abort, allowing the test to report a failure but continue execution.
- proposer
Submits a patch to wrap `kill` commands in `catch` within the `debuginfod.exp` test script.
“Wrap both kills in catch, matching the adjacent cleanup calls. The FAIL is still reported; only the spurious abort goes away.”
- contributor
Describes the problem where `exec kill` errors propagate and abort the test, explaining it happens when `debuginfod` fails to initialize and the cleanup path is taken.
“Both debuginfod.exp cleanup paths call exec kill -INT -[exp_pid] uncaught, unlike the catch{}-wrapped close/wait that immediately follows. Tcl's exec raises an error when the child exits non-zero, so if the kill fails the error propagates out of the testcase and DejaGnu aborts the whole file: ERROR: tcl error sourcing .../debuginfod.exp. ERROR: tcl error code CHILDSTATUS 76409 1 ERROR…”
Technical Tradeoffs
- Masking underlying issues with `kill` success/failure in favor of test case continuity.
In Details
This discussion addresses a flaw in the binutils testsuite's debuginfod.exp script. When the debuginfod server fails to start and its cleanup process involves killing the server's process, an uncaught exception from the exec kill command can cause DejaGnu to abort the entire test file. This patch ensures that the kill command is handled within a catch block, preventing the test runner from aborting prematurely and allowing other tests to execute.
- debuginfod
- A server that provides debugging information (like DWARF symbols) over the network, used to speed up debugging processes.
- dejagnu
- A testing framework used for testing compilers and other tools, which relies on Tcl scripting for test case definition and execution.
- Tcl
- Tool Command Language, a dynamic scripting language often used for building GUIs and test harnesses for software development tools.
- UNRESOLVED
- A test result status in DejaGnu indicating that a test case was aborted due to an error, preventing its completion.
- FAIL
- A test result status in DejaGnu indicating that a test case executed but did not produce the expected outcome.