test: enable AF_UNIX server-oom test on !unix

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2022-02-09 14:03:12 +04:00 committed by Simon McVittie
parent 522cc62e02
commit d08973f6d3

View file

@ -94,6 +94,10 @@ test_oom_wrapper (gconstpointer data)
{
const OOMTestCase *test = data;
if (g_str_has_prefix (test->data, "unix:") &&
!test_check_af_unix_works ())
return;
if ((g_str_has_prefix (test->data, "tcp:") ||
g_str_has_prefix (test->data, "nonce-tcp:")) &&
!test_check_tcp_works ())
@ -145,9 +149,7 @@ main (int argc,
add_oom_test ("/server/new-nonce-tcp", test_new_server, "nonce-tcp:host=127.0.0.1,bind=127.0.0.1");
add_oom_test ("/server/new-tcp-star", test_new_server, "tcp:host=127.0.0.1,bind=*");
add_oom_test ("/server/new-tcp-v4", test_new_server, "tcp:host=127.0.0.1,bind=127.0.0.1,family=ipv4");
#ifdef DBUS_UNIX
add_oom_test ("/server/unix", test_new_server, unix_tmpdir);
#endif
ret = g_test_run ();