public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Philippe Blain <levraiphilippeblain@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH v2] gdb/testsuite/README: point to default value of INTERNAL_GDBFLAGS
Date: Sun, 20 Feb 2022 11:49:12 -0500	[thread overview]
Message-ID: <20220220164912.87471-1-levraiphilippeblain@gmail.com> (raw)
In-Reply-To: <20220219234029.28070-1-levraiphilippeblain@gmail.com>

The INTERNAL_GDBFLAGS runtest variable was updated in 55c3ad88013
([gdb/testsuite] Prevent pagination in GDB_INTERNALFLAGS, 2020-10-26) to
disable pagination, and in aae1c79a03a (PR python/12227..., 2010-12-07)
to point to the data directory, but its default value mentioned in the
testsuite's README was not kept up to date.

To avoid it getting out of sync even more, point the reader to the
definition of the variable in lib/gdb.exp, and move the explanation of
the different flags there. Also adjust the example in the README
so it follows the flags added in 55c3ad88013.
---

Changes since v1:
Following Simon's comment, move the explanation of the flags to gdb.exp
and simply point the reader to there.

 gdb/testsuite/README      | 12 +++++-------
 gdb/testsuite/lib/gdb.exp |  4 ++++
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/gdb/testsuite/README b/gdb/testsuite/README
index 7552774c78b..c2f659a7188 100644
--- a/gdb/testsuite/README
+++ b/gdb/testsuite/README
@@ -167,12 +167,7 @@ checks both the installed GDB and GDBserver.
 INTERNAL_GDBFLAGS
 
 Command line options passed to all GDB invocations.
-
-The default is "-nw -nx".
-
-`-nw' disables any of the windowed interfaces.
-`-nx' disables ~/.gdbinit, so that it doesn't interfere with
-the tests.
+The default is set in lib/gdb.exp.
 
 This is actually considered an internal variable, and you
 won't normally want to change it.  However, in some situations,
@@ -193,7 +188,10 @@ a .gdbinit.  For example:
 	HOME=`pwd` runtest \
 	  GDB=/usr/bin/gdb \
 	  GDBSERVER=/usr/bin/gdbserver \
-	  INTERNAL_GDBFLAGS=-nw
+	  INTERNAL_GDBFLAGS="-nw -iex 'set height 0' -iex 'set width 0'"
+
+Note that we do not need to specify '-data-directory' here
+as we are testing an installed GDB.
 
 GDB_PARALLEL
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index a3717a40229..0cec46731bb 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -129,6 +129,10 @@ verbose "using GDBFLAGS = $GDBFLAGS" 2
 set BUILD_DATA_DIRECTORY "[pwd]/../data-directory"
 
 # INTERNAL_GDBFLAGS contains flags that the testsuite requires.
+# `-nw' disables any of the windowed interfaces.
+# `-nx' disables ~/.gdbinit, so that it doesn't interfere with the tests.
+# `-data-directory' points to the data directory in the build directory.
+# `-iex "set {height,width} 0"' disables pagination.
 global INTERNAL_GDBFLAGS
 if ![info exists INTERNAL_GDBFLAGS] {
     set INTERNAL_GDBFLAGS \

base-commit: 0acf434a23768449cbb4b3732355f3f2febecaee
-- 
2.29.2


  parent reply	other threads:[~2022-02-20 16:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-19 23:40 [PATCH] gdb/testsuite/README: update " Philippe Blain
2022-02-20  1:41 ` Simon Marchi
2022-02-20  4:09   ` Philippe Blain
2022-02-20 16:49 ` Philippe Blain [this message]
2022-02-22 13:46   ` [PATCH v2] gdb/testsuite/README: point to " Simon Marchi
2022-02-22 14:01     ` Philippe Blain
2022-02-22 14:31       ` Simon Marchi
2022-02-22 14:45         ` Philippe Blain
2022-02-22 14:46           ` Simon Marchi

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=20220220164912.87471-1-levraiphilippeblain@gmail.com \
    --to=levraiphilippeblain@gmail.com \
    --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).