From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org>
Date: Tue, 13 Mar 2018 11:03:06 +0100
Subject: hurd: the socket tests are expected to fail

---
 tests/check_ipc.c | 43 +++++++++++++++++++++++++------------------
 1 file changed, 25 insertions(+), 18 deletions(-)

diff --git a/tests/check_ipc.c b/tests/check_ipc.c
index 7403771..ecfab9c 100644
--- a/tests/check_ipc.c
+++ b/tests/check_ipc.c
@@ -2399,30 +2399,37 @@ make_soc_suite(void)
 	Suite *s = suite_create("socket");
 	TCase *tc;
 
-	add_tcase(s, tc, test_ipc_us_connect_async, 7);
+#undef  add_cond_tcase
+#ifdef QB_GNU
+/* SO_SNDBUF isn't implemented in pflocal on Hurd */
+#define add_cond_tcase(func, timeout) add_tcase_xfail(s, tc, func, timeout)
+#else
+#define add_cond_tcase(func, timeout) add_tcase(s, tc, func, timeout)
+#endif
+	add_cond_tcase(test_ipc_us_connect_async, 7);
 
-	add_tcase(s, tc, test_ipc_txrx_us_getauth, 7);
-	add_tcase(s, tc, test_ipc_txrx_us_timeout, 28);
+	add_cond_tcase(test_ipc_txrx_us_getauth, 7);
+	add_cond_tcase(test_ipc_txrx_us_timeout, 28);
 /* Commented out for the moment as space in /dev/shm on the CI machines
    causes random failures */
-/*	add_tcase(s, tc, test_ipc_max_dgram_size, 30); */
-	add_tcase(s, tc, test_ipc_server_fail_soc, 7);
-	add_tcase(s, tc, test_ipc_txrx_us_block, 7);
-	add_tcase(s, tc, test_ipc_txrx_us_tmo, 7);
-	add_tcase(s, tc, test_ipc_fc_us, 7);
-	add_tcase(s, tc, test_ipc_exit_us, 6);
-	add_tcase(s, tc, test_ipc_dispatch_us, 15);
+/*	add_cond_tcase(test_ipc_max_dgram_size, 30); */
+	add_cond_tcase(test_ipc_server_fail_soc, 7);
+	add_cond_tcase(test_ipc_txrx_us_block, 7);
+	add_cond_tcase(test_ipc_txrx_us_tmo, 7);
+	add_cond_tcase(test_ipc_fc_us, 7);
+	add_cond_tcase(test_ipc_exit_us, 6);
+	add_cond_tcase(test_ipc_dispatch_us, 15);
 #ifndef __clang__ /* see variable length array in structure' at the top */
-	add_tcase(s, tc, test_ipc_stress_test_us, 58);
+	add_cond_tcase(test_ipc_stress_test_us, 58);
 #endif
-	add_tcase(s, tc, test_ipc_bulk_events_us, 15);
-	add_tcase(s, tc, test_ipc_event_on_created_us, 9);
-	add_tcase(s, tc, test_ipc_disconnect_after_created_us, 9);
-	add_tcase(s, tc, test_ipc_service_ref_count_us, 9);
-	add_tcase(s, tc, test_ipc_stress_connections_us, 3600 /* ? */);
-	add_tcase(s, tc, test_ipc_us_native_prio_dlock, 15);
+	add_cond_tcase(test_ipc_bulk_events_us, 15);
+	add_cond_tcase(test_ipc_event_on_created_us, 9);
+	add_cond_tcase(test_ipc_disconnect_after_created_us, 9);
+	add_cond_tcase(test_ipc_service_ref_count_us, 9);
+	add_cond_tcase(test_ipc_stress_connections_us, 3600 /* ? */);
+	add_cond_tcase(test_ipc_us_native_prio_dlock, 15);
 #if HAVE_GLIB
-	add_tcase(s, tc, test_ipc_us_glib_prio_dlock, 15);
+	add_cond_tcase(test_ipc_us_glib_prio_dlock, 15);
 #endif
 
 	return s;
