]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Fix require dwarf2_support check in some test-cases
authorTom de Vries <tdevries@suse.de>
Tue, 26 Aug 2025 10:24:19 +0000 (12:24 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 26 Aug 2025 10:24:19 +0000 (12:24 +0200)
commit81e5a23c7b8008d3460f8d0c8050d886fe754523
tree75ce584824bc25c0d2969661df85115f0911469d
parent71897894a941967f50764a7e65ba44f28c137091
[gdb/testsuite] Fix require dwarf2_support check in some test-cases

On x86_64-freebsd, I ran into trouble with test-case
gdb.dwarf2/macro-source-path-clang14-dw4.exp (and similar), and I managed to
reproduce the problem on x86_64-linux by making dwarf2_support return 0.

The failure looks like:
...
UNSUPPORTED: $exp: require failed: dwarf2_support
UNRESOLVED: $exp: testcase aborted due to invalid command name: do_test
ERROR: tcl error sourcing $exp.
...

I fixed a similar problem in commit 3e488d8ccd0 ("[gdb/testsuite] Fix
gdb.dwarf2/dw-form-strx-out-of-bounds.exp with make-check-all.sh").

Fix this by moving "require dwarf2_support" from
gdb.dwarf2/macro-source-path.exp.tcl to the files including it.

Tested on x86_64-linux.
gdb/testsuite/gdb.dwarf2/macro-source-path-clang14-dw4.exp
gdb/testsuite/gdb.dwarf2/macro-source-path-clang14-dw5.exp
gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld234-dw5.exp
gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld238-dw4.exp
gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld238-dw5.exp
gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl