Complicated dg test cases

Janis Johnson janis187@us.ibm.com
Sun Feb 1 04:26:00 GMT 2004


On Sat, Jan 31, 2004 at 04:26:24PM -0800, Matt Austern wrote:
> OK, now I have to plead for help.  There's one important corner case on 
> Darwin ("important" meaning that you're almost certain to get it wrong 
> if you don't deal with it specially) that isn't covered by any existing 
> test case and that requires some icky stuff: building a static archive 
> and then linking against it.  This test cannot be rewritten to avoid 
> the .a, because what we're testing is very specifically the interaction 
> between static archives and our template implementation.
> 
> Here's one way to write the test case.  What I don't know is how to put 
> this in a form where it can become part of the dg test suite.  Any 
> advice?

Several months ago, or maybe more than a year ago, I submitted a patch
for the binary compatibility tests in gcc.dg/compat and g++dg/compat to
builds pieces of a test into shared objects and static archives as well
as relocatable object files.  It wasn't reviewed and I got sidetracked.
There are lots of problems that could be discovered with tests like
that.  I'll dig it up and let you take a look at it.  I'm very far
behind with everything right now; how urgent is this for you?

The compat tests already break a test into three pieces that are
compiled separately, but now they're just built into separate .o files.
I don't know of them finding any binary compatibility problems between
releases of GCC, which was their original goal, but they have found a
lot of bugs using the same compiler and same options for the two pieces.
Expanding them to use libraries (static and shared) could be very
interesting.  The main roadblock, I think, is that there are so many
ways to build libraries for the operating systems that GCC supports that
it will be difficult to set up.

Janis



More information about the Gcc mailing list