This is the mail archive of the 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]

Re: libstdc++ test suite still drives machine into swap

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.

semi-temporary new address
not subscribed to gcc lists at the moment

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