From: Tom de Vries Date: Sat, 22 Jul 2023 09:00:25 +0000 (+0200) Subject: [gdb/testsuite] Use proc readnow in two test-cases X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09075d5d4a2b6dbbc3ca20e2b963799b4c5d638d;p=binutils-gdb.git [gdb/testsuite] Use proc readnow in two test-cases Use "require !readnow" in two test-cases, instead of the written-out variant. Tested on x86_64-linux, with target boards unix and readnow. --- diff --git a/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp b/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp index 0cf7f273b39..17f8d68b847 100644 --- a/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp +++ b/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp @@ -17,6 +17,10 @@ # syscall is active. But some active syscalls keep PC pointing to the SVC # instruction itself. +# See if we have target board readnow.exp or similar. We're using +# --readnever, which is not allowed in combination with --readnow. +require !readnow + standard_testfile if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ @@ -24,13 +28,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return } -# See if we have target board readnow.exp or similar. -if { [lsearch -exact $GDBFLAGS -readnow] != -1 \ - || [lsearch -exact $GDBFLAGS --readnow] != -1 } { - untested "--readnever not allowed in combination with --readnow" - return -1 -} - save_vars { GDBFLAGS } { append GDBFLAGS " --readnever" if { [clean_restart ${binfile}] == -1 } { diff --git a/gdb/testsuite/gdb.base/readnever.exp b/gdb/testsuite/gdb.base/readnever.exp index 765b5bda062..8a21c4117d0 100644 --- a/gdb/testsuite/gdb.base/readnever.exp +++ b/gdb/testsuite/gdb.base/readnever.exp @@ -13,6 +13,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# See if we have target board readnow.exp or similar. We're using +# --readnever, which is not allowed in combination with --readnow. +require !readnow + standard_testfile .c if { [build_executable "failed to build" $testfile $srcfile { debug }] == -1 } { @@ -20,13 +24,6 @@ if { [build_executable "failed to build" $testfile $srcfile { debug }] == -1 } { return -1 } -# See if we have target board readnow.exp or similar. -if { [lsearch -exact $GDBFLAGS -readnow] != -1 \ - || [lsearch -exact $GDBFLAGS --readnow] != -1 } { - untested "--readnever not allowed in combination with --readnow" - return -1 -} - save_vars { GDBFLAGS } { append GDBFLAGS " --readnever" if { [clean_restart ${binfile}] == -1 } {