This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR C/12466 -Wold-style-definition incorrectly warns withellipsises


"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:

>  > On Tue, 30 Sep 2003, Kelley Cook wrote:
>  > > gcc/testsuite:
>  > >        * gcc.dg/Wold-style-definition-1.c: Add in 3 ellipsis
>  > testcases.
>  > 
>  > Please create a new testcase.
>  > *Never add stuff to a testcase, particularly not new tests*.
>  > brgds, H-P
> 
> While I normally agree with this, there is a downside if this position
> is taken to an extreme.  It takes longer to run the testsuite if we
> have gillions of tiny little files.
> 
> I think we should make a distinction between regression testcases that
> (used to) crash the compiler and feature testcases that ensure a
> feature, flag or optimization/transformation works properly.
> 
> In the latter case, as we modify or enhance the feature in question we
> should update the existing testcase to reflect the new reality.
> 
> So here I think it's proper to modify the original testcase.

The reason that existing testcases should not be changed is because if
you change the testcase, it might fail in some circumstances where the
previous testcase used to pass, and to automated tools (and humans
that are in a hurry) this looks like a regression.

Automated tools can't make the distinction that you are trying to
make, so people changing the testcase can't either.

If you have really completely changed a feature, the right approach is
to remove all the old testcases and create new ones with different
names (and different contents).  You would do this if there is nothing
left of the old feature to test.  Otherwise, you should leave the old
testcases in place, to ensure you didn't break existing functionality,
and add new testcases to test the new functionality.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]