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



> 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.

Great. Thanks for taking care of this.

> Index: insert.cc
> ===================================================================
> --- insert.cc	2001/05/12 16:51:41	1.3
> +++ insert.cc	2001/08/06 00:54:50
> @@ -23,6 +23,7 @@
>  #include <string>
>  #include <stdexcept>
>  #include <debug_assert.h>
> +#include <memlimit.h>
>  
>  int test01(void)
>  {
> @@ -189,6 +190,7 @@
>  
>  int main()
>  { 
> +  __set_testsuite_memlimit();
>    test01();
>    return 0;
>  }

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. 

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.

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.)

-benjamin


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