GNOME Bugzilla – Bug 685643
Test suite is broken with IPv6 localhost
Last modified: 2012-11-30 14:43:35 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
but it should prefer the ipv4 address... Needs some investigating
(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.
it == the gupnp stack. Maybe it doesn't do that on all levels. That's why I said "needs checking" :)
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.
Misunderstood the bug, you're right. this has nothing to do with GUPnP.
Attachment 230277 [details] pushed as 69b9457 - Explicitly use IPv4 in test