From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3624 invoked by alias); 23 Feb 2015 13:54:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 3612 invoked by uid 89); 23 Feb 2015 13:54:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 23 Feb 2015 13:54:23 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1NDsLER018490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 23 Feb 2015 08:54:22 -0500 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1NDsKZe000641 for ; Mon, 23 Feb 2015 08:54:21 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 0/6] Introduce $inferior_spawn_id, make interrupt.exp work with GDBserver Date: Mon, 23 Feb 2015 13:54:00 -0000 Message-Id: <1424699660-11727-1-git-send-email-palves@redhat.com> X-SW-Source: 2015-02/txt/msg00655.txt.bz2 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 , 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