From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id A1B1F385696E for ; Sun, 1 Oct 2023 13:25:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A1B1F385696E 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-out1.suse.de (Postfix) with ESMTPS id A9B542184D for ; Sun, 1 Oct 2023 13:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1696166729; 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=Kjm1A4FVaGEkx8scMgVrUoPu++/FbpUneYZb4Sxwr14=; b=UgC1WelS38yypEdrr2GmWtdk0daQBbc7aItReIL0ddkG/Deot1dUlddICJJyBjqUp5JHMM Dwp7DGZ7/5oflyAWXM3adTByegVHLuExni2G4c0L108nym6t9gimkSlfq1pZWJWAmdgU/J GSXpQeO2pkR1VQO8X/wbg//rYwdaNyc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1696166729; 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=Kjm1A4FVaGEkx8scMgVrUoPu++/FbpUneYZb4Sxwr14=; b=xmt1urjTxlVQkrkYUHKiPZU3rMv81i0qeTDO7mCwMSKrHVnbivx46nzhV876D8s0md4ZM+ PxVc5rLVZAnzy1BA== 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 97619132BE for ; Sun, 1 Oct 2023 13:25:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id /zXdI0lzGWUoDwAAMHmgww (envelope-from ) for ; Sun, 01 Oct 2023 13:25:29 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH] [gdb/testsuite] Add KFAIL for PR ada/30908 Date: Sun, 1 Oct 2023 15:25:32 +0200 Message-Id: <20231001132532.3609-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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,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: With gcc 13.2.1, I run into a cluster of fails: ... FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" FAIL: gdb.ada/widewide.exp: print my_wws = " helo" FAIL: gdb.ada/widewide.exp: print my_ws = "wide" ... The problem is that the debug info contains information about function ada.strings.maps."=", and gdb uses it to implement the comparison. The function is supposed to compare two char sets, not strings, so gdb shouldn't use it. This is PR ada/30908. I don't see the same problem with gcc 7.5.0, because the exec doesn't contain the debug info for the function, because the corresponding object is not linked in. Adter adding "with Ada.Strings.Maps; use Ada.Strings.Maps;" to gdb.ada/widewide/foo.adb I run into the same problem with gcc 7.5.0. Add KFAILs for the PR. Tested on x86_64-linux: - openSUSE Leap 15.4 (using gcc 7.5.0), and - openSUSE Tumbleweed (using gcc 13.2.1). Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30908 --- gdb/testsuite/gdb.ada/str_binop_equal.exp | 20 ++++++++++++++-- gdb/testsuite/gdb.ada/widewide.exp | 28 +++++++++++++++++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.ada/str_binop_equal.exp b/gdb/testsuite/gdb.ada/str_binop_equal.exp index f3c8a348d82..38b04f6a958 100644 --- a/gdb/testsuite/gdb.ada/str_binop_equal.exp +++ b/gdb/testsuite/gdb.ada/str_binop_equal.exp @@ -31,8 +31,24 @@ runto "foo_p211_061.adb:$bp_location" gdb_test "print my_str = my_str" \ " = true" -gdb_test "print my_str = \"ABCD\"" \ - " = true" +set kfail_re \ + [multi_line \ + [string_to_regexp {Symbol: ada.strings.maps."="}] \ + ".*" \ + "\\$$decimal = false"] + +gdb_test_no_output "set debug expr 1" + +gdb_test_multiple {print my_str = "ABCD"} "" { + -re -wrap " = true" { + pass $gdb_test_name + } + -re -wrap $kfail_re { + kfail ada/30908 $gdb_test_name + } +} + +gdb_test "set debug expr 0" gdb_test "print my_str = \"EFGH\"" \ " = false" diff --git a/gdb/testsuite/gdb.ada/widewide.exp b/gdb/testsuite/gdb.ada/widewide.exp index 5c5b5a34dc3..c02d7f398f5 100644 --- a/gdb/testsuite/gdb.ada/widewide.exp +++ b/gdb/testsuite/gdb.ada/widewide.exp @@ -42,9 +42,33 @@ gdb_test "print my_wws(1)" "= 32 ' '" gdb_test "print my_wws(2)" "= 104 'h'" -gdb_test "print my_wws = \" helo\"" " = true" +set kfail_re \ + [multi_line \ + [string_to_regexp {Symbol: ada.strings.maps."="}] \ + ".*" \ + "\\$$decimal = false"] + +gdb_test_no_output "set debug expr 1" + +gdb_test_multiple {print my_wws = " helo"} "" { + -re -wrap " = true" { + pass $gdb_test_name + } + -re -wrap $kfail_re { + kfail ada/30908 $gdb_test_name + } +} +gdb_test_multiple {print my_ws = "wide"} "" { + -re -wrap " = true" { + pass $gdb_test_name + } + -re -wrap $kfail_re { + kfail ada/30908 $gdb_test_name + } +} + +gdb_test "set debug expr 0" -gdb_test "print my_ws = \"wide\"" " = true" gdb_test "print my_ws = \"nope\"" " = false" gdb_test "print \"x\" & my_ws & \"y\"" " = \"xwidey\"" base-commit: 1371b803685eebf02db4fe81ac7f4a6606c5d5b4 -- 2.35.3