public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Introduce $inferior_spawn_id, make interrupt.exp work with GDBserver
@ 2015-02-23 13:54 Pedro Alves
  2015-02-23 13:54 ` [PATCH 1/6] gdb.base/interrupt.exp: Fix race Pedro Alves
                   ` (6 more replies)
  0 siblings, 7 replies; 30+ messages in thread
From: Pedro Alves @ 2015-02-23 13:54 UTC (permalink / raw)
  To: gdb-patches

After fixing a gdbserver syscall restart issue, I thought of adding a
new test to exercise syscall restarting.  Then I recalled that we
already have interrupt.exp for that.  However, that test is skipped on
gdbserver, because it relies on inferior i/o.

When testing with gdbserver, inferior are spawned by gdbserver, on
gdbserver's pty, and so gdb_test_multiple/gdb_expect, don't see the
inferior's i/o.

This series introduces a mechanism that allows tests to match inferior
i/o separately from gdb i/o, like:

  send_inferior "echo me\n"
  gdb_test_multiple "continue" "test msg" {
    -i "$inferior_spawn_id" -re "echo me\r\necho\r\n" {
      ...
    }
    -i "$gdb_spawn_id" -re "error.*$gdb_prompt $" {
      ...
    }
  }

and then adjusts interrupt.exp to use the new mechanism.

I took the idea from Don Breazeal's use of $server_spawn_id here
<https://sourceware.org/ml/gdb-patches/2015-01/msg00689.html>, and
generalized it.

A couple bugs had to be fixed along the way, and I took the change to
clean up interrupt.exp to use gdb_test_multiple instead of gdb_expect
too.  interrupt.exp now passes against gdbserver here, on x86_64
Fedora 20 (It fails with gdbserver/-m32 testing in the exact same way
it fails on native/-m32 testing, due to a kernel bug).

Pedro Alves (6):
  gdb.base/interrupt.exp: Fix race
  gdb.base/interrupt.exp: Use gdb_test_multiple instead of gdb_expect
  gdb_test_multiple: Fix user code argument processing
  testsuite: Don't use expect_background to reap gdbserver
  testsuite: Introduce $inferior_spawn_id
  gdb.base/interrupt.exp: Use send_inferior/$inferior_spawn_id

 gdb/testsuite/gdb.base/interrupt.exp    | 141 +++++++++++++++++++-------------
 gdb/testsuite/lib/gdb.exp               |  67 +++++++++++----
 gdb/testsuite/lib/gdbserver-support.exp |  68 ++++++++++++---
 3 files changed, 188 insertions(+), 88 deletions(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2015-04-21 18:32 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 13:54 [PATCH 0/6] Introduce $inferior_spawn_id, make interrupt.exp work with GDBserver Pedro Alves
2015-02-23 13:54 ` [PATCH 1/6] gdb.base/interrupt.exp: Fix race Pedro Alves
2015-02-23 13:54 ` [PATCH 2/6] gdb.base/interrupt.exp: Use gdb_test_multiple instead of gdb_expect Pedro Alves
2015-02-23 13:54 ` [PATCH 6/6] gdb.base/interrupt.exp: Use send_inferior/$inferior_spawn_id Pedro Alves
2015-02-23 13:54 ` [PATCH 3/6] gdb_test_multiple: Fix user code argument processing Pedro Alves
2015-02-23 13:54 ` [PATCH 4/6] testsuite: Don't use expect_background to reap gdbserver Pedro Alves
2015-04-13 11:42   ` Yao Qi
2015-04-13 12:09     ` Pedro Alves
2015-04-13 13:25       ` Yao Qi
2015-04-13 13:52         ` Pedro Alves
2015-04-13 14:20           ` Yao Qi
2015-04-13 14:22             ` Pedro Alves
2015-04-13 14:48               ` Yao Qi
2015-02-23 14:28 ` [PATCH 5/6] testsuite: Introduce $inferior_spawn_id Pedro Alves
2015-02-24 16:31   ` Yao Qi
2015-02-27 10:42     ` Pedro Alves
2015-02-27 10:59       ` Pedro Alves
2015-02-27 11:01         ` Pedro Alves
2015-02-27 12:12         ` Yao Qi
2015-02-27 13:59           ` [pushed] Add "../lib/unbuffer_output.c" and use it in gdb.base/interrupt.c (Re: [PATCH 5/6] testsuite: Introduce $inferior_spawn_id) Pedro Alves
2015-02-27 14:13             ` Yao Qi
2015-02-27 14:42             ` Eli Zaretskii
2015-02-27 14:47               ` Pedro Alves
2015-02-27 12:08       ` [PATCH 5/6] testsuite: Introduce $inferior_spawn_id Yao Qi
2015-02-27 12:30         ` Pedro Alves
2015-04-16 16:55           ` Antoine Tremblay
2015-04-16 17:14             ` Pedro Alves
2015-04-21 18:25               ` Pedro Alves
2015-04-21 18:32                 ` Antoine Tremblay
2015-04-07 17:31 ` [PATCH 0/6] Introduce $inferior_spawn_id, make interrupt.exp work with GDBserver Pedro Alves

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).