Do not fail the /thread/thread4 test if prlimit() fails

This happens on the Debian buildds.

[smcv: Use g_test_skip()]

Forwarded: no, Debian buildd specific

Gbp-Pq: Topic debian
Gbp-Pq: Name 06_thread_test_ignore_prctl_fail.patch
This commit is contained in:
Martin Pitt 2012-06-26 19:28:14 +02:00 committed by luzp
parent cca0f81cec
commit d2ebb1b201
1 changed files with 8 additions and 1 deletions

View File

@ -142,7 +142,14 @@ test_thread4 (void)
nl.rlim_cur = 1;
if ((ret = prlimit (getpid (), RLIMIT_NPROC, &nl, &ol)) != 0)
g_error ("prlimit failed: %s", g_strerror (errno));
{
gchar *message = g_strdup_printf ("setting PRLIMIT_NPROC to {cur=%d,max=%d} failed: %s",
(int) nl.rlim_cur, (int) nl.rlim_max,
g_strerror (errno));
g_test_skip (message);
g_free (message);
return;
}
error = NULL;
thread = g_thread_try_new ("a", thread1_func, NULL, &error);