Merge branch 'mainloop-slow-test' into 'main'

tests: Skip slow mainloop test on valgrind

See merge request GNOME/glib!4707
This commit is contained in:
Michael Catanzaro
2025-07-22 07:52:16 -05:00

View File

@@ -25,6 +25,7 @@
#include <glib.h>
#include <glib/gstdio.h>
#include "glib-private.h"
#include "gvalgrind.h"
#include <stdio.h>
#include <string.h>
@@ -2644,6 +2645,16 @@ test_simultaneous_source_context_destruction (void)
SimultaneousDestructionTest **test;
guint64 i;
/* The race in this test is very hard to reproduce under valgrind, so skip it.
* Otherwise the test can run for tens of minutes. */
#if defined (ENABLE_VALGRIND)
if (RUNNING_ON_VALGRIND && !g_test_thorough ())
{
g_test_skip ("Skipping hard-to-reproduce race under valgrind");
return;
}
#endif
if (g_test_thorough ())
{
n_concurrent = 512;