[gdb/testsuite] Use require for ensure_gdb_index
authorTom de Vries <tdevries@suse.de>
Mon, 11 Oct 2021 10:21:00 +0000 (12:21 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 11 Oct 2021 10:21:00 +0000 (12:21 +0200)
commit19abf6c542ed3d374558f52688af3f9390487593
tree7f5d1b053c1ae8706ad5e920f291bb1d8a62855c
parentdbfc69bef9d6f211fa1b42ee38c2e678079def3a
[gdb/testsuite] Use require for ensure_gdb_index

Replace:
...
if { [ensure_gdb_index $binfile] == -1 } {
    return -1
}
...
with:
...
require {ensure_gdb_index $binfile} != -1
...
and consequently, add a missing UNTESTED message.

Tested on x86_64-linux, both with native and target board readnow.
gdb/testsuite/gdb.base/with-mf.exp
gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
gdb/testsuite/gdb.rust/dwindex.exp
gdb/testsuite/lib/gdb.exp