From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EabEAjhW7mqyLCsAWB0awg (envelope-from ) for ; Fri, 06 Nov 2026 17:35:36 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=lcYD8ZFz; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=0TNW2vWl; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=lcYD8ZFz; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=0TNW2vWl; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 07380378002; Fri, 06 Nov 2026 17:35:36 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5C4281E043 for ; Fri, 06 Nov 2026 17:35:35 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6B8D04BA2E08 for ; Fri, 6 Nov 2026 22:35:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B8D04BA2E08 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=lcYD8ZFz; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=0TNW2vWl; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=lcYD8ZFz; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=0TNW2vWl Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 920AB4BA2E0B for ; Fri, 6 Nov 2026 22:34:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 920AB4BA2E0B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 920AB4BA2E0B Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794004492; cv=none; b=ZQz+jsG7rHyb/EoPxwKpxVQzpBlB5TUjq9wAj50rlTaQgVb6AOAOYobIhMJ1kWXU8xgmQCr/B3kl25276bNT6tsmNnIA+0m41s6xXMjaTldVeW6DZ6G2ytNvs2y9sb/2eqMLNd9fO+44Q42iIVfgqcUrVWUuwAOmc786CO0GX+k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794004492; c=relaxed/simple; bh=rVwT0lkifCXJFnvr6XB/dsK5H7YIGj5rqLMtRa4j/MI=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=kxjFkZ1scYdw6+h3CR17GxLjbXN/kFMlqyU72s3WVPNiShcealOzylNk213OhPeLEkF09BkCANauV1T0+Xxm7XO/ojOXBwhPeQUVUWayutrOpk3QQJvNUveicXccJmbaiIxpzthjnXHc4pVX5YON4y4dzezcmSEhopGkXdkZ1kI= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=lcYD8ZFz; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=0TNW2vWl; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=lcYD8ZFz; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=0TNW2vWl DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 920AB4BA2E0B Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3C510220F4 for ; Fri, 6 Nov 2026 22:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1794004491; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7VqoTC6R2pGRy2dsXSRjZDu83gNSsVH9zbJfmJJ3XhY=; b=lcYD8ZFzLU0Dqq5LXcgvhAZ3eXMVW5d8jOdVoV5TqBS29gKpUwWA9se1P8NzuT2NKUXQdK H2tEqpqZIez6icmiCQ/ZPFAbkHRxlUBVjONi+fF+D9KA179MYW/eMVhk0yGJnyYlqRKg1a pnxEQ8vm0NVFRIp28E00MvKEY5feIh4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1794004491; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7VqoTC6R2pGRy2dsXSRjZDu83gNSsVH9zbJfmJJ3XhY=; b=0TNW2vWl3cfUFkzjtKB8OGot+Qp1hjuczKkgxl0FSLhg7lnh6jtICOOHktdB9aa4fauS51 9YBD6cB0E9hHh7CA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1794004491; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7VqoTC6R2pGRy2dsXSRjZDu83gNSsVH9zbJfmJJ3XhY=; b=lcYD8ZFzLU0Dqq5LXcgvhAZ3eXMVW5d8jOdVoV5TqBS29gKpUwWA9se1P8NzuT2NKUXQdK H2tEqpqZIez6icmiCQ/ZPFAbkHRxlUBVjONi+fF+D9KA179MYW/eMVhk0yGJnyYlqRKg1a pnxEQ8vm0NVFRIp28E00MvKEY5feIh4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1794004491; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7VqoTC6R2pGRy2dsXSRjZDu83gNSsVH9zbJfmJJ3XhY=; b=0TNW2vWl3cfUFkzjtKB8OGot+Qp1hjuczKkgxl0FSLhg7lnh6jtICOOHktdB9aa4fauS51 9YBD6cB0E9hHh7CA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 019BB1361B for ; Fri, 6 Nov 2026 22:34:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 5YwhHwpW7mr4ZgAAD6G6ig:T3 (envelope-from ) for ; Fri, 06 Nov 2026 22:34:50 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed 2/6] [gdb/testsuite] Cleanup "Attaching to program" regexps Date: Fri, 6 Nov 2026 23:34:46 +0100 Message-ID: <20261106223450.1554600-3-tdevries@suse.de> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20261106223450.1554600-1-tdevries@suse.de> References: <20261106223450.1554600-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-11.80 / 50.00]; SUSE_INTERNAL_BYPASS(-9.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.998]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[] X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org There's a bunch of regexps in some test-cases that check for "Attaching to program.*`?$escapedbinfile'?". Drop the optional `' quotes. While we're at it, make the check a bit more strict by replacing "Attaching to program.*" with "Attaching to program: ". --- gdb/testsuite/gdb.base/solib-overlap.exp | 4 ++-- gdb/testsuite/gdb.threads/attach-into-signal.exp | 4 ++-- gdb/testsuite/gdb.threads/attach-stopped.exp | 2 +- gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/gdb.base/solib-overlap.exp b/gdb/testsuite/gdb.base/solib-overlap.exp index a94b1f9f6bd..1262f53c415 100644 --- a/gdb/testsuite/gdb.base/solib-overlap.exp +++ b/gdb/testsuite/gdb.base/solib-overlap.exp @@ -99,10 +99,10 @@ foreach prelink_lib1 {0x40000000 0x50000000} { with_test_prefix "$prelink_lib1" set test attach gdb_test_multiple "attach $testpid" $test { - -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" { + -re -wrap "Attaching to program: $escapedbinfile, process $testpid.*" { pass $test } - -re -wrap "[subst_vars {Attaching to program.*`?$escapedbinfile\.exe'?, process $testpid.*\[Switching to thread $testpid\..*\].*}]" { + -re -wrap "[subst_vars {Attaching to program: $escapedbinfile\.exe, process $testpid.*\[Switching to thread $testpid\..*\].*}]" { # Response expected on Cygwin pass $test } diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsuite/gdb.threads/attach-into-signal.exp index 2f682ebb073..9dbb675efb6 100644 --- a/gdb/testsuite/gdb.threads/attach-into-signal.exp +++ b/gdb/testsuite/gdb.threads/attach-into-signal.exp @@ -54,13 +54,13 @@ proc corefunc { threadtype executable } { while { $passes < 3 && $attempt <= $attempts } { set test "attach (pass $passes), pending signal catch" if {[gdb_test_multiple "attach $testpid" $test { - -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.* received signal SIGALRM.*$gdb_prompt $" { + -re -wrap "Attaching to program: $escapedbinfile, process $testpid.* received signal SIGALRM.*" { # nonthreaded: pass $test verbose -log "$test succeeded on the attempt # $attempt of $attempts" set passes [expr {$passes + 1}] } - -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" { + -re -wrap "Attaching to program: $escapedbinfile, process $testpid.*" { set ok 0 if { $threadtype == "threaded" } { diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp index 2f84c6d77f2..cc60f5bbfb5 100644 --- a/gdb/testsuite/gdb.threads/attach-stopped.exp +++ b/gdb/testsuite/gdb.threads/attach-stopped.exp @@ -49,7 +49,7 @@ proc corefunc { threadtype } { set test "$threadtype: attach2 to stopped, after setting file" gdb_test_multiple "attach $testpid" "$test" { - -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" { + -re -wrap "Attaching to program: $escapedbinfile, process $testpid.*" { pass "$test" } } diff --git a/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp b/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp index 717eca236c0..65f1a1d981d 100644 --- a/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp +++ b/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp @@ -71,7 +71,8 @@ proc run_test { spawn_inferior } { set escapedbinfile [string_to_regexp $::binfile] gdb_test -no-prompt-anchor "attach $testpid" \ - "Attaching to program.*`?$escapedbinfile'?, process $testpid.*" \ + [subst_vars \ + {Attaching to program: $escapedbinfile, process $testpid.*}] \ "attach to the inferior" # Attaching to a multi-threaded application in non-stop mode -- 2.51.0