Hi!
On 2016-12-14T21:31:05-0500, David Malcolm <[email protected]> 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.
Grüße
Thomas
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht
München, HRB 106955
>From 84c75f25c05dde591b6ee74d7aacbc3bfec640d3 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <[email protected]>
Date: Tue, 17 Aug 2021 08:45:18 +0200
Subject: [PATCH] Restore 'gcc.dg/pr78213.c' testing
... after it had gotten disabled in r243681 (Git
commit ecfc21ff34ddc6f8aa517251fb51494c68ff741f)
"Introduce selftest::locate_file".
gcc/testsuite/
* gcc.dg/pr78213.c: Restore testing.
---
gcc/testsuite/gcc.dg/pr78213.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/pr78213.c b/gcc/testsuite/gcc.dg/pr78213.c
index ebc2cce78f4..40dd3c82b60 100644
--- a/gcc/testsuite/gcc.dg/pr78213.c
+++ b/gcc/testsuite/gcc.dg/pr78213.c
@@ -1,12 +1,5 @@
/* { 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 "" { *-*-* } } */
+/* { dg-options "-fself-test=$srcdir/selftests" } */
/* Verify that -fself-test does not fail on a non empty source. */
--
2.30.2