public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/104023] New: Bulk rename of C++ test files to one filename extension ?
@ 2022-01-14 8:06 dcb314 at hotmail dot com
2022-01-14 8:15 ` [Bug testsuite/104023] " pinskia at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2022-01-14 8:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104023
Bug ID: 104023
Summary: Bulk rename of C++ test files to one filename
extension ?
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
I notice the following in the testsuite:
[/home/dcb/gcc/trunk.git/gcc/testsuite] $ find . -name \*.C -print | wc -l
18461
[/home/dcb/gcc/trunk.git/gcc/testsuite] $ find . -name \*.cc -print | wc -l
168
[/home/dcb/gcc/trunk.git/gcc/testsuite] $ find . -name \*.cpp -print | wc -l
23
[/home/dcb/gcc/trunk.git/gcc/testsuite] $ find . -name \*.cxx -print | wc -l
0
[/home/dcb/gcc/trunk.git/gcc/testsuite] $
Would it be a good idea to pick one filename extension for C++ testsuite files
and stick to it ?
Maybe moving to *.C would be cheap, but I notice that the main
parts of the compiler are moving to using *.cc, implying that
over 18,000 files might have to be moved to *.cc
Just an idea. Given the amount of work involved, it might not be worth it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/104023] Bulk rename of C++ test files to one filename extension ?
2022-01-14 8:06 [Bug testsuite/104023] New: Bulk rename of C++ test files to one filename extension ? dcb314 at hotmail dot com
@ 2022-01-14 8:15 ` pinskia at gcc dot gnu.org
2022-01-14 8:21 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-14 8:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104023
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think the testsuite only tests .C anyways. I am not in front of the computer
right now but you could check the .exp files to see if the other ones are
actually being tested.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/104023] Bulk rename of C++ test files to one filename extension ?
2022-01-14 8:06 [Bug testsuite/104023] New: Bulk rename of C++ test files to one filename extension ? dcb314 at hotmail dot com
2022-01-14 8:15 ` [Bug testsuite/104023] " pinskia at gcc dot gnu.org
@ 2022-01-14 8:21 ` rguenth at gcc dot gnu.org
2022-01-14 9:35 ` marxin at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-14 8:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104023
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
it depends on the specific sub-harness which suffix is included in the globs
...
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/104023] Bulk rename of C++ test files to one filename extension ?
2022-01-14 8:06 [Bug testsuite/104023] New: Bulk rename of C++ test files to one filename extension ? dcb314 at hotmail dot com
2022-01-14 8:15 ` [Bug testsuite/104023] " pinskia at gcc dot gnu.org
2022-01-14 8:21 ` rguenth at gcc dot gnu.org
@ 2022-01-14 9:35 ` marxin at gcc dot gnu.org
2022-01-14 9:52 ` marxin at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-14 9:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104023
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-01-14
Ever confirmed|0 |1
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Yes, some of them are really considered, e.g.:
$ grep cc ./g++.dg/vect/*.exp
$srcdir/$subdir/{pr,simd}*.{c,cc,S} ]] "" $DEFAULT_VECTCFLAGS
$srcdir/$subdir/slp-pr*.{c,cc,S} ]] "" $VECT_SLP_CFLAGS
$ grep cpp ./gcc.target/avr/*exp
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{\[cCS\],cpp}]] \
But some of them are likely ignored.
I'm willing to rename .cpp and .cc files to .C, is it something we want to do?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/104023] Bulk rename of C++ test files to one filename extension ?
2022-01-14 8:06 [Bug testsuite/104023] New: Bulk rename of C++ test files to one filename extension ? dcb314 at hotmail dot com
` (2 preceding siblings ...)
2022-01-14 9:35 ` marxin at gcc dot gnu.org
@ 2022-01-14 9:52 ` marxin at gcc dot gnu.org
2022-01-14 14:25 ` marxin at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-14 9:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104023
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Oh no. We usually use .cpp/.cc extension as an additional file that is
intentionally skipped by a glob pattern:
$ head g++.target/i386/mv12.C
...
// { dg-additional-sources "mv12-aux.cc" }
or:
gcc/testsuite/g++.dg/asan/asan_test.C:#include "asan_str_test.cc"
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/104023] Bulk rename of C++ test files to one filename extension ?
2022-01-14 8:06 [Bug testsuite/104023] New: Bulk rename of C++ test files to one filename extension ? dcb314 at hotmail dot com
` (3 preceding siblings ...)
2022-01-14 9:52 ` marxin at gcc dot gnu.org
@ 2022-01-14 14:25 ` marxin at gcc dot gnu.org
2022-01-14 14:35 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-14 14:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104023
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Working on that.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/104023] Bulk rename of C++ test files to one filename extension ?
2022-01-14 8:06 [Bug testsuite/104023] New: Bulk rename of C++ test files to one filename extension ? dcb314 at hotmail dot com
` (4 preceding siblings ...)
2022-01-14 14:25 ` marxin at gcc dot gnu.org
@ 2022-01-14 14:35 ` jakub at gcc dot gnu.org
2022-01-14 14:37 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-14 14:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104023
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yeah, a lot of test directories rely on one extension for the test and another
for auxiliary sources.
Furthermore, e.g. for libraries inherited from upstreams, we should use
extensions those projects use rather than switching to something we choose.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/104023] Bulk rename of C++ test files to one filename extension ?
2022-01-14 8:06 [Bug testsuite/104023] New: Bulk rename of C++ test files to one filename extension ? dcb314 at hotmail dot com
` (5 preceding siblings ...)
2022-01-14 14:35 ` jakub at gcc dot gnu.org
@ 2022-01-14 14:37 ` jakub at gcc dot gnu.org
2022-01-14 14:41 ` marxin at gcc dot gnu.org
2022-01-24 13:32 ` marxin at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-14 14:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104023
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'd say renaming the *.C in tests to something else would only bring pain and
no gain.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/104023] Bulk rename of C++ test files to one filename extension ?
2022-01-14 8:06 [Bug testsuite/104023] New: Bulk rename of C++ test files to one filename extension ? dcb314 at hotmail dot com
` (6 preceding siblings ...)
2022-01-14 14:37 ` jakub at gcc dot gnu.org
@ 2022-01-14 14:41 ` marxin at gcc dot gnu.org
2022-01-24 13:32 ` marxin at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-14 14:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104023
--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
I have the following suggestion:
- require all C++ files in gcc/testsuite to have .C extension with the
following exceptions:
1) allow .cc and .cpp for tests of inherited projects (./gdc.test)
2) allow .cc extension for additional files not used directly, but require the
file ending with -aux.cc or -main.cc. Note quite some filenames do follow the
naming scheme
What do you think?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/104023] Bulk rename of C++ test files to one filename extension ?
2022-01-14 8:06 [Bug testsuite/104023] New: Bulk rename of C++ test files to one filename extension ? dcb314 at hotmail dot com
` (7 preceding siblings ...)
2022-01-14 14:41 ` marxin at gcc dot gnu.org
@ 2022-01-24 13:32 ` marxin at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-24 13:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104023
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
Assignee|marxin at gcc dot gnu.org |unassigned at gcc dot gnu.org
--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
Leaving that are it does not make sense renaming thousands
of files to .cc (what we currently use for source code).
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-01-24 13:32 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 8:06 [Bug testsuite/104023] New: Bulk rename of C++ test files to one filename extension ? dcb314 at hotmail dot com
2022-01-14 8:15 ` [Bug testsuite/104023] " pinskia at gcc dot gnu.org
2022-01-14 8:21 ` rguenth at gcc dot gnu.org
2022-01-14 9:35 ` marxin at gcc dot gnu.org
2022-01-14 9:52 ` marxin at gcc dot gnu.org
2022-01-14 14:25 ` marxin at gcc dot gnu.org
2022-01-14 14:35 ` jakub at gcc dot gnu.org
2022-01-14 14:37 ` jakub at gcc dot gnu.org
2022-01-14 14:41 ` marxin at gcc dot gnu.org
2022-01-24 13:32 ` marxin at gcc dot gnu.org
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).