This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch, testsuite] fix problems in gdb.base/paginate-bg-execution.exp
- From: Pedro Alves <palves at redhat dot com>
- To: Sandra Loosemore <sandra at codesourcery dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 29 Sep 2015 15:41:14 +0100
- Subject: Re: [patch, testsuite] fix problems in gdb.base/paginate-bg-execution.exp
- Authentication-results: sourceware.org; auth=none
- References: <55FC6B86 dot 8090700 at codesourcery dot 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