aboutsummaryrefslogtreecommitdiffstats
path: root/erts/test
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2011-12-09 19:55:50 +0100
committerPatrik Nyblom <[email protected]>2011-12-09 19:55:57 +0100
commitf20b520b0d2d990ab70b56345b63a8b508edde1a (patch)
treeb9df775ae522e006ca670215e96b86d722413f9b /erts/test
parent40bc5cf36abb9697f07f788fa679a7d18903ba14 (diff)
parente3b1ff5a7168b221f227853e82433b84504db1fc (diff)
downloadotp-f20b520b0d2d990ab70b56345b63a8b508edde1a.tar.gz
otp-f20b520b0d2d990ab70b56345b63a8b508edde1a.tar.bz2
otp-f20b520b0d2d990ab70b56345b63a8b508edde1a.zip
Merge branch 'pan/win64-fixes'
* pan/win64-fixes: Update INSTALL-WIN32.md to reflect changes in R15B Make erl_alloc.c use correct strtol variant on windows Set absolute limit on number of threads in ethread_SUITE OTP-9130
Diffstat (limited to 'erts/test')
-rw-r--r--erts/test/ethread_SUITE_data/ethread_tests.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/erts/test/ethread_SUITE_data/ethread_tests.c b/erts/test/ethread_SUITE_data/ethread_tests.c
index 7e7e133d6c..ed96ecdbd2 100644
--- a/erts/test/ethread_SUITE_data/ethread_tests.c
+++ b/erts/test/ethread_SUITE_data/ethread_tests.c
@@ -82,6 +82,7 @@ static void
print_eol(void)
{
fprintf(stderr, EOL);
+ fflush(stderr);
}
static void print_line(char *frmt,...)
@@ -826,6 +827,7 @@ detached_thread_test(void)
* Tests
*/
#define MTT_TIMES 10
+#define MTT_HARD_LIMIT (80000)
static int mtt_terminate;
static ethr_mutex mtt_mutex;
@@ -866,14 +868,20 @@ mtt_create_join_threads(void)
while (1) {
if (ix >= no_tids) {
no_tids += 100;
+ if (no_tids > MTT_HARD_LIMIT) {
+ print_line("Hit the hard limit on number of threads (%d)!",
+ MTT_HARD_LIMIT);
+ break;
+ }
tids = (ethr_tid *) realloc((void *)tids, sizeof(ethr_tid)*no_tids);
ASSERT(tids);
}
res = ethr_thr_create(&tids[ix], mtt_thread, NULL, NULL);
- if (res != 0)
+ if (res != 0) {
break;
+ }
ix++;
- } while (res == 0);
+ }
no_threads = ix;