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 D7C9D3857C66 for ; Thu, 10 Aug 2023 13:49:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D7C9D3857C66 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 190E61F74B for ; Thu, 10 Aug 2023 13:49:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1691675377; 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=AQD6NsXxMAqjHvfuLebP5fMcFakYjrVcGBRIVRND3ek=; b=mSfU//TzcgqRyahVXAW0OBQUUaCLn8ZexsW9ZaOLMqlOYq93xB+4YCzdadBNrI0e7lMvxu FXvjygrdHuzfOIUzcgMSTEVOZ3Ds3DpEcsBFaZ65LmzITK7jga1qMSv/tC4HVjvIz2gGJh 4b0X+mr4t7xcLcwJV1/0q6vmnlQqVik= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1691675377; 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=AQD6NsXxMAqjHvfuLebP5fMcFakYjrVcGBRIVRND3ek=; b=Vdul7rU8tWwIkJ7t10JOupsE+yhMmyo5K32Usx5fCf4NjqQf4S5aIpq53wNABwJLiO5ri7 9sRHGb9jWs4dzDAQ== 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 05CC2138E0 for ; Thu, 10 Aug 2023 13:49:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +tlnAPHq1GQSdAAAMHmgww (envelope-from ) for ; Thu, 10 Aug 2023 13:49:37 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Improve failure mode in gdb.dwarf2/enqueued-cu-base-addr.exp Date: Thu, 10 Aug 2023 15:49:20 +0200 Message-Id: <20230810134921.8854-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=-11.9 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: I ran test-case gdb.dwarf2/enqueued-cu-base-addr.exp with target board cc-with-debug-names, and ran into: ... FAIL: gdb.dwarf2/enqueued-cu-base-addr.exp: ptype foo (GDB internal error) FAIL: gdb.dwarf2/enqueued-cu-base-addr.exp: CU addr found ... The first FAIL is a known issue, PR symtab/29572. The following FAIL is a consequence of the first FAIL, so require for the second test that the first test passes. Tested on x86_64-linux, with target boards unix and cc-with-debug-names. --- gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp b/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp index b60c02085b4..9b2d1d87362 100644 --- a/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp +++ b/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp @@ -76,7 +76,15 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ } # Expand cu1. This will enqueue cu2. -gdb_test "ptype foo" "type = int" +set cu1_expanded 0 +gdb_test_multiple "ptype foo" "" { + -re -wrap "type = int" { + set cu1_expanded 1 + pass $gdb_test_name + } +} + +require {expr $cu1_expanded == 1} # Now check that cu2 has an address range starting at main. set cu2_blockvector_re \ -- 2.35.3