From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CaRdOCOzSmJrKwAAWB0awg (envelope-from ) for ; Mon, 04 Apr 2022 04:58:11 -0400 Received: by simark.ca (Postfix, from userid 112) id D503E1F344; Mon, 4 Apr 2022 04:58:11 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 71A6B1E150 for ; Mon, 4 Apr 2022 04:58:07 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A7F5F3858434 for ; Mon, 4 Apr 2022 08:58:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7F5F3858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1649062686; bh=5kPb3JHyzZkkUJo1xH8mOODUWSsOMBl+Rbe8daNoMCg=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=bQ0f4UyigLSrnV6yFnG90ttvUMOlnL3G+V88zRGuhI7CO/WRQZ4H6hltE+yGFwtSF wMUO5+2oWspRtRhT5HVxq23xrbKihRFUIUqlaHVtPUgvqCmzuD9Pcv9J2b1L0uM8HQ 06cOoMTvpwEp9jFpcDa6DQDx5yiUUnTsTboOrUDI= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id ED2E53857806 for ; Mon, 4 Apr 2022 08:57:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ED2E53857806 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 32F581F37F; Mon, 4 Apr 2022 08:57:24 +0000 (UTC) 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 1DBE513216; Mon, 4 Apr 2022 08:57:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id igtEBvSySmLCDgAAMHmgww (envelope-from ); Mon, 04 Apr 2022 08:57:24 +0000 Date: Mon, 4 Apr 2022 10:57:22 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix KPASS in gdb.ada/arrayptr.exp Message-ID: <20220404085721.GA29984@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Cc: Tom Tromey Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, On openSUSE Leap 15.3 I run into: ... KPASS: gdb.ada/arrayptr.exp: scenario=minimal: print pa_ptr.all \ (PRMS minimal encodings) KPASS: gdb.ada/arrayptr.exp: scenario=minimal: print pa_ptr(3) \ (PRMS minimal encodings) KPASS: gdb.ada/arrayptr.exp: scenario=minimal: print pa_ptr.all(3) \ (PRMS minimal encodings) ... The test-case KFAILs some tests. However, the analysis in the corresponding PR talks of a compiler problem, so it should use XFAILs instead. The KFAILs are setup for pre-gcc-12, but apparantly the fix has been backported to system compiler 7.5.0, hence the KPASS. Fix this by: - using an XFAIL instead of a KFAIL - matching the specific gdb output that corresponds to the XFAILs (reproduced on Fedora 34). Tested on x86_64-linux, specifically openSUSE Leap 15.3 and Fedora 34. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix KPASS in gdb.ada/arrayptr.exp --- gdb/testsuite/gdb.ada/arrayptr.exp | 61 ++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/gdb/testsuite/gdb.ada/arrayptr.exp b/gdb/testsuite/gdb.ada/arrayptr.exp index 23e89759666..c3fb5f3d647 100644 --- a/gdb/testsuite/gdb.ada/arrayptr.exp +++ b/gdb/testsuite/gdb.ada/arrayptr.exp @@ -49,27 +49,56 @@ foreach_with_prefix scenario {all minimal} { gdb_test "ptype string_access" "= access array \\(<>\\) of character" - set kfail_int128support_re \ - "That operation is not available on integers of more than 8 bytes\\." - set kfail_packed_array_range_re \ - "cannot subscript or call something of type `foo__packed_array_ptr'" - # GNAT >= 12.0 has the needed fix here. + set xfail_expected 0 if {$scenario == "minimal" && ![test_compiler_info {gcc-1[2-9]-*}]} { - setup_kfail "minimal encodings" *-*-* + set xfail_expected 1 } - gdb_test "print pa_ptr.all" \ - " = \\(10, 20, 30, 40, 50, 60, 62, 63, -23, 42\\)" - # GNAT >= 12.0 has the needed fix here. - if {$scenario == "minimal" && ![test_compiler_info {gcc-1[2-9]-*}]} { - setup_kfail "minimal encodings" *-*-* + gdb_test_multiple "print pa_ptr.all" "" { + -re -wrap " = \\(10, 20, 30, 40, 50, 60, 62, 63, -23, 42\\)" { + pass $gdb_test_name + } + -re -wrap " = \[0-9\]+" { + if { $xfail_expected } { + xfail $gdb_test_name + } else { + fail $gdb_test_name + } + } } - gdb_test "print pa_ptr(3)" " = 30" - # GNAT >= 12.0 has the needed fix here. - if {$scenario == "minimal" && ![test_compiler_info {gcc-1[2-9]-*}]} { - setup_kfail "minimal encodings" *-*-* + set xfail_cannot_subscript_re \ + "cannot subscript or call something of type `foo__packed_array_ptr'" + + gdb_test_multiple "print pa_ptr(3)" "" { + -re -wrap " = 30" { + pass $gdb_test_name + + } + -re -wrap $xfail_cannot_subscript_re { + if { $xfail_expected } { + xfail $gdb_test_name + } else { + fail $gdb_test_name + } + } + } + + set xfail_attempt_to_index_re \ + "Attempt to index or call something other than an array or function" + + gdb_test_multiple "print pa_ptr.all(3)" "" { + -re -wrap " = 30" { + pass $gdb_test_name + + } + -re -wrap $xfail_attempt_to_index_re { + if { $xfail_expected } { + xfail $gdb_test_name + } else { + fail $gdb_test_name + } + } } - gdb_test "print pa_ptr.all(3)" " = 30" }