From patchwork Tue Apr 21 18:08:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 6353 Received: (qmail 92767 invoked by alias); 21 Apr 2015 18:08:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 92622 invoked by uid 89); 21 Apr 2015 18:08:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 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; Tue, 21 Apr 2015 18:08:40 +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 t3LI8cO2026387 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 21 Apr 2015 14:08:38 -0400 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 t3LI8WKs028722 for ; Tue, 21 Apr 2015 14:08:38 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 05/24] Don't rely on inferior I/O in {call-signal-resume, unwindonsignal}.exp Date: Tue, 21 Apr 2015 19:08:12 +0100 Message-Id: <1429639711-16459-6-git-send-email-palves@redhat.com> In-Reply-To: <1429639711-16459-1-git-send-email-palves@redhat.com> References: <1429639711-16459-1-git-send-email-palves@redhat.com> These tests rely on inferior I/O, but that seems pointless and unrelated here. Simply remove the printf calls, and don't expect them. gdb/testsuite/ChangeLog: 2015-04-21 Pedro Alves * gdb.base/call-signal-resume.exp: Remove check for gdb,noinferiorio. Don't expect "no signal". Use gdb_test. * gdb.base/unwindonsignal.exp: Likewise. * gdb.base/call-signals.c (gen_signal): Remove printf call. * gdb.base/unwindonsignal.c (gen_signal): Likewise. --- gdb/testsuite/gdb.base/call-signal-resume.exp | 18 ++++-------------- gdb/testsuite/gdb.base/call-signals.c | 3 --- gdb/testsuite/gdb.base/unwindonsignal.c | 3 --- gdb/testsuite/gdb.base/unwindonsignal.exp | 18 ++++-------------- 4 files changed, 8 insertions(+), 34 deletions(-) diff --git a/gdb/testsuite/gdb.base/call-signal-resume.exp b/gdb/testsuite/gdb.base/call-signal-resume.exp index a4e6bd0..a8b0585 100644 --- a/gdb/testsuite/gdb.base/call-signal-resume.exp +++ b/gdb/testsuite/gdb.base/call-signal-resume.exp @@ -20,11 +20,6 @@ # 2) Inferior is stopped at a signal. Upon resumption it should continue # with that signal, regardless of whatever the hand-called function did. -if [target_info exists gdb,noinferiorio] { - verbose "Skipping call-signal-resume.exp because of no fileio capabilities." - continue -} - if [target_info exists gdb,nosignals] { verbose "Skipping call-signal-resume.exp because of nosignals." continue @@ -72,15 +67,10 @@ gdb_test "continue" "Continuing.*Breakpoint \[0-9\]*, stop_one.*" \ # Call function (causing the program to get a signal), and see if gdb handles # it properly. -gdb_test_multiple "call gen_signal ()" \ - "inferior function call signaled" { - -re "\[\r\n\]*no signal\[\r\n\]+$gdb_prompt $" { - unsupported "inferior function call signaled" - return 0 - } - -re "\[\r\n\]*The program being debugged was signaled.*\[\r\n\]+$gdb_prompt $" { - pass "inferior function call signaled" - } +if {[gdb_test "call gen_signal ()" \ + "\[\r\n\]*The program being debugged was signaled.*" \ + "inferior function call signaled"] != 0} { + return 0 } set frame_number [get_dummy_frame_number] diff --git a/gdb/testsuite/gdb.base/call-signals.c b/gdb/testsuite/gdb.base/call-signals.c index 2c5b770..c166649 100644 --- a/gdb/testsuite/gdb.base/call-signals.c +++ b/gdb/testsuite/gdb.base/call-signals.c @@ -18,7 +18,6 @@ /* Support program for testing handling of inferior function calls in the presence of signals. */ -#include #include #include @@ -32,8 +31,6 @@ gen_signal () { /* According to sigall.exp, SIGABRT is always supported. */ kill (getpid (), SIGABRT); - /* If we get here we couldn't generate a signal, tell dejagnu. */ - printf ("no signal\n"); } /* Easy place to set a breakpoint. */ diff --git a/gdb/testsuite/gdb.base/unwindonsignal.c b/gdb/testsuite/gdb.base/unwindonsignal.c index 92d8ba4..e1b2094 100644 --- a/gdb/testsuite/gdb.base/unwindonsignal.c +++ b/gdb/testsuite/gdb.base/unwindonsignal.c @@ -17,7 +17,6 @@ /* Support program for testing unwindonsignal. */ -#include #include #include @@ -26,8 +25,6 @@ gen_signal () { /* According to sigall.exp, SIGABRT is always supported. */ kill (getpid (), SIGABRT); - /* If we get here we couldn't generate a signal, tell dejagnu. */ - printf ("no signal\n"); } /* Easy place to set a breakpoint. */ diff --git a/gdb/testsuite/gdb.base/unwindonsignal.exp b/gdb/testsuite/gdb.base/unwindonsignal.exp index 2014e8d..dd53cfe 100644 --- a/gdb/testsuite/gdb.base/unwindonsignal.exp +++ b/gdb/testsuite/gdb.base/unwindonsignal.exp @@ -13,11 +13,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,noinferiorio] { - verbose "Skipping unwindonsignal.exp because of no fileio capabilities." - continue -} - if [target_info exists gdb,nosignals] { verbose "Skipping unwindonsignal.exp because of nosignals." continue @@ -58,15 +53,10 @@ gdb_test "show unwindonsignal" \ # Call function (causing the program to get a signal), and see if gdb handles # it properly. -gdb_test_multiple "call gen_signal ()" \ - "unwindonsignal, inferior function call signaled" { - -re "\[\r\n\]*no signal\[\r\n\]+$gdb_prompt $" { - unsupported "unwindonsignal, inferior function call signaled" - return 0 - } - -re "\[\r\n\]*The program being debugged was signaled.*\[\r\n\]+$gdb_prompt $" { - pass "unwindonsignal, inferior function call signaled" - } +if {[gdb_test "call gen_signal ()" \ + "\[\r\n\]*The program being debugged was signaled.*" \ + "unwindonsignal, inferior function call signaled"] != 0} { + return 0 } # Verify the stack got unwound.