From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wrd1GbBLBWBlFwAAWB0awg (envelope-from ) for ; Mon, 18 Jan 2021 03:49:52 -0500 Received: by simark.ca (Postfix, from userid 112) id 5B4DA1EF80; Mon, 18 Jan 2021 03:49:52 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI,RDNS_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [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 9F26E1E590 for ; Mon, 18 Jan 2021 03:49:50 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E98BC3858D33; Mon, 18 Jan 2021 08:49:49 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 116583858D33 for ; Mon, 18 Jan 2021 08:49:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 116583858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 36EDCAC6E; Mon, 18 Jan 2021 08:49:46 +0000 (UTC) Date: Mon, 18 Jan 2021 09:49:44 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH][gdb/testsuite] Skip gdb.rust/*.exp for target board unix/-m32 Message-ID: <20210118084942.GA30245@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: , Cc: Tom Tromey Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi, When running gdb.rust/*.exp with target board unix/-m32, we see: ... Running src/gdb/testsuite/gdb.rust/union.exp ... gdb compile failed, error: Unrecognized option: 'm' Running src/gdb/testsuite/gdb.rust/modules.exp ... gdb compile failed, error: Unrecognized option: 'm' Running src/gdb/testsuite/gdb.rust/unsized.exp ... gdb compile failed, error: Unrecognized option: 'm' Running src/gdb/testsuite/gdb.rust/simple.exp ... gdb compile failed, error: Unrecognized option: 'm' Running src/gdb/testsuite/gdb.rust/watch.exp ... gdb compile failed, error: Unrecognized option: 'm' Running src/gdb/testsuite/gdb.rust/traits.exp ... gdb compile failed, error: Unrecognized option: 'm' Running src/gdb/testsuite/gdb.rust/expr.exp ... Running src/gdb/testsuite/gdb.rust/rust-style.exp ... gdb compile failed, error: Unrecognized option: 'm' Running src/gdb/testsuite/gdb.rust/methods.exp ... gdb compile failed, error: Unrecognized option: 'm' Running src/gdb/testsuite/gdb.rust/generics.exp ... gdb compile failed, error: Unrecognized option: 'm' === gdb Summary === nr of expected passes 95 nr of untested testcases 9 ... Fix this by testing for -m32 in the target board multilib_flags in skip_rust_tests. Tested on x86_64-linux. Any comments? Thanks, - Tom [gdb/testsuite] Skip gdb.rust/*.exp for target board unix/-m32 gdb/testsuite/ChangeLog: 2021-01-18 Tom de Vries * lib/gdb.exp (skip_rust_tests): Skip if multilib_flags contains -m32. --- gdb/testsuite/lib/gdb.exp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index ae24fe2f49c..23792e04c70 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2185,7 +2185,22 @@ proc skip_d_tests {} { # Return 1 to skip Rust tests, 0 to try them. proc skip_rust_tests {} { - return [expr {![isnative]}] + if { ![isnative] } { + return 1 + } + + # The rust compiler does not support "-m32", skip. + global board board_info + set board [target_info name] + if {[board_info $board exists multilib_flags]} { + foreach flag [board_info $board multilib_flags] { + if { $flag == "-m32" } { + return 1 + } + } + } + + return 0 } # Return a 1 for configurations that do not support Python scripting.