This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

Re: Using setrlimit in testsuite


On Mon, Aug 06, 2001 at 09:45:39AM -0700, Benjamin Kosnik wrote:
> > Okay, I have an initial patch for this, and I've re-enabled the
> > pathological test in insert.cc and ctor_copy_dtor.cc.  I'll wait to see
> > what the autobuilder comes up with overnight before posting a full patch.

Crumbs.  The -static test fails to catch bad_alloc; the normal shared
build is fine.  So my testsuite results go down by one.


> Isn't this the kind of thing that should be abstracted out and made 
> available to all the tests in the testsuite, say in debug_assert.h? I'm 
> thinking of making that file, which seems to be included in almost all 
> the test cases, have more functionality than just how to run an 
> assertion. 
[...]
> What say you? Of course, debug_assert.h is probably a bad name for a file 
> that holds support routines for the libstdc++ testsuite 
> (testsuite_hooks.h or whatever might be a better way to go.)

I went that exact same route.  The design of (and comments inside)
debug_assert.h made it seem that adding arbitrary stuff was out of line with
some redesign, so I went with a new file.  If they should be generalized
and merged (which sounds good), I can rename it to testsuite_hooks.h.


> I'm going to need to generate debug_assert.h at configure/build time  
> anyway, for other reasons, so you might think about doing the 
> memory-limit stuff there instead of on a per-file basis. That would 
> probably simplify the automake/autoconf integration.

Yep.  I'm still concerned that the autoconf test results for things not
affecting the library per se (e.g., HAVE_SYS_RESOURCE_H and whatnot)
are going to be included in c++config.h.  It doesn't cause any breakage,
but it's wasteful.  Should we make efforts to keep the testsuite-related
stuff out of that header?  If so, where does it go?

I changed configure.in to call

    AM_CONFIG_HEADER(config.h testsuite/memlimit.h)

as an experiment.  It worked fine, but the HAVE_* macros show up in
config.h.in anyhow.


Phil

-- 
Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
                                     - anonymous Egyptian scribe, c.1700 BC


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