Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Sandra Loosemore <sandra@codesourcery.com>,
	       gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [patch, testsuite] fix problems in gdb.base/paginate-bg-execution.exp
Date: Tue, 29 Sep 2015 14:41:00 -0000	[thread overview]
Message-ID: <560AA30A.6080202@redhat.com> (raw)
In-Reply-To: <55FC6B86.8090700@codesourcery.com>

On 09/18/2015 08:52 PM, Sandra Loosemore wrote:
> 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.

Seems to me that suggesting to "expect signal SIGINT when the program
is resumed" is bogus in this case.  That can happen when you ctrl-c
the terminal, because a SIGINT ends up queued in both the inferior
and gdb, but I'm not seeing why that would happen in response to
the user typing "q" on a pagination prompt.  I think prompt_for_continue
should call throw_quit("Quit") directly instead of quit().

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

Odd that almost no other ctrl-c test checks this:

$ git grep "\\\003" testsuite/

testsuite/gdb.base/completion.exp:    send_gdb "\003"
testsuite/gdb.base/completion.exp:      send_gdb "\003"
testsuite/gdb.base/double-prompt-target-event-error.exp:        send_gdb "\003p 1\n"
testsuite/gdb.base/interrupt.exp:       send_gdb "\003"
testsuite/gdb.base/interrupt.exp:           send_gdb "\003"
testsuite/gdb.base/paginate-after-ctrl-c-running.exp:   send_gdb "\003"
testsuite/gdb.base/paginate-bg-execution.exp:       send_gdb "\003"
testsuite/gdb.base/paginate-execution-startup.exp:          send_gdb "\003"
testsuite/gdb.base/printcmds.exp:       gdb_test "p ctable1\[3\]"   " = 3 '\\\\003'"
testsuite/gdb.base/printcmds.exp:           " = \\(unsigned char \\*\\) <ctable1\\+$decimal> \"\\\\001\\\\002\\\\003\\\\004\\\\005\\\\006\\\\a\\\\b\"..."
testsuite/gdb.base/random-signal.exp:after 500 {send_gdb "\003"}
testsuite/gdb.base/range-stepping.exp:    send_gdb "\003"
testsuite/gdb.cp/annota2.exp:send_gdb "\003"
testsuite/gdb.cp/annota3.exp:send_gdb "\003"
testsuite/gdb.gdb/selftest.exp:    send_gdb "\003"
testsuite/gdb.threads/continue-pending-status.exp:      send_gdb "\003"
testsuite/gdb.threads/leader-exit.exp:send_gdb "\003"
testsuite/gdb.threads/manythreads.exp:    send_gdb "\003"
testsuite/gdb.threads/pthreads.exp:    send_gdb "\003"
testsuite/gdb.threads/schedlock.exp:  after 1000 {send_gdb "\003"}
testsuite/gdb.threads/sigthread.exp:after 500 {send_gdb "\003"}

$ git grep nointerrupts

testsuite/gdb.base/interrupt.exp:if [target_info exists gdb,nointerrupts] {
testsuite/gdb.base/interrupt.exp:    verbose "Skipping interrupt.exp because of nointerrupts."

What's going on?

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

I don't think it is obvious.

Thanks,
Pedro Alves


  reply	other threads:[~2015-09-29 14:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 19:53 Sandra Loosemore
2015-09-29 14:41 ` Pedro Alves [this message]
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=560AA30A.6080202@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sandra@codesourcery.com \
    /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