From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 1/2] [gdb/testsuite] Use proc readnow in two test-cases
Date: Sat, 22 Jul 2023 11:00:43 +0200 [thread overview]
Message-ID: <20230722090044.18503-1-tdevries@suse.de> (raw)
Use "require !readnow" in two test-cases, instead of the written-out variant.
Tested on x86_64-linux, with target boards unix and readnow.
---
.../gdb.arch/arm-pthread_cond_timedwait-bt.exp | 11 ++++-------
gdb/testsuite/gdb.base/readnever.exp | 11 ++++-------
2 files changed, 8 insertions(+), 14 deletions(-)
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 <http://www.gnu.org/licenses/>.
+# 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 } {
base-commit: 6fbe38ce1170415bc1d2fe596911a056091949de
--
2.35.3
next reply other threads:[~2023-07-22 9:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-22 9:00 Tom de Vries [this message]
2023-07-22 9:00 ` [pushed 2/2] [gdb/testsuite] Improve gdb.arch/arm-pthread_cond_timedwait-bt.exp Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230722090044.18503-1-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).