public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [FYI] Avoid pagination in attach.exp
Date: Thu, 04 Oct 2018 17:06:00 -0000	[thread overview]
Message-ID: <20181004170611.28518-1-tom@tromey.com> (raw)

While re-testing the complaint series, I saw some unresolved tests in
attach.exp.  In particular, the tests were failing because the pager
was active.

This is partly a new problem, introduced because that series changes
some prints from unfiltered to filtered.  However, it is also a latent
bug, which you can see by shrinking your window very small and then
running the test.

This patch avoids the problem by passing -quiet to gdb and arranging
to set the window height and width in one other test.

Arguably instead of -quiet we should disable the pager during gdb's
welcome message.  I can do that if it seems desirable; but meanwhile
this patch is safe.

gdb/testsuite/ChangeLog
2018-10-04  Tom Tromey  <tom@tromey.com>

	* gdb.base/attach.exp (test_command_line_attach_run): Use -quiet;
	set width and height to 0.
	(test_command_line_attach_run): Use -quiet.
---
 gdb/testsuite/ChangeLog           | 6 ++++++
 gdb/testsuite/gdb.base/attach.exp | 5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index 8199a80c6b..3f3a0edbb9 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -376,7 +376,8 @@ proc do_command_attach_tests {} {
 
     gdb_exit
 
-    set res [gdb_spawn_with_cmdline_opts "--pid=$testpid"]
+    set res [gdb_spawn_with_cmdline_opts \
+		 "-quiet -iex \"set height 0\" -iex \"set width 0\" --pid=$testpid"]
     set test "starting with --pid"
     gdb_test_multiple "" $test {
 	-re "Reading symbols from.*$gdb_prompt $" {
@@ -408,7 +409,7 @@ proc test_command_line_attach_run {} {
 	gdb_exit
 
 	set res [gdb_spawn_with_cmdline_opts \
-		     "-iex \"set height 0\" -iex \"set width 0\" --pid=$testpid -ex \"start\""]
+		     "-quiet -iex \"set height 0\" -iex \"set width 0\" --pid=$testpid -ex \"start\""]
 	if { $res != 0} {
 	    fail $test
 	    kill_wait_spawned_process $test_spawn_id
-- 
2.17.1

                 reply	other threads:[~2018-10-04 17:06 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=20181004170611.28518-1-tom@tromey.com \
    --to=tom@tromey.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).