tests: Reduce thread and iteration count on CI for /thread/rec-mutex3

It’s fairly consistently timing out on macOS. Looking at the verbose
test output, it’s still making progress right up until when it times out
(i.e. it hasn’t hit a `GRecMutex` bug and hasn’t deadlocked), so it
seems that the test runner is just hopelessly overloaded/underpowered
for the number of threads and iterations we’re asking it to test.

Tone those numbers down for CI test runs then.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2023-06-01 12:19:09 +01:00
parent add5fceedb
commit da0a945477

View File

@ -155,6 +155,16 @@ test_rec_mutex4 (void)
data.n_locks = 48;
data.n_iterations = 10000;
data.n_threads = 100;
/* Some CI runners have a hard time with this much contention, so tone it down
* a bit for CI. */
if (!g_test_perf ())
{
data.n_locks /= 10;
data.n_iterations /= 10;
data.n_threads /= 10;
}
data.threads = g_new0 (GThread*, data.n_threads);
data.owners = g_new0 (GThread*, data.n_locks);
data.locks = g_new0 (GRecMutex, data.n_locks);