incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: [PATCH] RE: Mt tests
Date Tue, 28 Nov 2006 01:31:55 GMT
Farid Zaripov wrote:
>  > -----Original Message-----
>  > From: Martin Sebor []
>  > Sent: Friday, November 10, 2006 3:28 AM
>  > To:
>  > Subject: Re: Mt tests
>  >
>  > I think the simplest and most reliable way might be to
>  > hardcode the pathname of the executable (or just BUILDDIR)
>  > into the program itself and have it use it to exec itself.
>   You mean that relative path from environment variable BUILDDIR
> should be hardcoded, right?

I meant that we could hardcode the value of BUILDDIR in the test
driver when we build it, e.g., by #defining RW_BUILDDIR on the
compiler command line. I wouldn't want to require users to set
BUILDDIR in their environment in order to run the tests (I often
run tests by hand and I would find it inconvenient to have to
remember to set the variable).

>   Attached 21.string.diff is a patch to the 21.string.* files
> for create multithreaded tests of basic_string class.

I wonder if we could do away with the _mttest functions and instead
move the logic to rw_run_string_test(). Each MT test would start by
setting the rw_nthreads variable to a value greater than 1 and then
call rw_run_string_test(). That way we could trivially turn any
single-threaded test to a multi-threaded one simply by setting
rw_nthreads > 1 (of course, doing so would be silly for any of the
existing tests not written to exercise thread safety but the point
is that it would be possible).

Let me know what you think.


View raw message