Skip to content

tests: limit number of threads to something reasonable.

Harald van Dijk requested to merge hvdijk/glib:tests-limit-threads into master

Creating 1000 threads with the default stack size of 8 MiB will fail on architectures with a 32-bit address space. Move up the existing THREADS macro, defined to 100, and use that instead.

Signed-off-by: Harald van Dijk harald@gigawatt.nl

This fixes the following error:

--- command ---
14:29:15 G_TEST_SRCDIR='/h/glib-2.65.0/glib/tests' G_TEST_BUILDDIR='/h/glib-2.65.0-build-x86/glib/tests' MALLOC_CHECK_='2' MALLOC_PERTURB_='118' G_DEBUG='gc-friendly' /h/glib-2.65.0-build-x86/glib/tests/once
--- stdout ---
# random seed: R02S3de116fc029d5cd3e152395688854106
1..5
# Start of once tests
# /once/single-threaded summary: Test g_once() usage from a single thread
ok 1 /once/single-threaded
# /once/multi-threaded summary: Test g_once() usage from multiple threads
Bail out! GLib-FATAL-ERROR: creating thread 'once-multi-threaded': Error creating thread: Resource temporarily unavailable
--- stderr ---

(/h/glib-2.65.0-build-x86/glib/tests/once:219932): GLib-ERROR **: 14:29:15.372: creating thread 'once-multi-threaded': Error creating thread: Resource temporarily unavailable
-------

Merge request reports