From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10419 invoked by alias); 17 Dec 2011 12:35:43 -0000 Received: (qmail 10323 invoked by uid 22791); 17 Dec 2011 12:35:43 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,FROM_12LTRDOM X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Dec 2011 12:35:30 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RbtU9-0005Nx-Vk from pedro_alves@mentor.com for gdb-patches@sourceware.org; Sat, 17 Dec 2011 04:35:30 -0800 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Sat, 17 Dec 2011 12:35:28 +0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [RFC/WIP PATCH v2 05/14] watchthreads-reorder.exp: Don't assume there's no infrun output after the prompt Date: Sat, 17 Dec 2011 12:37:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-13-generic; KDE/4.7.2; x86_64; ; ) References: <20111217025904.22456.50717.stgit@localhost6.localdomain6> In-Reply-To: <20111217025904.22456.50717.stgit@localhost6.localdomain6> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201112171235.26988.pedro@codesourcery.com> 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/msg00566.txt.bz2 Like in the test of the previous patch, infrun debug output can still appear after the prompt. We should also turn off infrun debug output after needing it, and before starting a new iteration. v2: - new in v2. gdb/testsuite/ 2011-12-16 Pedro Alves * gdb.threads/watchthreads-reorder.exp: Don't assume there's no infrun output after the prompt. Turn off infrun debug output at the end of each iteration. --- gdb/testsuite/gdb.threads/watchthreads-reorder.exp | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp index 38e8b74..751658d 100644 --- a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp +++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp @@ -92,11 +92,21 @@ foreach reorder {0 1} { "Hardware read watchpoint \[0-9\]+: thread\[12\]_rwatch\r\n\r\nValue = 0\r\n0x\[0-9a-f\]+ in thread\[12\]_func .*" \ "continue b" - # While the debug output itself is not checked in this testcase one bug was - # found in the DEBUG_INFRUN code path. + # While the debug output itself is not checked in this testcase + # one bug was found in the DEBUG_INFRUN code path. Note we can't + # assume there's no infrun debug output after the prompt. gdb_test "set debug infrun 1" - gdb_continue_to_breakpoint "break-at-exit" ".*break-at-exit.*" + set test "continue to breakpoint: break-at-exit" + gdb_test_multiple "continue" $test { + -re "Breakpoint .* (at|in) .*break-at-exit.*\r\n$gdb_prompt " { + pass $test + } + -re "$gdb_prompt " { + fail $test + } + } + gdb_test "set debug infrun 0" set pf_prefix $prefix_test }