This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libstdc++ test suite still drives machine into swap
- To: Benjamin Kosnik <bkoz at redhat dot com>, gcc at gcc dot gnu dot org,libstdc++ at gcc dot gnu dot org
- Subject: Re: libstdc++ test suite still drives machine into swap
- From: Zachary Weinberg <zackw at panix dot com>
- Date: Thu, 2 Aug 2001 18:41:41 -0400
Benjamin Kosnik wrote:
> I think Zack and I will just have to disagree on what constitutes
> a testsuite. For me, it includes pathological edge cases as defined in
> the standard. He thinks they are tested elsewhere, I disagree. Since this
> topic seems to be activated by cron jobs every 3 months, I just thought
> I'd reply, yet again.
This is not exactly my position. I agree that pathological edge
cases should be tested. My argument is that the existing code
which claims to test them, doesn't. This should be quite clear
just from inspection. Allocating and initializing a string of
max_size() can only succeed on a machine with more than a gigabyte
of virtual memory. On a normal machine with less memory, either
the process dies, or bad_alloc is thrown. Either way, the actual
test - the code intended to be executed after the allocation
completes - never gets executed.
The problem of the machine getting driven into swap by the test is
an independent problem with the same cause. I would suggest that
that one be solved by adding a utility routine to libstdc++ which
makes the appropriate setrlimit() calls to constrain process memory,
and then calling it from test cases that are known to thrash the computer.
This should not, however, be seen as a solution to the problem that
the tests are not testing what they are intended to.
zw
semi-temporary new address
not subscribed to gcc lists at the moment