From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id 940E43858414 for ; Wed, 18 Aug 2021 23:56:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 940E43858414 Received: by mail-pg1-x536.google.com with SMTP id r2so4087872pgl.10 for ; Wed, 18 Aug 2021 16:56:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YD4rkXDcnaVuSj8bRQadu6j32epMll97Tkn/0phrQMg=; b=HYoYbEvmTvOqwb18mRkl0LAfRGpbpYKd/dLVO30Z7xpzDfGXNmCMbO1rjKNSMRhIL8 3fup/2FtZW7TbbaRYwgy1FCKhrlZSF4ug9cwaNM9Jmvcuy5AKzy2X4nwwT9JnQQcoV6K oVzN6EUMp8oNBqNO634w/oJzkRoDvjM+ADSlrt65qZctUZk92ULF22aSh4/TVxyHeBhB ENjB7TSif1d3OtzDku60HKe9eUVhxWtUOeAWE92sR8xfcNSk9kp0Zvt+hOQREKXsAtAg zeJ4tbxpB4liWgCKrwyR+6oXGwT8ZAkjDEHTNyHgOMY5wZC6Uuj6Xm+BhK7CnbWCsRaB k+zg== X-Gm-Message-State: AOAM530qYlgU26ML0BSeu4I9PTH5ah+Q3FMi0viDEutf9+Swfbyfdvt+ xYREytlChX3WSYLNOKETsjjvMp5RsHoI85d+HI8= X-Google-Smtp-Source: ABdhPJwxqizOon9Ayhxoxtgc6HwUUhsv53JoA/p9KdbItAHA/srZH2XCi/W/S0fcCE4fwHuOSAxYZa6Fp/5tUm5WCi8= X-Received: by 2002:a65:5b86:: with SMTP id i6mr11441247pgr.180.1629331014602; Wed, 18 Aug 2021 16:56:54 -0700 (PDT) MIME-Version: 1.0 References: <1481769065-53621-1-git-send-email-dmalcolm@redhat.com> <877dgk7dya.fsf@euler.schwinge.homeip.net> In-Reply-To: <877dgk7dya.fsf@euler.schwinge.homeip.net> From: "H.J. Lu" Date: Wed, 18 Aug 2021 16:56:18 -0700 Message-ID: Subject: Re: [committed] Introduce selftest::locate_file (v5) To: Thomas Schwinge Cc: David Malcolm , GCC Patches , Rainer Orth , Mike Stump Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3025.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , X-List-Received-Date: Wed, 18 Aug 2021 23:57:06 -0000 On Tue, Aug 17, 2021 at 12:01 AM Thomas Schwinge wrote: > > Hi! > > On 2016-12-14T21:31:05-0500, David Malcolm wrote: > > On Wed, 2016-12-14 at 15:02 +0100, Bernd Schmidt wrote: > >> On 12/09/2016 08:32 PM, David Malcolm wrote: > >> > Thanks. Unfortunately, applying the "locate_file" patch > >> > https://gcc.gnu.org/ml/gcc-patches/2016-11/msg01186.html > >> > would now introduce a regression in a recently-added test case: > >> > >> > The problem is that this DejaGnu test case uses -fself-test, and > >> > doesn't provide any arguments. With the locate_file patch, we need to > >> > pass the path to $(srcdir)/testsuite/selftests as an argument to -fself > >> > -test, and it's not clear to me how to do that sanely in a DejaGnu test > >> > case > > Rather simple, actually -- once you realize how all this works. ;-) > > >> > if I pass in a dummy value (like for pr71591.c), then the > >> > selftests that use locate_file fail. > > > I've committed the following updated version to trunk (as r243681). > > > > Changed in v5: > > * disable DejaGnu test for PR 78213 > > > > Successfully bootstrapped®rtested on x86_64-pc-linux-gnu (with 2 PASS > > results converted to 1 UNSUPPORTED in gcc.sum, re gcc.dg/pr78213.c). > > > --- a/gcc/testsuite/gcc.dg/pr78213.c > > +++ b/gcc/testsuite/gcc.dg/pr78213.c > > @@ -1,6 +1,13 @@ > > /* { dg-do compile } */ > > /* { dg-options "-fself-test" } */ > > > > +/* When this test was written -fself-test took no argument, but it > > + has subsequently gained a mandatory argument, giving the path > > + to selftest support files (within the srcdir). > > + It's not clear how to provide this path sanely from > > + within DejaGnu, so for now, this test is disabled. */ > > +/* { dg-skip-if "" { *-*-* } } */ > > + > > /* Verify that -fself-test does not fail on a non empty source. */ > > > > int i; void bar(); void foo() > > OK to push the attached "Restore 'gcc.dg/pr78213.c' testing" to master > branch? > > See 'git grep --cached 'dg-.*options .*\$' -- */testsuite/' for > pre-existing '$srcdir' usage in DejaGnu directives. > This caused: cc1: note: self-tests are not enabled in this build FAIL: gcc.dg/pr78213.c -fself-test (test for warnings, line ) on release branches. -- H.J.