From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20551 invoked by alias); 17 Dec 2011 02:59:56 -0000 Received: (qmail 20540 invoked by uid 22791); 17 Dec 2011 02:59:54 -0000 X-SWARE-Spam-Status: Yes, hits=6.3 required=5.0 tests=AWL,BAYES_00,BOTNET,FROM_12LTRDOM,RCVD_IN_BRBL_LASTEXT,RDNS_DYNAMIC X-Spam-Check-By: sourceware.org Received: from bl16-10-144.dsl.telepac.pt (HELO localhost6.localdomain6) (188.81.10.144) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Dec 2011 02:59:34 +0000 Received: from localhost6.localdomain6 (localhost.localdomain [127.0.0.1]) by localhost6.localdomain6 (8.14.4/8.14.4/Debian-2ubuntu1) with ESMTP id pBH2xQfY022656 for ; Sat, 17 Dec 2011 02:59:27 GMT Subject: [RFC/WIP PATCH v2 04/12] ia64-sigill.exp: Don't assume there's no infrun output after the prompt To: gdb-patches@sourceware.org From: Pedro Alves Date: Sat, 17 Dec 2011 03:00:00 -0000 Message-ID: <20111217025926.22456.71706.stgit@localhost6.localdomain6> In-Reply-To: <20111217025904.22456.50717.stgit@localhost6.localdomain6> References: <20111217025904.22456.50717.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2011-12/txt/msg00554.txt.bz2 In async mode, we can still see TARGET_WAITKIND_IGNORE and TARGET_WAITKIND_NORESUMED events after displaying the prompt, breaking this test with timeouts, due to the anchor in "$gdb_prompt $" This fixes it. v2: - new in v2. gdb/testsuite/ 2011-12-16 Pedro Alves * gdb.threads/ia64-sigill.exp: Don't assume there's no infrun output after the prompt. --- gdb/testsuite/gdb.threads/ia64-sigill.exp | 26 ++++++++++++++++++++------ 1 files changed, 20 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/gdb.threads/ia64-sigill.exp b/gdb/testsuite/gdb.threads/ia64-sigill.exp index 9867041..c79cb12 100644 --- a/gdb/testsuite/gdb.threads/ia64-sigill.exp +++ b/gdb/testsuite/gdb.threads/ia64-sigill.exp @@ -55,21 +55,35 @@ gdb_test_no_output {set $sigill_bpnum=$bpnum} gdb_breakpoint [gdb_get_line_number "break-at-exit"] +# The ia64 SIGILL signal is only visible in the infrun debug output. +# Note we can't assume there's no infrun output after the prompt from +# here on. gdb_test_no_output "set debug infrun 1" -# The ia64 SIGILL signal is visible only in the lin-lwp debug. - -gdb_test "continue" "Breakpoint \[0-9\]+,( .* in)? thread_func .*" +set test "continue to thread_func" +gdb_test_multiple "continue" $test { + -re "Breakpoint \[0-9\]+,( .* in)? thread_func .*$gdb_prompt " { + pass $test + } +} -gdb_test_no_output {delete $sigill_bpnum} +set test {delete $sigill_bpnum} +gdb_test_multiple "continue" $test { + -re "$gdb_prompt " { + pass $test + } +} set test "continue for the pending signal" gdb_test_multiple "continue" $test { - -re "Breakpoint \[0-9\]+, .*break-at-exit.*\r\n$gdb_prompt $" { + -re "Breakpoint \[0-9\]+, .*break-at-exit.*\r\n$gdb_prompt " { # Breakpoint has been skipped in the other thread. pass $test } - -re "Program received signal .*\r\n$gdb_prompt $" { + -re "Program received signal .*\r\n$gdb_prompt " { + fail $test + } + -re "$gdb_prompt " { fail $test } }