From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0ChgODJ3mmDdPAAAWB0awg (envelope-from ) for ; Tue, 11 May 2021 08:23:14 -0400 Received: by simark.ca (Postfix, from userid 112) id D33401F11C; Tue, 11 May 2021 08:23:14 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=MAILING_LIST_MULTI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 32AC21E813 for ; Tue, 11 May 2021 08:23:14 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3D9F8388A43E; Tue, 11 May 2021 12:23:13 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 89EB73886C68 for ; Tue, 11 May 2021 12:23:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 89EB73886C68 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A69C6B123 for ; Tue, 11 May 2021 12:23:10 +0000 (UTC) Date: Tue, 11 May 2021 14:23:08 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Update infrun regexp in gdb.base/watch_thread_num.exp Message-ID: <20210511122306.GA27946@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi, The test-case gdb.base/watch_thread_num.exp contains an infrun regexp: ... -re "infrun:" { ... which doesn't trigger because: - the test-case doesn't contain "set debug infrun 1", and - if we hack the test-case to add this, the regexp doesn't match because "[infrun] " is printed instead. Make the test pass with "set debug infrun 1" and add the setting commented out. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Update infrun regexp in gdb.base/watch_thread_num.exp gdb/testsuite/ChangeLog: 2021-05-11 Tom de Vries * gdb.base/watch_thread_num.exp: Fix "set debug infrun 1" FAILs. Add "set debug infrun 1" commented out. --- gdb/testsuite/gdb.base/watch_thread_num.exp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.base/watch_thread_num.exp b/gdb/testsuite/gdb.base/watch_thread_num.exp index 5e2a8ab3235..cbfc9560c2b 100644 --- a/gdb/testsuite/gdb.base/watch_thread_num.exp +++ b/gdb/testsuite/gdb.base/watch_thread_num.exp @@ -81,18 +81,30 @@ gdb_test "info breakpoint \$bpnum" \ "stop only in thread $thread_num" \ "info breakpoint shows watchpoint is thread-specific" +# Uncomment to see additional information. +#gdb_test "set debug infrun 1" + for {set i 1} {$i <= 5} {incr i} { set watchpoint "Watchpoint triggered iteration $i" set check "Check thread that triggered iteration $i" set test $watchpoint + set seen_watchpoint 0 gdb_test_multiple "continue" $test { - -re "infrun:" { - # Avoid timeouts when debugging GDB. + -re "Hardware access \\(read/write\\) watchpoint .*: shared_var" { + set seen_watchpoint 1 exp_continue } - -re "Hardware access \\(read/write\\) watchpoint .*: shared_var.*$gdb_prompt $" { - pass $test + -re "$gdb_prompt " { + if { $seen_watchpoint } { + pass $test + } else { + fail $test + } + } + -re "\\\[infrun\\\] " { + # Avoid timeouts when debugging GDB. + exp_continue } } gdb_test "thread" ".*Current thread is $thread_num .*" $check