From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 6852E3858C5F for ; Fri, 26 May 2023 23:39:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6852E3858C5F 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-pl1-x62d.google.com with SMTP id d9443c01a7336-1ae875bf125so8732865ad.1 for ; Fri, 26 May 2023 16:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1685144339; x=1687736339; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=hw6rAlEfzonq/TnzR1x1+3FmTGqk0TMrPGpmq4G9lLA=; b=hVj0wmiWZeK4PKVN1XRdquQtahYRwkjqJKAiDVUQi2JBw6jocoWfpbC5tMqXvs9A1w ChU1xF8b7IDQ5jO/OUijoGLF9Q2aguFshDNL4HCYj1Obg3FnqfLunm0zQymtfry68RJ3 cCQD6r5BBBetO4p6eLmOaQk9521P/mgQZ3Qby6K8FUVkQknwhTk2PkLFtnKjHh1cIzJf AgWtzrKeQHNUgzDylCRRgoU7bruPUqEu+ZAn38BvlSyfHk0FlSxQ7+OJ3k4LrTUc8NNr T61qYBHKRo4E8yG7zI1chx9rKoxwuAg7Lsfx1JNhjg/T67jOoBr1+cIPzjngGSQE8eWH Zl6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685144339; x=1687736339; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hw6rAlEfzonq/TnzR1x1+3FmTGqk0TMrPGpmq4G9lLA=; b=DrKhd3PfjHbEhAc1TnuaoYEwHDPoAH1hlesuFD93+gVxAWr6xi9+T87Zvg8AH5+Orp /70MWAxmED7kAkkTtL11QX0dZVQSeVz+lbOUuGVf05eWaWgHgNBj+fQETAxkibOMEWSu 7QFY+QafDdYU+teADuUlwv+ePERMeicWiCGRO0UjQsxzcS6/CB18guysjhxZRQh49Puu IhSXpj4dIymPTaubPzsnkQBdeCyprL+gBHRM+mQdz1vHW+QJ3TZBCE132SCYCgXW+8n7 NYpo0Kt+zVSk2jYuE5J+821tc6w5AEzw5KMn/sOQsMA+wy/W/TFruoRk9Ko4Xe9DcfPN PdHg== X-Gm-Message-State: AC+VfDx13cATdkV24uYdLQZ3ZgCySUE0kocmG7IAhZoRCYMdclOvUC4b ofDwBZ+6b2orM67DuHwlmIxckw== X-Google-Smtp-Source: ACHHUZ5yTiwpq8YmFU9OmJL4YR0OOtdKyHaRKl4HTsZBnqLiaJfWbjfJEMaITbdpdV0ICZk7NOgcwQ== X-Received: by 2002:a17:903:2350:b0:1b0:45e:fb02 with SMTP id c16-20020a170903235000b001b0045efb02mr4485105plh.35.1685144339377; Fri, 26 May 2023 16:38:59 -0700 (PDT) Received: from [192.168.50.116] ([71.202.114.183]) by smtp.gmail.com with ESMTPSA id n2-20020a170902e54200b001ae268978cfsm3748019plf.259.2023.05.26.16.38.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 May 2023 16:38:59 -0700 (PDT) Message-ID: <7297b31f-2447-e4da-5b74-65cee515c7cd@rivosinc.com> Date: Fri, 26 May 2023 16:38:57 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] RISC-V: Add missing torture-init and torture-finish for rvv.exp Content-Language: en-US To: Thomas Schwinge , Kito Cheng Cc: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, patrick@rivosinc.com, jlaw@ventanamicro.com, "Maciej W . Rozycki" , Palmer Dabbelt References: <20230522064138.74056-1-kito.cheng@sifive.com> <87jzwxsc3b.fsf@dem-tschwing-1.ger.mentorg.com> <5070d049-f3ee-e175-4bad-21cd2528e42b@rivosinc.com> <87sfbkqhrq.fsf@dem-tschwing-1.ger.mentorg.com> From: Vineet Gupta In-Reply-To: <87sfbkqhrq.fsf@dem-tschwing-1.ger.mentorg.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,KAM_SHORT,NICE_REPLY_A,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 List-Id: On 5/25/23 13:26, Thomas Schwinge wrote: >> I'm pasting a snippet of gcc.log. Issue is indeed triggered by rvv.exp >> which needs some love. > I'd intentionally asked to "see a complete 'gcc.log' file where the > ERRORs are visible". The full log files are humongous - even xz compressed is ~ 7 MB - how can I share that w/o the list dropping it. I guess I can try emailing it you directly on work email - if that's OK. >> The torture-{init,finish} needs to be in riscv.exp not rvv.exp >> Running full tests now. > I still don't understand this. > > My current theory would be that some other '*.exp' file runs > 'torture-init' and then prematurely ends without 'torture-finish', and > thus the torture testing state bleeds into the next '*.exp' file(s). I'd > hoped that I could pinpoint that via "a complete 'gcc.log' file where the > ERRORs are visible". Seems likely. So back to good old printf style debugging: I added dumping of the dup options to see what exactly was leaking. setup #1  - riscv.exp: Added torture-init/finish  - Deleted rvv.exp (to isolate the problem) Leaking toggles are from torture-options.exp where the debug prints themselves are added. A trimmed version of gcc.log is at [1] --->8----- Running /scratch/vineetg/gnu/toolchain-upstream/gcc/gcc/testsuite/gcc.target/pru/pru.exp ... testcase /scratch/vineetg/gnu/toolchain-upstream/gcc/gcc/testsuite/gcc.target/pru/pru.exp completed in 0 seconds Running /scratch/vineetg/gnu/toolchain-upstream/gcc/gcc/testsuite/gcc.target/riscv/riscv.exp ... ERROR: tcl error sourcing /scratch/vineetg/gnu/toolchain-upstream/gcc/gcc/testsuite/gcc.target/riscv/riscv.exp. ERROR: tcl error code NONE ERROR: torture-init: LTO_TORTURE_OPTIONS is not empty as expected = "{ -O2 -flto -fno-use-linker-plugin -flto-partition=none } { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects }"     while executing "error "torture-init: LTO_TORTURE_OPTIONS is not empty as expected =  \"${LTO_TORTURE_OPTIONS}\"""     invoked from within "if [info exists LTO_TORTURE_OPTIONS] {     error "torture-init: LTO_TORTURE_OPTIONS is not empty as expected =  \"${LTO_TORTURE_OPTIONS}\""     }"     (procedure "torture-init" line 12)     invoked from within "torture-init"     (file "/scratch/vineetg/gnu/toolchain-upstream/gcc/gcc/testsuite/gcc.target/riscv/riscv.exp" line 44)     invoked from within "source /scratch/vineetg/gnu/toolchain-upstream/gcc/gcc/testsuite/gcc.target/riscv/riscv.exp"     ("uplevel" body line 1)     invoked from within "uplevel #0 source /scratch/vineetg/gnu/toolchain-upstream/gcc/gcc/testsuite/gcc.target/riscv/riscv.exp"     invoked from within "catch "uplevel #0 source $test_file_name" msg" UNRESOLVED: testcase '/scratch/vineetg/gnu/toolchain-upstream/gcc/gcc/testsuite/gcc.target/riscv/riscv.exp' aborted due to Tcl error testcase /scratch/vineetg/gnu/toolchain-upstream/gcc/gcc/testsuite/gcc.target/riscv/riscv.exp completed in 0 seconds --->8--- Setup #2  - riscv.exp: Added torture-init/finish  - riscv.exp: commented away ADDITIONAL_TORTURE_OPTIONS line  - rvv.exp remains, unchanged This has more errors since I'm actually running all multilib variants. --->8--- testcase /scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.target/riscv/riscv.exp completed in 0 seconds Running /scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp ... ERROR: tcl error sourcing /scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp. ERROR: tcl error code NONE ERROR: torture-init: LTO_TORTURE_OPTIONS is not empty as expected = "{ -O2 -flto -fno-use-linker-plugin -flto-partition=none } { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects }"     while executing "error "torture-init: LTO_TORTURE_OPTIONS is not empty as expected =  \"${LTO_TORTURE_OPTIONS}\"""     invoked from within "if [info exists LTO_TORTURE_OPTIONS] {     error "torture-init: LTO_TORTURE_OPTIONS is not empty as expected =  \"${LTO_TORTURE_OPTIONS}\""     }"     (procedure "torture-init" line 12)     invoked from within "torture-init"     (file "/scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp" line 42)     invoked from within "source /scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp"     ("uplevel" body line 1)     invoked from within "uplevel #0 source /scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp"     invoked from within "catch "uplevel #0 source $test_file_name" msg" UNRESOLVED: testcase '/scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp' aborted due to Tcl error ... Running /scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp ... ERROR: tcl error sourcing /scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp. ERROR: tcl error code NONE ERROR: torture-init: torture_without_loops is not empty as expected = "{ -O0 } { -O1 } { -O2 } { -O3 -g } { -Os } { -O2 -flto -fno-use-linker-plugin -flto-partition=none } { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects }"     while executing "error "torture-init: torture_without_loops is not empty as expected = \"${torture_without_loops}\"""     invoked from within "if [info exists torture_without_loops] {     error "torture-init: torture_without_loops is not empty as expected = \"${torture_without_loops}\""     }"     (procedure "torture-init" line 4)     invoked from within "torture-init"     (file "/scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp" line 37)     invoked from within "source /scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp"     ("uplevel" body line 1)     invoked from within "uplevel #0 source /scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp"     invoked from within "catch "uplevel #0 source $test_file_name" msg" UNRESOLVED: testcase '/scratch/vineetg/gnu/toolchain-upstream2/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp' aborted due to Tcl error ... --->8--- [1] https://paste.debian.net/1281237/    # this is redacted as this paste bin can