GNOME Bugzilla – Bug 667468
glib-2.30.2: ipv6 tests fail when no ipv6 support is available
Last modified: 2015-02-21 18:02:35 UTC
As reported downstream: https://bugs.gentoo.org/show_bug.cgi?id=396505 ipv6 tests fail instead of being skipped when no ipv6 support is available: TEST: socket... (pid=17250) /socket/ipv4_sync: OK /socket/ipv4_async: OK /socket/ipv6_sync: ** ERROR:socket.c:92:create_server: assertion failed (error == NULL): Unable to create socket: Address family not supported by protocol (g-io-error-quark, 0) FAIL GTester: last random seed: R02S13b571544164acd99fc52fd52ddcecda /bin/sh: line 1: 15702 Terminated MALLOC_CHECK_=2 MALLOC_PERTURB_=$((${RANDOM:-256} % 256)) ../../glib/gtester --verbose io-stream actions memory-input-stream memory-output-stream readwrite g-file g-file-info converter-stream data-input-stream data-output-stream g-icon buffered-input-stream buffered-output-stream sleepy-stream filter-streams volumemonitor simple-async-result srvtarget contexts gsettings gschema-compile async-close-output-stream gdbus-addresses network-address gdbus-message socket pollable tls-certificate tls-interaction cancellable gdbus-close-pending gdbus-connection gdbus-connection-loss gdbus-connection-slow gdbus-names gdbus-proxy gdbus-proxy-threads gdbus-proxy-well-known-name gdbus-introspection gdbus-threading gdbus-export gdbus-error gdbus-peer gdbus-exit-on-close gdbus-non-socket gdbus-bz627724 appinfo contenttype file live-g-file desktop-app-info unix-fd unix-streams gapplication gdbus-test-codegen gdbus-serialization make[6]: *** [test-nonrecursive] Error 143 make[6]: Leaving directory `/var/tmp/portage/dev-libs/glib-2.30.2/work/glib-2.30.2/gio/tests' make[5]: *** [check-am] Error 2 make[5]: Leaving directory `/var/tmp/portage/dev-libs/glib-2.30.2/work/glib-2.30.2/gio/tests' make[4]: *** [check-recursive] Error 1 make[4]: Leaving directory `/var/tmp/portage/dev-libs/glib-2.30.2/work/glib-2.30.2/gio/tests' make[3]: *** [check] Error 2 make[3]: Leaving directory `/var/tmp/portage/dev-libs/glib-2.30.2/work/glib-2.30.2/gio/tests' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/dev-libs/glib-2.30.2/work/glib-2.30.2/gio' make[1]: *** [check] Error 2 make[1]: Leaving directory `/var/tmp/portage/dev-libs/glib-2.30.2/work/glib-2.30.2/gio' make: *** [check-recursive] Error 1 We think this tests should simply be skipped in that cases Thanks
The code in socket.c looks like g_test_add_func ("/socket/ipv6_async", test_ipv6_async); #if defined (IPPROTO_IPV6) && defined (IPV6_V6ONLY) g_test_add_func ("/socket/ipv6_v4mapped", test_ipv6_v4mapped); #endif That looks wrong.
(In reply to comment #1) > The code in socket.c looks like > > g_test_add_func ("/socket/ipv6_async", test_ipv6_async); > #if defined (IPPROTO_IPV6) && defined (IPV6_V6ONLY) > g_test_add_func ("/socket/ipv6_v4mapped", test_ipv6_v4mapped); > #endif > > That looks wrong. No, that just skips one particular test if a particular bit of functionality doesn't exist. (IIRC, Windows doesn't have that API.) I suppose I'd accept a patch that skipped the IPv6 tests if the kernel returned a "no IPv6 support" error code, if it didn't make the rest of the test too messy.
*** Bug 688059 has been marked as a duplicate of this bug. ***
Created attachment 267792 [details] [review] gio/tests/socket: skip IPv6 tests on IPv6-less machines does this work?
fixed in master and glib-2-40
*** Bug 726821 has been marked as a duplicate of this bug. ***
Looks like this is still broken wit 2.40.2: # random seed: R02S9106d2aee0cd16ca4b42e676af1a0ea9 # Start of gdbus tests ok 1 /gdbus/peer-to-peer PASS: gdbus-peer 1 /gdbus/peer-to-peer ** GLib-GIO:ERROR:/var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/gio/tests/gdbus-peer.c:1201:nonce_tcp_service_thread_func: assertion failed (error == NULL): Unable to create socket: Address family not supported by protocol (g-io-error-quark, 0) ok 2 /gdbus/delayed-message-processing PASS: gdbus-peer 2 /gdbus/delayed-message-processing Aborted # GLib-GIO:ERROR:/var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/gio/tests/gdbus-peer.c:1201:nonce_tcp_service_thread_func: assertion failed (error == NULL): Unable to create socket: Address family not supported by protocol (g-io-error-quark, 0) ERROR: gdbus-peer - missing test plan ERROR: gdbus-peer - exited with status 134 (terminated by signal 6?)
feel free to patch that test in the same way tests/socket.c was patched