From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 0CD513858D28 for ; Wed, 25 Jan 2023 12:44:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0CD513858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 4C08A1FF14 for ; Wed, 25 Jan 2023 12:44:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1674650677; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=BYIRBBE6wwQ4JdyV8EOZ5uSxk80y41GLwH2fIetjkc8=; b=pltLDuf8zOFZCf2Jffzq2vRMzzSRdeuwA5Xy3xfwNPHLiht+2cuJZMMD9ljpqtNpD6kHD5 ArVjPRfYfv5a+KilCacanIuq8fEctuJcACB5q9+VcyndEd3jJ/6rmLZc6zTeCR6kNZiBKD PttrxS2fqdsgcIB1a27EFmLu2wN3QDU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1674650677; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=BYIRBBE6wwQ4JdyV8EOZ5uSxk80y41GLwH2fIetjkc8=; b=AS6UhHsweeARfej72fR5lusC+AFwAgyHqemxSy/7KNDoW78pA8MPpflmZsleSSyqt0pG1w uM8bMjMKNx2VcDAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2EB981358F for ; Wed, 25 Jan 2023 12:44:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +7srCjUk0WMkDgAAMHmgww (envelope-from ) for ; Wed, 25 Jan 2023 12:44:37 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Allow nodebug srcfile in gdb.base/unwind-on-each-insn.exp Date: Wed, 25 Jan 2023 13:44:36 +0100 Message-Id: <20230125124436.13943-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Test-case gdb.base/unwind-on-each-insn.exp compiles $srcfile with debug info, and $srcfile2 without. Occasionally, I try both files with debug info: ... - $srcfile $debug_flags $srcfile2 $nodebug_flags]]} { + $srcfile $debug_flags $srcfile2 $debug_flags]]} { ... and both files without: ... - $srcfile $debug_flags $srcfile2 $nodebug_flags]]} { + $srcfile $nodebug_flags $srcfile2 $nodebug_flags]]} { ... In the latter case, I run into: ... FAIL: gdb.base/unwind-on-each-insn.exp: foo: instruction 1: bt 2 FAIL: gdb.base/unwind-on-each-insn.exp: foo: instruction 1: up ... due to a mismatch between the regexp and the different output due to using nodebug. Fix this by making the regexp less strict. Tested on x86_64-linux. --- gdb/testsuite/gdb.base/unwind-on-each-insn.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp index a5e43c6228b..d6f90dde8c1 100644 --- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp +++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp @@ -111,11 +111,11 @@ proc do_test { function step_cmd } { "check frame-id matches" # Check that the previous frame is 'main'. - gdb_test "bt 2" "\r\n#1\\s+\[^\r\n\]+ in main \\(\\) .*" + gdb_test "bt 2" "\r\n#1\\s+\[^\r\n\]+ in main \\(\\)( .*)?" # Move up the stack (to main). gdb_test "up" \ - "\r\n#1\\s+\[^\r\n\]+ in main \\(\\) .*" + "\r\n#1\\s+\[^\r\n\]+ in main \\(\\)( .*)?" # Check we can unwind the stack-pointer and the frame base # address correctly. base-commit: 1b2fb35d5920fc27624823de92c30d346161058e -- 2.35.3