After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 667468 - glib-2.30.2: ipv6 tests fail when no ipv6 support is available
glib-2.30.2: ipv6 tests fail when no ipv6 support is available
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 688059 726821 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-01-07 15:03 UTC by Pacho Ramos
Modified: 2015-02-21 18:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gio/tests/socket: skip IPv6 tests on IPv6-less machines (1.95 KB, patch)
2014-02-01 17:14 UTC, Dan Winship
none Details | Review

Description Pacho Ramos 2012-01-07 15:03:13 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
Comment 1 Matt Turner 2012-09-26 21:16:12 UTC
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.
Comment 2 Dan Winship 2012-09-28 15:31:14 UTC
(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.
Comment 3 Dan Winship 2012-11-11 15:09:55 UTC
*** Bug 688059 has been marked as a duplicate of this bug. ***
Comment 4 Dan Winship 2014-02-01 17:14:12 UTC
Created attachment 267792 [details] [review]
gio/tests/socket: skip IPv6 tests on IPv6-less machines

does this work?
Comment 5 Dan Winship 2014-03-21 13:51:04 UTC
fixed in master and glib-2-40
Comment 6 Dan Winship 2014-03-21 18:04:51 UTC
*** Bug 726821 has been marked as a duplicate of this bug. ***
Comment 7 Pacho Ramos 2015-02-21 14:03:13 UTC
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?)
Comment 8 Dan Winship 2015-02-21 18:02:35 UTC
feel free to patch that test in the same way tests/socket.c was patched