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 685643 - Test suite is broken with IPv6 localhost
Test suite is broken with IPv6 localhost
Status: RESOLVED FIXED
Product: GUPnP
Classification: Other
Component: gupnp
0.18.x
Other Linux
: Normal normal
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-07 09:16 UTC by Hans de Graaff
Modified: 2012-11-30 14:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Explicitly use IPv4 in test (1012 bytes, patch)
2012-11-30 13:54 UTC, Jens Georg
committed Details | Review

Description Hans de Graaff 2012-10-07 09:16:34 UTC
My localhost resolved to ::1 first, and only 127.0.0.1 second. This breaks the test suite:

make  check-TESTS
make[3]: Entering directory `/var/tmp/portage/net-libs/gupnp-0.18.4/work/gupnp-0.18.4/tests/gtest'
/context/http/ranged-requests: **
ERROR:test-context.c:90:request_range_and_compare: assertion failed (message->status_code == SOUP_STATUS_PARTIAL_CONTENT): (4 == 206)
/bin/sh: line 5: 30515 Aborted                 (core dumped) G_SLICE=debug-blocks LD_LIBRARY_PATH=../../libgupnp/.libs ${dir}$tst
FAIL: test-context

According to bug 654137 gupnp doesn't handle IPv6, so it's probably best to be explicit about that and request the loopback instead. This fixes the test suite:

  sed -i -e 's/localhost/127.0.0.1/' tests/gtest/test-context.c || die
Comment 1 Jens Georg 2012-10-15 21:03:51 UTC
but it should prefer the ipv4 address... Needs some investigating
Comment 2 Hans de Graaff 2012-10-16 08:33:58 UTC
(In reply to comment #1)
> but it should prefer the ipv4 address... Needs some investigating

What is "it" that you are referring to here? If it is my system, then that assumption is false. IPv6 localhost is preferred since it is listed first my /etc/hosts file.

If "it" is the gupnp software, then I'm not sure how that is accomplished since it looks like a generic URL is created and I don't think that can be preferenced to IPv4. I haven't looked at the gupnp code in detail so I might be missing something here.
Comment 3 Jens Georg 2012-10-16 08:46:28 UTC
it == the gupnp stack. Maybe it doesn't do that on all levels. That's why I said "needs checking" :)
Comment 4 Jens Georg 2012-11-30 13:54:22 UTC
Created attachment 230277 [details] [review]
Explicitly use IPv4 in test

Otherwise it seems to break where localhost resolves to ::1 since we don't
handle IPv6 properly.
Comment 5 Jens Georg 2012-11-30 13:55:07 UTC
Misunderstood the bug, you're right. this has nothing to do with GUPnP.
Comment 6 Jens Georg 2012-11-30 14:43:32 UTC
Attachment 230277 [details] pushed as 69b9457 - Explicitly use IPv4 in test