From patchwork Thu Jun 1 19:38:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 1789321 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20221208.gappssmtp.com header.i=@rivosinc-com.20221208.gappssmtp.com header.a=rsa-sha256 header.s=20221208 header.b=LZmMGDhj; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QXGfW6xFpz20QB for ; Fri, 2 Jun 2023 05:39:15 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1D2333857341 for ; Thu, 1 Jun 2023 19:39:13 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 184DA3858C2C for ; Thu, 1 Jun 2023 19:39:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 184DA3858C2C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-25669acf1b0so1035498a91.0 for ; Thu, 01 Jun 2023 12:39:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1685648340; x=1688240340; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LAsp6JB3ESDMAlM2KDffo0Uk93yHXDmrTn4rMuxXGAE=; b=LZmMGDhj5ReaGm3OxrVzJr1TILOne3+zVOoHcTayhCnMWOlLmH4EG8NKemWtOKBat7 /8WIOz/HmzZykWVHUpsqFC9C1xq/PBlq8pKKporX7uCYsd0doJlPIiygTxhfeeOadE2a B/fka19WlIZgTQYI2dGn54QP86xQ/SpR/tcaFmrRpHHXcfXPkojeGy/LQ/nVyvv7EnJj hqLBt4YTR++g0jyu2q5OR3Jz4rfEbR/xTHmBw3MKq3QRix03zgp6jHLo8mwhVu9Dns/x atK5jVJAsFqG88GlzMyaNMPDbAt9UreLoYmY1ycsDrQOsqqNOS/f1wNx1LU0pO4HTeEe LRiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685648340; x=1688240340; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LAsp6JB3ESDMAlM2KDffo0Uk93yHXDmrTn4rMuxXGAE=; b=FpDR4q9hdG+m++cMfymhxYaL3E6KiS5eLfeCmBJrMNvQ3CDPpSSiWeH7YJsUMSj6lq WQXORnQwMSKtxNs+LDaqfAwh2QK+93ehxBuNZPKI3xLl1o2R8l2SKo81czx2dFfV9FdC SpZfw5/mhF1tZyHt9GWKQsq7hWoEQsmxI93iRrU+B6Anhz67w6IBVLkQP+eRW2bkpzCJ fXSIYRW4LwZ+pF7aRRC6l2pNzi7kARI8ra2lSMfXaS3Tus0VQQiklkthMHbzAjN+SPmW kgj/VjOZ372x0jY0NHNxNGA5JCFCu/6BdKQuW4APcJfBIyFgqfPL8OytXBTaVruHejbJ Ku3Q== X-Gm-Message-State: AC+VfDyzp+WhPixvh6EV/JbST3flhUgFmVTwBYYMbO97a/P80DZTRmGL or2axDkBHHRSegsulwAm58L7Wqw4/cRT5lLt0s4= X-Google-Smtp-Source: ACHHUZ5w4qrw7gEERKLyf7WsjdSRvRSpp8bhkVOlFOEe0rnpNGZfJDvDr9Lsky3Yon1G/jIh6RYvxg== X-Received: by 2002:a17:90a:fa96:b0:24d:ebfe:be93 with SMTP id cu22-20020a17090afa9600b0024debfebe93mr274540pjb.37.1685648339633; Thu, 01 Jun 2023 12:38:59 -0700 (PDT) Received: from vineet-framework.ba.rivosinc.com ([71.202.114.183]) by smtp.gmail.com with ESMTPSA id j13-20020a17090ae60d00b0024749e7321bsm1781962pjy.6.2023.06.01.12.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 12:38:59 -0700 (PDT) From: Vineet Gupta To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, Jeff Law , Palmer Dabbelt , Philipp Tomsich , Christoph Mullner , gnu-toolchain@rivosinc.com, Vineet Gupta Subject: [Committed] testsuite: Unbork multilib setups using -march flags (RISC-V) Date: Thu, 1 Jun 2023 12:38:53 -0700 Message-Id: <20230601193853.160037-1-vineetg@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" RISC-V multilib testing is currently busted with follow splat all over: | Schedule of variations: | riscv-sim/-march=rv64imafdc/-mabi=lp64d/-mcmodel=medlow | riscv-sim/-march=rv32imafdc/-mabi=ilp32d/-mcmodel=medlow | riscv-sim/-march=rv32imac/-mabi=ilp32/-mcmodel=medlow | riscv-sim/-march=rv64imac/-mabi=lp64/-mcmodel=medlow ... ... | ERROR: tcl error code NONE | ERROR: torture-init: torture_without_loops is not empty as expected causing insane amount of false failures. | ========= Summary of gcc testsuite ========= | | # of unexpected case / # of unique unexpected case | | gcc | g++ | gfortran | | rv64imafdc/ lp64d/ medlow | 5421 / 4 | 1 / 1 | 6 / 1 | | rv32imafdc/ ilp32d/ medlow | 5422 / 5 | 3 / 2 | 6 / 1 | | rv32imac/ ilp32/ medlow | 391 / 5 | 3 / 2 | 43 / 8 | | rv64imac/ lp64/ medlow | 5422 / 5 | 1 / 1 | 43 / 8 | The error splat itself is from recent test harness improvements for stricter checks for torture-{init,finish} pairing. But the real issue is a latent bug from 2009: commit 3dd1415dc88, ("i386-prefetch.exp: Skip tests when multilib flags contain -march") which added an "early exit" condition to i386-prefetch.exp which could potentially cause an unpaired torture-{init,finish}. The early exit only happens in a multlib setup using -march in flags which is what RISC-V happens to use, hence the reason this was only seen on RISC-V multilib testing. Moving the early exit outside of torture-{init,finish} bracket reinstates RISC-V testing. | rv64imafdc/ lp64d/ medlow | 3 / 2 | 1 / 1 | 6 / 1 | | rv32imafdc/ ilp32d/ medlow | 4 / 3 | 3 / 2 | 6 / 1 | | rv32imac/ ilp32/ medlow | 3 / 2 | 3 / 2 | 43 / 8 | | rv64imac/ lp64/ medlow | 5 / 4 | 1 / 1 | 43 / 8 | gcc/testsuite: * gcc.misc-tests/i386-prefetch.exp: Move early return outside the torture-{init,finish} Signed-off-by: Vineet Gupta --- gcc/testsuite/gcc.misc-tests/i386-prefetch.exp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp index ad9e56a54bcf..98aab506cba0 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp +++ b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp @@ -14,6 +14,13 @@ # along with GCC; see the file COPYING3. If not see # . +if { [board_info target exists multilib_flags] + && [string match "* -march=*" " [board_info target multilib_flags] "] } { + # Multilib flags come after the -march flags we pass and override + # them, so skip these tests when such flags are passed. + return +} + # Test that the correct data prefetch instructions (SSE or 3DNow! variant, # or none) are used for various i386 cpu-type and instruction set # extension options for __builtin_prefetch. When using -mtune, specify @@ -90,13 +97,6 @@ load_lib torture-options.exp dg-init torture-init -if { [board_info target exists multilib_flags] - && [string match "* -march=*" " [board_info target multilib_flags] "] } { - # Multilib flags come after the -march flags we pass and override - # them, so skip these tests when such flags are passed. - return -} - set-torture-options $PREFETCH_NONE gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-none-*.c]] "" ""