From patchwork Tue Oct 8 11:45:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 98535 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 884943861039 for ; Tue, 8 Oct 2024 11:46:09 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id D39D73858D29 for ; Tue, 8 Oct 2024 11:45:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D39D73858D29 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 D39D73858D29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728387945; cv=none; b=e3G2Dkx2z8dmF8Uehu+5KnGEz4b31G5BdCfcXuYjTQe8ABYW2winSHEu8bX8ZE96N9oO3rFd4kdQouSjssaX7IJsQzQLmMKYvU3JvGO9rrrpC7YgOiG3gLbPXojbyWYcgJ2hRV+pqc92Sv7LoneFtR5ItFWV8e2VXDSvyW1E6Ms= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728387945; c=relaxed/simple; bh=49TAnFs7CCoRLdDeNQqySpK1oztzfamluGWXLu/uyJI=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=XtJoD9FF3lp8N6SK4o9VmzYX8kMZnfkcw4gzTXG3ja6sJ2+u1qXcBfqclbalEsl7JCqZCSd+mqBFK4qMY7OX03Z285YjYROJDXWlv38v1mf88a7x6W+08AKcPk2S7jhpq9L2bErq3eVIu3SgiJiXQPwXi5lZ679nXAgACjpkftw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104: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-out2.suse.de (Postfix) with ESMTPS id CBB4F1FF2F for ; Tue, 8 Oct 2024 11:45:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728387943; 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=FS0HIm63WKjyT9oH8o5a5RilBwHIF41NXtIYLHgZco4=; b=qJTbQZD84893ox4FprVdtG3O52iuyP96YJbaP4+odDBDAsERzS7NmJKuTyOIm9THAsdtjL 2ZQOeQQVwjoMlNp6U2dGn2U5qrMaWZCwXTbJX65K9+6Zzdpo11p2vq4OhP2/+Vxrvk2p61 RGel/2kSRXK7PS5unanIbwYZyyhiO3c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728387943; 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=FS0HIm63WKjyT9oH8o5a5RilBwHIF41NXtIYLHgZco4=; b=F9wHwpDGMSU/dpsTTMxcMSd8NIjiNL97KwTYN5nSNwfgZJgEXsShAqq+6bgD+UaFnVkI24 wQ3wqRgcvKVmqcAw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=HcUJDvR6; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="zHrQSFy/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728387942; 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=FS0HIm63WKjyT9oH8o5a5RilBwHIF41NXtIYLHgZco4=; b=HcUJDvR6VAhL2uZ7WaINov7S+0o2xJd3vr5126d4b+FDP5VPYhhHhU77wsgB1ndIdcTVue sZXSq9KyWpvZOZKBhghedKyubBWPfAp8/xCcoBP7Gvi00lgjhqVetEhJ2TI7GgzqtsyBLb L0KapBZWalvNLajzjH+sarC7zCnw1YE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728387942; 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=FS0HIm63WKjyT9oH8o5a5RilBwHIF41NXtIYLHgZco4=; b=zHrQSFy/YXmWEaKtbB9jtEfzG9HVg8YWPq7X9Op2TTFymOFMYE43n3YD7WQtvdroxXW60q 0QQTzIVB6iZ09nBg== 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 A73521340C for ; Tue, 8 Oct 2024 11:45:42 +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 jJViJ2YbBWeiZgAAD6G6ig (envelope-from ) for ; Tue, 08 Oct 2024 11:45:42 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Fix gdb.ada/tagged-lookup.exp with read1+readnow Date: Tue, 8 Oct 2024 13:45:37 +0200 Message-Id: <20241008114537.19237-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Rspamd-Queue-Id: CBB4F1FF2F X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:dkim]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Level: X-Spam-Status: No, score=-12.4 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 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~patchwork=sourceware.org@sourceware.org When running test-case gdb.ada/tagged-lookup.exp with target board readnow and make target check-read1: ... $ ( cd build/gdb; \ make check-read1 \ RUNTESTFLAGS="--target_board=readnow gdb.ada/tagged-lookup.exp" ) ... I run into: ... (gdb) PASS: gdb.ada/tagged-lookup.exp: set debug symtab-create 1 print *the_local_var^M $1 = (n => 2)^M (gdb) FAIL: gdb.ada/tagged-lookup.exp: only one CU expanded ... The problem is that the corresponding gdb_test_multiple uses line-by-line matching (using -lbl) which doesn't work well with the multiline pattern matching both the prompt and the line before it: ... -re -wrap ".* = \\\(n => $decimal\\\)" { ... Fix this by making it a one-line pattern: ... -re -wrap "" { ... While we're at it, replace an if-then-pass-else-fail with a gdb_assert. Tested on aarch64-linux. --- gdb/testsuite/gdb.ada/tagged-lookup.exp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) base-commit: 5ad960fcdb6732c805d2a235efc8a40df644e03e diff --git a/gdb/testsuite/gdb.ada/tagged-lookup.exp b/gdb/testsuite/gdb.ada/tagged-lookup.exp index 3803319c505..f1473aaf8e5 100644 --- a/gdb/testsuite/gdb.ada/tagged-lookup.exp +++ b/gdb/testsuite/gdb.ada/tagged-lookup.exp @@ -51,11 +51,7 @@ gdb_test_multiple "print *the_local_var" "only one CU expanded" -lbl { -re ".symtab-create. start_subfile: name = \[^,\]*, name_for_id = \[^\r\n\]*\r\n" { exp_continue } - -re -wrap ".* = \\\(n => $decimal\\\)" { - if {$found_pck + $found_pck2 <= 1} { - pass $gdb_test_name - } else { - fail $gdb_test_name - } + -re -wrap "" { + gdb_assert {$found_pck + $found_pck2 <= 1} $gdb_test_name } }