[PATCH] Decrease number of threads used by goroutines.go test

Ian Lance Taylor iant@google.com
Tue Mar 8 15:47:00 GMT 2011


Jakub Jelinek <jakub@redhat.com> writes:

> On Tue, Mar 08, 2011 at 07:20:28AM -0800, Ian Lance Taylor wrote:
>> Jakub Jelinek <jakub@redhat.com> writes:
>> 
>> > 2011-03-08  Jakub Jelinek  <jakub@redhat.com>
>> >
>> > 	* go.test/go-test.exp: For goroutines.go test pass
>> > 	max($[`ulimit -u`/4], 10000) as first argument, or 64 as a safe
>> > 	default.
>> 
>> How about if we do this unless the environment variable
>> GCCGO_RUN_ALL_TESTS is set, so that people have a way to run the full
>> testsuite.  I can also change the libgo testsuite to only run the
>> networking tests if that environment variable is set.  This patch is OK
>> with that change.  Thanks for doing it.
>
> Perhaps we could just use $[`ulimit -u`-100] or similar limit instead
> in that case, but if you know you can't run more than 1024 threads
> simultaneously and run it anyway, it is always going to fail and likely
> break other tests too.  Sure, the "safe" fallback of 64 maybe shouldn't be
> used in that case.

I wouldn't worry about it too much because this is all going to change
completely at some point anyhow, hopefully sooner rather than later.
I'm going to change libgo to not use a separate thread for every
goroutine.  I'd just like to have a way to run the full testsuite for
now.

Ian



More information about the Gcc-patches mailing list