[gdb/testsuite] Enable gdb.arch/s390-disassembler-options.exp for --enable-targets=all
authorTom de Vries <tdevries@suse.de>
Wed, 30 Nov 2022 17:49:16 +0000 (18:49 +0100)
committerTom de Vries <tdevries@suse.de>
Wed, 30 Nov 2022 17:49:16 +0000 (18:49 +0100)
commita496d4a104f2f8edca9287ab62c8d4031a272035
tree03de97515a3a05d9626237cff3268be7d03c474e
parent885d86436c3f9ab0a13f39647860b526faa92cf8
[gdb/testsuite] Enable gdb.arch/s390-disassembler-options.exp for --enable-targets=all

On s390x-linux, I run into:
...
DUPLICATE: gdb.arch/s390-disassembler-options.exp: \
  show disassembler-options esa
...

First, reproduce this on x86_64-linux with --enable-targets=all, by replacing
the test for 'istarget "s390*-*-*"' with a test for 'get_set_option_choices
"set architecture" "s390"'.

Fix the DUPLICATE by using with_test_prefix.

Also modernize the test-case by using clean_restart instead of gdb_exit/gdb_start.

Tested on x86_64-linux.
gdb/testsuite/gdb.arch/s390-disassembler-options.exp