Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@codesourcery.com>
To: gdb-patches <gdb-patches@sourceware.org>
Subject: [patch, testsuite] fix problems in gdb.base/paginate-bg-execution.exp
Date: Fri, 18 Sep 2015 19:53:00 -0000	[thread overview]
Message-ID: <55FC6B86.8090700@codesourcery.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

This patch addresses a couple of problems in 
gdb.base/paginate-bg-execution.exp:

(1) A different "Quit" message can appear in some cases, e.g. if GDB 
thinks the terminal doesn't support job control -- see the definition of 
quit in utils.c.  The specific situation where I tripped over this was 
running GDB in a CMD.EXE shell on a remote Windows host via ssh -T.

(2) The test was sending a ^C interrupt without testing whether the 
target had the nointerrupts property set.

OK to commit?  (I'm not sure this one qualifies as obvious.)

-Sandra


[-- Attachment #2: paginate.log --]
[-- Type: text/x-log, Size: 192 bytes --]

2015-09-18  Sandra Loosemore  <sandra@codesourcery.com>

	gdb/testsuite/
	* gdb.base/paginate-bg-execution.exp: Accept alternate "Quit"
	message.  Skip ^C test if target has nointerrupts set.

[-- Attachment #3: paginate.patch --]
[-- Type: text/x-patch, Size: 956 bytes --]

diff --git a/gdb/testsuite/gdb.base/paginate-bg-execution.exp b/gdb/testsuite/gdb.base/paginate-bg-execution.exp
index f7437ac..7b96df7 100644
--- a/gdb/testsuite/gdb.base/paginate-bg-execution.exp
+++ b/gdb/testsuite/gdb.base/paginate-bg-execution.exp
@@ -104,6 +104,11 @@ proc test_bg_execution_pagination_cancel { how } {
 	    -re "Quit\r\n$gdb_prompt $" {
 		pass $test
 	    }
+	    # This variant can show up e.g. in remote testing via ssh -T,
+	    # so that GDB has no terminal.
+	    -re "Quit (expect signal SIGINT when the program is resumed)\r\n$gdb_prompt $" {
+		pass $test
+	    }
 	}
 
 	gdb_test "p 1" " = 1" "GDB accepts further input"
@@ -114,5 +119,7 @@ proc test_bg_execution_pagination_cancel { how } {
 }
 
 test_bg_execution_pagination_return
-test_bg_execution_pagination_cancel "ctrl-c"
+if ![target_info exists gdb,nointerrupts] {
+    test_bg_execution_pagination_cancel "ctrl-c"
+}
 test_bg_execution_pagination_cancel "quit"

             reply	other threads:[~2015-09-18 19:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 19:53 Sandra Loosemore [this message]
2015-09-29 14:41 ` Pedro Alves
2015-12-13 23:53   ` Sandra Loosemore
2015-12-14 10:52     ` Pedro Alves
2015-12-13 23:54   ` Sandra Loosemore

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=55FC6B86.8090700@codesourcery.com \
    --to=sandra@codesourcery.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