public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Minor "require" fixups
Date: Fri, 27 Jan 2023 01:29:10 +0000 (GMT)	[thread overview]
Message-ID: <20230127012910.9AFC43858D20@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=eacd228909680afd71ba4e36e64b147c402b6802

commit eacd228909680afd71ba4e36e64b147c402b6802
Author: Tom Tromey <tom@tromey.com>
Date:   Wed Jan 25 09:43:03 2023 -0700

    Minor "require" fixups
    
    I found a couple of spots that could use "require", and one spot where
    hoisting the "require" closer to the top of the file made it more
    clear.

Diff:
---
 gdb/testsuite/gdb.btrace/enable.exp                   | 5 +----
 gdb/testsuite/gdb.mi/list-thread-groups-available.exp | 3 +--
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/gdb/testsuite/gdb.btrace/enable.exp b/gdb/testsuite/gdb.btrace/enable.exp
index 6a30d7d9187..bedff46ddb6 100644
--- a/gdb/testsuite/gdb.btrace/enable.exp
+++ b/gdb/testsuite/gdb.btrace/enable.exp
@@ -76,10 +76,7 @@ gdb_exit
 # skip the rerun test when using gdbserver
 # otherwise rerun twice, target should be automatically disabled
 load_lib gdbserver-support.exp
-if {![allow_gdbserver_tests]} {
-    unsupported "target does not support gdbserver"
-    return 0
-}
+require allow_gdbserver_tests
 clean_restart $testfile
 if ![runto_main] {
     return -1
diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
index 27224b5f96f..3ab2cab850c 100644
--- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
+++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
@@ -22,6 +22,7 @@ standard_testfile
 
 # Support for XML is needed to run this test.
 require allow_xml_test
+require can_spawn_for_attach
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "failed to compile"
@@ -32,8 +33,6 @@ if [mi_gdb_start] {
     return
 }
 
-require can_spawn_for_attach
-
 set string_re {(?:[^\\"]|\\.)*}
 
 set id_re "id=\"$decimal\""

                 reply	other threads:[~2023-01-27  1:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230127012910.9AFC43858D20@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@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).