Re: [PATCH] Decrease number of threads used by goroutines.go test (take 2)

2011-03-08 Thread Mike Stump
On Mar 8, 2011, at 10:44 AM, Jakub Jelinek wrote: > Because ulimit -u is Linux specific? Seems to work on darwin (266).

Re: [PATCH] Decrease number of threads used by goroutines.go test (take 2)

2011-03-08 Thread Ian Lance Taylor
Jakub Jelinek writes: > 2011-03-08 Jakub Jelinek > > * go.test/go-test.exp: For goroutines.go test if GCCGO_RUN_ALL_TESTS > is not set in the environment, pass 64 as first argument when not > running expensive tests or pass max($[`ulimit -u`/4], 1) on > Linux native

[PATCH] Decrease number of threads used by goroutines.go test (take 3)

2011-03-08 Thread Jakub Jelinek
On Tue, Mar 08, 2011 at 08:10:31PM +0100, Rainer Orth wrote: > Jakub Jelinek writes: > > > I'm happy to drop the [ ishost "*-linux*" ] && if you are going to look for > > failures on weirdo OSes. I have no idea what ulimit -u does on anything but > > Linux, while the tcl code only uses its value

Re: [PATCH] Decrease number of threads used by goroutines.go test (take 2)

2011-03-08 Thread Rainer Orth
Jakub Jelinek writes: > I'm happy to drop the [ ishost "*-linux*" ] && if you are going to look for > failures on weirdo OSes. I have no idea what ulimit -u does on anything but > Linux, while the tcl code only uses its value if it printed a number, > whether it is something similar to limit on

Re: [PATCH] Decrease number of threads used by goroutines.go test (take 2)

2011-03-08 Thread Jakub Jelinek
On Tue, Mar 08, 2011 at 07:56:38PM +0100, Rainer Orth wrote: > Jakub Jelinek writes: > At best, it's shell-specific: Solaris 11 /bin/sh (which is ksh93) does > have it, although admittedly previous Solaris/IRIX/Tru64 UNIX shells > don't. On the other hand, bash has it on all of those systems. >

Re: [PATCH] Decrease number of threads used by goroutines.go test (take 2)

2011-03-08 Thread Rainer Orth
Jakub Jelinek writes: >> Why should this be Linux-specific? I think the same logic applies >> everywhere. > > Because ulimit -u is Linux specific? At least, google doesn't show any > hints about any other OSes having such limit, neither RLIMIT_NPROC nor > ulimit -u. At best, it's shell-specifi

Re: [PATCH] Decrease number of threads used by goroutines.go test (take 2)

2011-03-08 Thread Jakub Jelinek
On Tue, Mar 08, 2011 at 07:40:38PM +0100, Rainer Orth wrote: > Jakub Jelinek writes: > > > Ok, here is an updated patch which uses both proposed env vars: > > > > GCCGO_RUN_ALL_TESTS=1 makes it fail for me as before (i.e. 1 threads) > > > > GCC_TEST_RUN_EXPENSIVE=1 makes it run with max($[`ul

Re: [PATCH] Decrease number of threads used by goroutines.go test (take 2)

2011-03-08 Thread Rainer Orth
Jakub Jelinek writes: > Ok, here is an updated patch which uses both proposed env vars: > > GCCGO_RUN_ALL_TESTS=1 makes it fail for me as before (i.e. 1 threads) > > GCC_TEST_RUN_EXPENSIVE=1 makes it run with max($[`ulimit -u`/4], 1) > threads on Linux native, 1 everywhere else Why s

[PATCH] Decrease number of threads used by goroutines.go test (take 2)

2011-03-08 Thread Jakub Jelinek
On Tue, Mar 08, 2011 at 08:04:23AM -0800, Ian Lance Taylor wrote: > I don't really care what environment variable we use, I just want some > way to run the full test, without having DejaGNU silently change the > test on me. It's perfectly reasonable to have the default check ulimit, > I just want

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

2011-03-08 Thread Ian Lance Taylor
Jakub Jelinek writes: > On Tue, Mar 08, 2011 at 04:27:04PM +0100, Rainer Orth wrote: >> >> 2011-03-08 Jakub Jelinek >> >> >> >> * go.test/go-test.exp: For goroutines.go test pass >> >> max($[`ulimit -u`/4], 1) as first argument, or 64 as a safe >> >> default. >> > >> > How about if w

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

2011-03-08 Thread Rainer Orth
Jakub Jelinek writes: > I guess [getenv GCC_TEST_RUN_EXPENSIVE] != "" could be a usable test here, > if false it could always use 64 threads or something like that, if true > it should IMNSHO still bound it to at most max($[`ulimit -u`/2], 1) > when ulimit -u is available, because running the

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

2011-03-08 Thread Ian Lance Taylor
Rainer Orth writes: > Ian Lance Taylor writes: > >> Jakub Jelinek writes: >> >>> 2011-03-08 Jakub Jelinek >>> >>> * go.test/go-test.exp: For goroutines.go test pass >>> max($[`ulimit -u`/4], 1) as first argument, or 64 as a safe >>> default. >> >> How about if we do this unle

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

2011-03-08 Thread Ian Lance Taylor
Jakub Jelinek writes: > On Tue, Mar 08, 2011 at 07:20:28AM -0800, Ian Lance Taylor wrote: >> Jakub Jelinek writes: >> >> > 2011-03-08 Jakub Jelinek >> > >> >* go.test/go-test.exp: For goroutines.go test pass >> >max($[`ulimit -u`/4], 1) as first argument, or 64 as a safe >> >

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

2011-03-08 Thread Jakub Jelinek
On Tue, Mar 08, 2011 at 04:27:04PM +0100, Rainer Orth wrote: > >> 2011-03-08 Jakub Jelinek > >> > >>* go.test/go-test.exp: For goroutines.go test pass > >>max($[`ulimit -u`/4], 1) as first argument, or 64 as a safe > >>default. > > > > How about if we do this unless the environme

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

2011-03-08 Thread Rainer Orth
Ian Lance Taylor writes: > Jakub Jelinek writes: > >> 2011-03-08 Jakub Jelinek >> >> * go.test/go-test.exp: For goroutines.go test pass >> max($[`ulimit -u`/4], 1) as first argument, or 64 as a safe >> default. > > How about if we do this unless the environment variable > G

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

2011-03-08 Thread Jakub Jelinek
On Tue, Mar 08, 2011 at 07:20:28AM -0800, Ian Lance Taylor wrote: > Jakub Jelinek writes: > > > 2011-03-08 Jakub Jelinek > > > > * go.test/go-test.exp: For goroutines.go test pass > > max($[`ulimit -u`/4], 1) as first argument, or 64 as a safe > > default. > > How about if we

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

2011-03-08 Thread Ian Lance Taylor
Jakub Jelinek writes: > 2011-03-08 Jakub Jelinek > > * go.test/go-test.exp: For goroutines.go test pass > max($[`ulimit -u`/4], 1) 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 pe

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

2011-03-08 Thread Jakub Jelinek
Hi! On Fedora/RHEL we default to ulimit -Su 1024 (just soft-limit, to better avoid non-root for bombs apparently). goroutines.go test by default attempts to spawn 1 threads, which means not only that goroutines.go test fails (no big deal), but that random other tests that happen to be tested a