* [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on
@ 2016-11-01 15:46 Tamar Christina
2016-11-07 14:06 ` Tamar Christina
2016-11-07 17:57 ` Mike Stump
0 siblings, 2 replies; 9+ messages in thread
From: Tamar Christina @ 2016-11-01 15:46 UTC (permalink / raw)
To: GCC Patches, ro, mikestump; +Cc: nd
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
Hi all,
A glibc update recently broke this test by adding a CPP
macro that uses the ## string function which traditional-cpp
does not support.
The change in glibc that made the test fail is from
6962682ffe5e5f0373047a0b894fee7a774be254.
This fixes (PR78136) by changing the test to use a local
include file instead of one from glibc.
The intention of the test is to test that traditional-cpp does
not expand values inside <> blocks of #includes.
As such the include has to be included via <> syntax. To do this
the .exp has been modified to add the test directory to the
Include search path.
Ran regression tests on aarch64-none-linux-gnu.
Ok for trunk?
Thanks,
Tamar
gcc/testsuite/
2016-10-31 Tamar Christina <tamar.christina@arm.com>
PR testsuite/78136
* gcc.dg/cpp/trad/trad.exp
(dg-runtest): Added $srcdir/$subdir/ to Include dirs.
* gcc.dg/cpp/trad/include.c: Use local header file.
[-- Attachment #2: pr78136-fix-tradition-cpp --]
[-- Type: application/octet-stream, Size: 1321 bytes --]
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/include.c b/gcc/testsuite/gcc.dg/cpp/trad/include.c
index 94d25f815c6807bfcb57a93a2c3193244ccf2a11..2685ec5ded701c15efc16b8d813e8e4aec221972 100644
--- a/gcc/testsuite/gcc.dg/cpp/trad/include.c
+++ b/gcc/testsuite/gcc.dg/cpp/trad/include.c
@@ -5,8 +5,6 @@
/* vxWorksCommon.h uses the "#" operator to construct the name of an
include file, thus making the file incompatible with -traditional-cpp.
Newlib uses ## when including stdlib.h as of 2007-09-07. */
-/* { dg-do preprocess { target { { ! vxworks_kernel } && { ! newlib } } } } */
-#define __STDC__ 1 /* Stop complaints about non-ISO compilers. */
-#define stdlib 1
-#include <stdlib.h> /* { dg-bogus "o such file or directory" } */
+#define builtins 1
+#include <builtins.h> /* { dg-bogus "o such file or directory" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/trad.exp b/gcc/testsuite/gcc.dg/cpp/trad/trad.exp
index 5f090ac54a0162e5e9fb4f4094f29cc26506f79e..01e1400b3c38a8a3b96ce523bae84ee850f65f46 100644
--- a/gcc/testsuite/gcc.dg/cpp/trad/trad.exp
+++ b/gcc/testsuite/gcc.dg/cpp/trad/trad.exp
@@ -37,7 +37,7 @@ dg-init
# Main loop.
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
- "" $DEFAULT_TRADCPPFLAGS
+ "-I$srcdir/$subdir/" $DEFAULT_TRADCPPFLAGS
# All done.
dg-finish
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on
2016-11-01 15:46 [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on Tamar Christina
@ 2016-11-07 14:06 ` Tamar Christina
2016-11-07 17:57 ` Mike Stump
1 sibling, 0 replies; 9+ messages in thread
From: Tamar Christina @ 2016-11-07 14:06 UTC (permalink / raw)
To: GCC Patches, ro, mikestump; +Cc: nd
Ping.
________________________________________
From: gcc-patches-owner@gcc.gnu.org <gcc-patches-owner@gcc.gnu.org> on behalf of Tamar Christina <Tamar.Christina@arm.com>
Sent: Tuesday, November 1, 2016 3:46:07 PM
To: GCC Patches; ro@CeBiTec.Uni-Bielefeld.DE; mikestump@comcast.net
Cc: nd
Subject: [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on
Hi all,
A glibc update recently broke this test by adding a CPP
macro that uses the ## string function which traditional-cpp
does not support.
The change in glibc that made the test fail is from
6962682ffe5e5f0373047a0b894fee7a774be254.
This fixes (PR78136) by changing the test to use a local
include file instead of one from glibc.
The intention of the test is to test that traditional-cpp does
not expand values inside <> blocks of #includes.
As such the include has to be included via <> syntax. To do this
the .exp has been modified to add the test directory to the
Include search path.
Ran regression tests on aarch64-none-linux-gnu.
Ok for trunk?
Thanks,
Tamar
gcc/testsuite/
2016-10-31 Tamar Christina <tamar.christina@arm.com>
PR testsuite/78136
* gcc.dg/cpp/trad/trad.exp
(dg-runtest): Added $srcdir/$subdir/ to Include dirs.
* gcc.dg/cpp/trad/include.c: Use local header file.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on
2016-11-01 15:46 [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on Tamar Christina
2016-11-07 14:06 ` Tamar Christina
@ 2016-11-07 17:57 ` Mike Stump
2016-11-08 9:33 ` Tamar Christina
2016-11-16 14:41 ` Andreas Schwab
1 sibling, 2 replies; 9+ messages in thread
From: Mike Stump @ 2016-11-07 17:57 UTC (permalink / raw)
To: Tamar Christina; +Cc: GCC Patches, ro, nd
On Nov 1, 2016, at 8:46 AM, Tamar Christina <Tamar.Christina@arm.com> wrote:
>
> A glibc update recently broke this test by adding a CPP
> macro that uses the ## string function which traditional-cpp
> does not support.
> The change in glibc that made the test fail is from
> 6962682ffe5e5f0373047a0b894fee7a774be254.
>
> This fixes (PR78136) by changing the test to use a local
> include file instead of one from glibc.
> The intention of the test is to test that traditional-cpp does
> not expand values inside <> blocks of #includes.
> As such the include has to be included via <> syntax. To do this
> the .exp has been modified to add the test directory to the
> Include search path.
>
> Ran regression tests on aarch64-none-linux-gnu.
>
> Ok for trunk?
Ok.
Can you remove the comment: Newlib uses ## when including stdlib.h as of 2007-09-07. while you are at it? I think it doesn't make any sense post the change unless one reads history.
> 2016-10-31 Tamar Christina <tamar.christina@arm.com>
>
> PR testsuite/78136
> * gcc.dg/cpp/trad/trad.exp
> (dg-runtest): Added $srcdir/$subdir/ to Include dirs.
> * gcc.dg/cpp/trad/include.c: Use local header file.<pr78136-fix-tradition-cpp>
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on
2016-11-07 17:57 ` Mike Stump
@ 2016-11-08 9:33 ` Tamar Christina
2016-11-16 14:41 ` Andreas Schwab
1 sibling, 0 replies; 9+ messages in thread
From: Tamar Christina @ 2016-11-08 9:33 UTC (permalink / raw)
To: Mike Stump; +Cc: GCC Patches, ro, nd
> Can you remove the comment: Newlib uses ## when including stdlib.h as of
> 2007-09-07. while you are at it? I think it doesn't make any sense post the
> change unless one reads history.
>
No problem,
Thanks
> > 2016-10-31 Tamar Christina <tamar.christina@arm.com>
> >
> > PR testsuite/78136
> > * gcc.dg/cpp/trad/trad.exp
> > (dg-runtest): Added $srcdir/$subdir/ to Include dirs.
> > * gcc.dg/cpp/trad/include.c: Use local header
> > file.<pr78136-fix-tradition-cpp>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on
2016-11-07 17:57 ` Mike Stump
2016-11-08 9:33 ` Tamar Christina
@ 2016-11-16 14:41 ` Andreas Schwab
2016-11-16 15:55 ` Tamar Christina
1 sibling, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2016-11-16 14:41 UTC (permalink / raw)
To: Mike Stump; +Cc: Tamar Christina, GCC Patches, ro, nd
On Nov 07 2016, Mike Stump <mikestump@comcast.net> wrote:
> On Nov 1, 2016, at 8:46 AM, Tamar Christina <Tamar.Christina@arm.com> wrote:
>>
>> A glibc update recently broke this test by adding a CPP
>> macro that uses the ## string function which traditional-cpp
>> does not support.
>> The change in glibc that made the test fail is from
>> 6962682ffe5e5f0373047a0b894fee7a774be254.
>>
>> This fixes (PR78136) by changing the test to use a local
>> include file instead of one from glibc.
>> The intention of the test is to test that traditional-cpp does
>> not expand values inside <> blocks of #includes.
>> As such the include has to be included via <> syntax. To do this
>> the .exp has been modified to add the test directory to the
>> Include search path.
>>
>> Ran regression tests on aarch64-none-linux-gnu.
>>
>> Ok for trunk?
>
> Ok.
This is causing all test names to depend on $srcdir. A test name should
never include the value of $srcdir.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on
2016-11-16 14:41 ` Andreas Schwab
@ 2016-11-16 15:55 ` Tamar Christina
2016-11-16 15:57 ` Tamar Christina
0 siblings, 1 reply; 9+ messages in thread
From: Tamar Christina @ 2016-11-16 15:55 UTC (permalink / raw)
To: Andreas Schwab, Mike Stump; +Cc: GCC Patches, ro, nd
>
> This is causing all test names to depend on $srcdir. A test name should never
> include the value of $srcdir.
Sorry about that, committed a fix as r242500 under the obvious rule.
Thanks,
Tamar
>
> Andreas.
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196
> BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something
> completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on
2016-11-16 15:55 ` Tamar Christina
@ 2016-11-16 15:57 ` Tamar Christina
2016-11-16 18:58 ` Mike Stump
0 siblings, 1 reply; 9+ messages in thread
From: Tamar Christina @ 2016-11-16 15:57 UTC (permalink / raw)
To: Andreas Schwab, Mike Stump; +Cc: GCC Patches, ro, nd
[-- Attachment #1: Type: text/plain, Size: 737 bytes --]
Forgot to include the committed patch.
> -----Original Message-----
> From: Tamar Christina
> Sent: 16 November 2016 15:55
> To: Andreas Schwab; Mike Stump
> Cc: GCC Patches; ro@CeBiTec.Uni-Bielefeld.DE; nd
> Subject: RE: [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend
> on
>
> >
> > This is causing all test names to depend on $srcdir. A test name
> > should never include the value of $srcdir.
>
> Sorry about that, committed a fix as r242500 under the obvious rule.
>
> Thanks,
> Tamar
>
> >
> > Andreas.
> >
> > --
> > Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196
> > BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something
> > completely different."
[-- Attachment #2: trad-name-mangling-fix.patch --]
[-- Type: application/octet-stream, Size: 801 bytes --]
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/trad.exp b/gcc/testsuite/gcc.dg/cpp/trad/trad.exp
index 01e1400b3c38a8a3b96ce523bae84ee850f65f46..62ac213c3da56ac9aa74dc5c9cebc7c87f7fa4e7 100644
--- a/gcc/testsuite/gcc.dg/cpp/trad/trad.exp
+++ b/gcc/testsuite/gcc.dg/cpp/trad/trad.exp
@@ -29,7 +29,7 @@ load_lib gcc-dg.exp
# If a testcase doesn't have special options, use these.
global DEFAULT_TRADCPPFLAGS
if ![info exists DEFAULT_TRADCPPFLAGS] then {
- set DEFAULT_TRADCPPFLAGS " -traditional-cpp"
+ set DEFAULT_TRADCPPFLAGS " -traditional-cpp -I$srcdir/$subdir/"
}
# Initialize `dg'.
@@ -37,7 +37,7 @@ dg-init
# Main loop.
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
- "-I$srcdir/$subdir/" $DEFAULT_TRADCPPFLAGS
+ "" $DEFAULT_TRADCPPFLAGS
# All done.
dg-finish
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on
2016-11-16 15:57 ` Tamar Christina
@ 2016-11-16 18:58 ` Mike Stump
2016-11-16 19:01 ` Mike Stump
0 siblings, 1 reply; 9+ messages in thread
From: Mike Stump @ 2016-11-16 18:58 UTC (permalink / raw)
To: Tamar Christina; +Cc: Andreas Schwab, GCC Patches, ro, nd
On Nov 16, 2016, at 7:57 AM, Tamar Christina <Tamar.Christina@arm.com> wrote:
>
> Forgot to include the committed patch.
>>> This is causing all test names to depend on $srcdir. A test name
>>> should never include the value of $srcdir.
>>
>> Sorry about that, committed a fix as r242500 under the obvious rule.
Yeah, I easily could have approved it as well, so no worries.
The patch is Ok.
The way I usually catch this would be in reviewing the output of ./contrib/compare_tests, it would complain about a ton of new tests now not passing, which is a dead giveaway.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on
2016-11-16 18:58 ` Mike Stump
@ 2016-11-16 19:01 ` Mike Stump
0 siblings, 0 replies; 9+ messages in thread
From: Mike Stump @ 2016-11-16 19:01 UTC (permalink / raw)
To: Tamar Christina; +Cc: Andreas Schwab, GCC Patches, ro, nd
On Nov 16, 2016, at 10:58 AM, Mike Stump <mikestump@comcast.net> wrote:
>
> Yeah, I easily could have approved it as well, so no worries.
Oh. I see I did approve the original patch, sorry for not catching it. Thanks for all your work.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-11-16 19:01 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-01 15:46 [PATCH][GCC/TESTSUITE] Make test for traditional-cpp depend on Tamar Christina
2016-11-07 14:06 ` Tamar Christina
2016-11-07 17:57 ` Mike Stump
2016-11-08 9:33 ` Tamar Christina
2016-11-16 14:41 ` Andreas Schwab
2016-11-16 15:55 ` Tamar Christina
2016-11-16 15:57 ` Tamar Christina
2016-11-16 18:58 ` Mike Stump
2016-11-16 19:01 ` Mike Stump
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).