]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Fix gdb.dwarf2/dw-form-strx-out-of-bounds.exp with make-check-all.sh
authorTom de Vries <tdevries@suse.de>
Tue, 20 May 2025 09:10:29 +0000 (11:10 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 20 May 2025 09:10:29 +0000 (11:10 +0200)
commit3e488d8ccd0fb25d9c2d33feceb9eac3e336c1b0
tree54421cf829d7b335e96115b1c029f57a7c3673af
parent0cc61ecfce276277daea94de0f88dd2053daea51
[gdb/testsuite] Fix gdb.dwarf2/dw-form-strx-out-of-bounds.exp with make-check-all.sh

I forgot to run test-case gdb.dwarf2/dw-form-strx-out-of-bounds.exp with
make-check-all.sh, and consequently failed to notice that it fails with for
instance target board fission-dwp.

The test-case does:
...
source $srcdir/$subdir/dw-form-strx.exp.tcl
...
and in that tcl file, prepare_for_testing fails, so a -1 is returned, but
that is ignored by the source command.

Fix this by using require, but rather that testing the result of the source
command, communicate success by setting a global variable
prepare_for_testing_done.

Likewise in gdb.dwarf2/dw-form-strx.exp.

Also, the test-case gdb.dwarf2/dw-form-strx-out-of-bounds.exp fails for target
board readnow, because the DWARF error occurs during a different command than
expected.

Fix this by just skipping the test-case in that case.

Tested on x86_64-linux.

Reported-by: Simon Marchi <simark@simark.ca>
Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.dwarf2/dw-form-strx-out-of-bounds.exp
gdb/testsuite/gdb.dwarf2/dw-form-strx.exp
gdb/testsuite/gdb.dwarf2/dw-form-strx.exp.tcl