On 09/29/2015 08:41 AM, Pedro Alves wrote: > 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(). Hmmmm. If an actual code change is required here (instead of just a testsuite fix), I'll split this off and try to deal with it separately. >> (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 \\*\\) \"\\\\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? I had an older patch that dealt with most of these that I hadn't pushed upstream yet. :") I also found that a few of the things on your list were already being skipped for other reasons on the target I was testing on, and I'd missed a couple that were failing via ERROR instead of FAIL. Here's a revised patch that should take care of everything -- OK to commit this one? -Sandra