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
This commit is contained in:
Martin Pitt 2012-06-26 19:28:14 +02:00 committed by su-fang
parent ddecc33cb3
commit 63c8beae1f
1 changed files with 8 additions and 1 deletions

View File

@ -145,7 +145,14 @@ test_thread4 (void)
nl.rlim_cur = 1; nl.rlim_cur = 1;
if (prlimit (getpid (), RLIMIT_NPROC, &nl, &ol) != 0) if (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; error = NULL;
thread = g_thread_try_new ("a", thread1_func, NULL, &error); thread = g_thread_try_new ("a", thread1_func, NULL, &error);