aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-03-08 23:04:04 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-03-08 23:04:04 +0100
commit63fcce84ba5caa2a716e8167f0e499115fee1a54 (patch)
treec59efb6007278d4e4d8d2fd1ffa4e27d89ed12ee /gcc
parent918f238e7f736ee291d76e77fcefdaee761bf167 (diff)
downloadgcc-63fcce84ba5caa2a716e8167f0e499115fee1a54.zip
gcc-63fcce84ba5caa2a716e8167f0e499115fee1a54.tar.gz
gcc-63fcce84ba5caa2a716e8167f0e499115fee1a54.tar.bz2
go-test.exp: For goroutines.go test if GCCGO_RUN_ALL_TESTS is not set in the environment...
* 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], 10000) on native where ulimit -u is supported. From-SVN: r170792
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/go.test/go-test.exp21
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4cecf2e..2b171dc 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2011-03-08 Jakub Jelinek <jakub@redhat.com>
+
+ * 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], 10000) on
+ native where ulimit -u is supported.
+
2011-03-08 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.dg/optimize-bswapsi-1.c: Use -march=z900 on s390.
diff --git a/gcc/testsuite/go.test/go-test.exp b/gcc/testsuite/go.test/go-test.exp
index 8945b05..19cc0df 100644
--- a/gcc/testsuite/go.test/go-test.exp
+++ b/gcc/testsuite/go.test/go-test.exp
@@ -265,6 +265,27 @@ proc go-gc-tests { } {
verbose -log "$test: go_execute_args is $go_execute_args"
set index [string last " $progargs" $test_line]
set test_line [string replace $test_line $index end]
+ } elseif { [string match "*go.test/test/chan/goroutines.go" $test] \
+ && [getenv GCCGO_RUN_ALL_TESTS] == "" } {
+ # goroutines.go spawns by default 10000 threads, which is too much
+ # for many OSes.
+ if { [getenv GCC_TEST_RUN_EXPENSIVE] == "" } {
+ set go_execute_args 64
+ } elseif { ![is_remote host] && ![is_remote target] } {
+ # When using low ulimit -u limit, use maximum of
+ # a quarter of that limit and 10000 even when running expensive
+ # tests, otherwise parallel tests might fail after fork failures.
+ set nproc [lindex [remote_exec host {sh -c ulimit\ -u}] 1]
+ if { [string is integer -strict $nproc] } {
+ set nproc [expr $nproc / 4]
+ if { $nproc > 10000 } { set nproc 10000 }
+ if { $nproc < 16 } { set nproc 16 }
+ set go_execute_args $nproc
+ }
+ }
+ if { "$go_execute_args" != "" } {
+ verbose -log "$test: go_execute_args is $go_execute_args"
+ }
}
if { $test_line == "// \$G \$D/\$F\.go && \$L \$F\.\$A && \./\$A\.out >tmp.go &&" \