GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
testsuite

Correct error handling for scan-symbol-common

Improves testsuite robustness by fixing error reporting for scan-symbol tests.

This commit refactors GCC’s testsuite to correctly handle errors and return values from the scan-symbol-common function. It addresses issues where arguments were incorrectly concatenated and where early exits lacked return values, leading to inaccurate test results or failures. The changes ensure that tool failures and skipped tests are reported consistently, improving the reliability of test execution.

In Details

The scan-symbol and scan-symbol-not testsuite helper functions in GCC's testsuite have been updated to correctly invoke scan-symbol-common using eval to prevent argument folding and to properly handle its return values. scan-symbol-common now returns specific error codes (-2 for skipped, -1 for tool failure) and treats missing output files as tool failures, enhancing the robustness and clarity of test result reporting.

For Context
scan-symbol
A GCC testsuite helper function used to verify the presence or absence of specific symbols in compiled object files or binaries.
dejagnu
A testing framework used by GCC and other projects to write and run test suites, providing control flow and result reporting.
Tcl
Tool Command Language, a scripting language often used by testing frameworks like DejaGNU for test suite control.
Filed Under: testsuitebugfix