Bug 67900 - assorted test failures
Summary: assorted test failures
Status: RESOLVED FIXED
Alias: None
Product: Wocky
Classification: Unclassified
Component: General (show other bugs)
Version: git master
Hardware: Other All
: high major
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2013-08-08 12:22 UTC by Simon McVittie
Modified: 2013-08-09 14:38 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
wocky-connector-test: stop putting sockets in blocking mode (1.58 KB, patch)
2013-08-08 16:55 UTC, Simon McVittie
Details | Splinter Review
wocky-xmpp-reader-test: don't assume non-characters will be replaced (3.42 KB, patch)
2013-08-08 16:56 UTC, Simon McVittie
Details | Splinter Review
wocky-dummy-xmpp-server: don't turn off non-blocking on the socket (1.44 KB, patch)
2013-08-08 16:57 UTC, Simon McVittie
Details | Splinter Review
Tests: don't assume that other things can sneak in ahead of cancellation (4.07 KB, patch)
2013-08-08 16:57 UTC, Simon McVittie
Details | Splinter Review
some tests: give better diagnostics on failure (16.08 KB, patch)
2013-08-08 17:10 UTC, Simon McVittie
Details | Splinter Review

Description Simon McVittie 2013-08-08 12:22:23 UTC
The Wocky connector test blocks indefinitely in __libc_recv() on a mixed Debian unstable/experimental system, using Debian's gnutls 2.12.23-5 and GLib 2.36.3-4.

archetype% WOCKY_DEBUG=all G_MESSAGES_DEBUG=all libtool --mode=execute gdb --args ./wocky-connector-test -p /connector/basic/noserv/nohost/noport
GNU gdb (GDB) 7.6 (Debian 7.6-5)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/smcv/build/wocky/debug/tests/wocky-connector-test...done.
(gdb) set pagination off
(gdb) run
Starting program: /home/smcv/build/wocky/debug/tests/wocky-connector-test -p /connector/basic/noserv/nohost/noport
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
/connector/basic/noserv/nohost/noport: [New Thread 0x7ffff3688700 (LWP 31168)]
[New Thread 0x7ffff2869700 (LWP 31169)]
[New Thread 0x7fffd9c54700 (LWP 31170)]
(/home/smcv/build/wocky/debug/tests/wocky-connector-test:31164): wocky-DEBUG: test_connector_server_new: /home/smcv/src/fdo/wocky/tests/wocky-test-connector-server.c:1569: test_connector_server_new
(/home/smcv/build/wocky/debug/tests/wocky-connector-test:31164): wocky-DEBUG: test_connector_server_new: /home/smcv/src/fdo/wocky/tests/wocky-test-connector-server.c:1583: connection: 0x6bda50
(/home/smcv/build/wocky/debug/tests/wocky-connector-test:31164): wocky-DEBUG: test_connector_server_start: /home/smcv/src/fdo/wocky/tests/wocky-test-connector-server.c:1671: test_connector_server_start
(/home/smcv/build/wocky/debug/tests/wocky-connector-test:31164): wocky-DEBUG: test_connector_server_start: /home/smcv/src/fdo/wocky/tests/wocky-test-connector-server.c:1675: connection: 0x6bda50
(/home/smcv/build/wocky/debug/tests/wocky-connector-test:31164): wocky-DEBUG: xmpp_init: /home/smcv/src/fdo/wocky/tests/wocky-test-connector-server.c:1427: test_connector_server:xmpp_init 0
(/home/smcv/build/wocky/debug/tests/wocky-connector-test:31164): wocky-DEBUG: xmpp_init: /home/smcv/src/fdo/wocky/tests/wocky-test-connector-server.c:1428: connection: 0x6bda50
(/home/smcv/build/wocky/debug/tests/wocky-connector-test:31164): wocky-DEBUG: xmpp_init: /home/smcv/src/fdo/wocky/tests/wocky-test-connector-server.c:1434: SERVER_STATE_START
(/home/smcv/build/wocky/debug/tests/wocky-connector-test:31164): wocky-DEBUG: server_enc_outstanding: /home/smcv/src/fdo/wocky/tests/wocky-test-connector-server.c:1599: Upped outstanding to 1
^C
Program received signal SIGINT, Interrupt.
0x00007ffff636d717 in __libc_recv (fd=15, buf=buf@entry=0x6bdac0, n=n@entry=1024, flags=-1, flags@entry=0) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:33
33	../sysdeps/unix/sysv/linux/x86_64/recv.c: No such file or directory.
(gdb) thread apply all bt

Thread 4 (Thread 0x7fffd9c54700 (LWP 31170)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007ffff681d5f5 in g_cond_wait_until (cond=cond@entry=0x6b2838, mutex=mutex@entry=0x6b2830, end_time=end_time@entry=303738186583) at /tmp/buildd/glib2.0-2.36.3/./glib/gthread-posix.c:865
#2  0x00007ffff67b4941 in g_async_queue_pop_intern_unlocked (queue=queue@entry=0x6b2830, wait=wait@entry=1, end_time=end_time@entry=303738186583) at /tmp/buildd/glib2.0-2.36.3/./glib/gasyncqueue.c:424
#3  0x00007ffff67b4ecb in g_async_queue_timeout_pop (queue=0x6b2830, timeout=timeout@entry=15000000) at /tmp/buildd/glib2.0-2.36.3/./glib/gasyncqueue.c:545
#4  0x00007ffff6802c66 in g_thread_pool_wait_for_new_pool () at /tmp/buildd/glib2.0-2.36.3/./glib/gthreadpool.c:169
#5  g_thread_pool_thread_proxy (data=<optimized out>) at /tmp/buildd/glib2.0-2.36.3/./glib/gthreadpool.c:366
#6  0x00007ffff68021d5 in g_thread_proxy (data=0x6b9400) at /tmp/buildd/glib2.0-2.36.3/./glib/gthread.c:798
#7  0x00007ffff6366e0e in start_thread (arg=0x7fffd9c54700) at pthread_create.c:311
#8  0x00007ffff609b93d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 3 (Thread 0x7ffff2869700 (LWP 31169)):
#0  0x00007ffff609019d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff67de194 in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7fffe40010c0, timeout=-1, context=0x6b88a0) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3995
#2  g_main_context_iterate (context=context@entry=0x6b88a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3696
#3  0x00007ffff67de29c in g_main_context_iteration (context=0x6b88a0, may_block=1) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3762
#4  0x00007ffff2870a1d in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#5  0x00007ffff68021d5 in g_thread_proxy (data=0x6b1370) at /tmp/buildd/glib2.0-2.36.3/./glib/gthread.c:798
#6  0x00007ffff6366e0e in start_thread (arg=0x7ffff2869700) at pthread_create.c:311
#7  0x00007ffff609b93d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7ffff3688700 (LWP 31168)):
#0  0x00007ffff609019d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff67de194 in g_main_context_poll (priority=2147483647, n_fds=3, fds=0x7fffec0010e0, timeout=-1, context=0x6a76d0) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3995
#2  g_main_context_iterate (context=0x6a76d0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3696
#3  0x00007ffff67de5fa in g_main_loop_run (loop=0x6a7660) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3895
#4  0x00007ffff6dabd06 in gdbus_shared_thread_func (user_data=0x6a76a0) at /tmp/buildd/glib2.0-2.36.3/./gio/gdbusprivate.c:278
#5  0x00007ffff68021d5 in g_thread_proxy (data=0x6a3720) at /tmp/buildd/glib2.0-2.36.3/./glib/gthread.c:798
#6  0x00007ffff6366e0e in start_thread (arg=0x7ffff3688700) at pthread_create.c:311
#7  0x00007ffff609b93d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7ffff7fc2800 (LWP 31164)):
#0  0x00007ffff636d717 in __libc_recv (fd=15, buf=buf@entry=0x6bdac0, n=n@entry=1024, flags=-1, flags@entry=0) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:33
#1  0x00007ffff6d52e8c in recv (__flags=0, __n=1024, __buf=0x6bdac0, __fd=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/socket2.h:44
#2  g_socket_receive_with_blocking (socket=0x6a22a0, buffer=0x6bdac0 "", size=1024, blocking=0, cancellable=0x0, error=0x7fffffffd4f8) at /tmp/buildd/glib2.0-2.36.3/./gio/gsocket.c:2489
#3  0x00007ffff6d3bad5 in read_async_pollable (stream=stream@entry=0x7fffe40029e0, task=task@entry=0x6b3550) at /tmp/buildd/glib2.0-2.36.3/./gio/ginputstream.c:1118
#4  0x00007ffff6d3bc4f in g_input_stream_real_read_async (stream=0x7fffe40029e0, buffer=0x6bdac0, count=1024, io_priority=0, cancellable=0x7fffec007720, callback=0x7ffff6d3d2e0 <async_ready_callback_wrapper>, user_data=0x6bda50) at /tmp/buildd/glib2.0-2.36.3/./gio/ginputstream.c:1167
#5  0x00007ffff6d3c83b in g_input_stream_read_async (stream=0x7fffe40029e0, buffer=buffer@entry=0x6bdac0, count=count@entry=1024, io_priority=io_priority@entry=0, cancellable=0x7fffec007720, callback=callback@entry=0x423f10 <_xmpp_connection_received_data>, user_data=user_data@entry=0x6bda50) at /tmp/buildd/glib2.0-2.36.3/./gio/ginputstream.c:631
#6  0x0000000000423488 in wocky_xmpp_connection_do_read (self=0x6bda50) at /home/smcv/src/fdo/wocky/wocky/wocky-xmpp-connection.c:478
#7  0x000000000040a21e in client_connected (channel=<optimized out>, cond=<optimized out>, data=0x663f68 <tests+392>) at /home/smcv/src/fdo/wocky/tests/wocky-connector-test.c:3311
#8  0x00007ffff67ddea6 in g_main_dispatch (context=0x687460) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3054
#9  g_main_context_dispatch (context=context@entry=0x687460) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3630
#10 0x00007ffff67de1f8 in g_main_context_iterate (context=0x687460, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3701
#11 0x00007ffff67de5fa in g_main_loop_run (loop=0x6877e0) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3895
#12 0x000000000040a7ef in run_test (data=0x663f20 <tests+320>) at /home/smcv/src/fdo/wocky/tests/wocky-connector-test.c:3568
#13 0x00007ffff68015a7 in test_case_run (tc=0x685860) at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1714
#14 g_test_run_suite_internal (suite=suite@entry=0x683580, path=<optimized out>, path@entry=0x7fffffffe355 "/noport") at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1767
#15 0x00007ffff6801726 in g_test_run_suite_internal (suite=suite@entry=0x683560, path=<optimized out>, path@entry=0x7fffffffe34e "/nohost/noport") at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1778
#16 0x00007ffff6801726 in g_test_run_suite_internal (suite=suite@entry=0x683540, path=<optimized out>, path@entry=0x7fffffffe347 "/noserv/nohost/noport") at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1778
#17 0x00007ffff6801726 in g_test_run_suite_internal (suite=suite@entry=0x683520, path=<optimized out>, path@entry=0x7fffffffe341 "/basic/noserv/nohost/noport") at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1778
#18 0x00007ffff6801726 in g_test_run_suite_internal (suite=suite@entry=0x683500, path=<optimized out>, path@entry=0x7fffffffe338 "connector/basic/noserv/nohost/noport") at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1778
#19 0x00007ffff6801a93 in g_test_run_suite (suite=0x683500) at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1823
#20 0x00007ffff6801ad5 in g_test_run () at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1324
#21 0x0000000000409c31 in main (argc=<optimized out>, argv=<optimized out>) at /home/smcv/src/fdo/wocky/tests/wocky-connector-test.c:3756
(gdb) bt full
#0  0x00007ffff636d717 in __libc_recv (fd=15, buf=buf@entry=0x6bdac0, n=n@entry=1024, flags=-1, flags@entry=0) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:33
        resultvar = 18446744073709551104
        oldtype = 0
        result = -512
#1  0x00007ffff6d52e8c in recv (__flags=0, __n=1024, __buf=0x6bdac0, __fd=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/socket2.h:44
No locals.
#2  g_socket_receive_with_blocking (socket=0x6a22a0, buffer=0x6bdac0 "", size=1024, blocking=0, cancellable=0x0, error=0x7fffffffd4f8) at /tmp/buildd/glib2.0-2.36.3/./gio/gsocket.c:2489
        __PRETTY_FUNCTION__ = "g_socket_receive_with_blocking"
#3  0x00007ffff6d3bad5 in read_async_pollable (stream=stream@entry=0x7fffe40029e0, task=task@entry=0x6b3550) at /tmp/buildd/glib2.0-2.36.3/./gio/ginputstream.c:1118
        op = 0x69d800
        error = 0x0
        nread = <optimized out>
#4  0x00007ffff6d3bc4f in g_input_stream_real_read_async (stream=0x7fffe40029e0, buffer=0x6bdac0, count=1024, io_priority=0, cancellable=0x7fffec007720, callback=0x7ffff6d3d2e0 <async_ready_callback_wrapper>, user_data=0x6bda50) at /tmp/buildd/glib2.0-2.36.3/./gio/ginputstream.c:1167
        task = 0x6b3550
        op = 0x69d800
#5  0x00007ffff6d3c83b in g_input_stream_read_async (stream=0x7fffe40029e0, buffer=buffer@entry=0x6bdac0, count=count@entry=1024, io_priority=io_priority@entry=0, cancellable=0x7fffec007720, callback=callback@entry=0x423f10 <_xmpp_connection_received_data>, user_data=user_data@entry=0x6bda50) at /tmp/buildd/glib2.0-2.36.3/./gio/ginputstream.c:631
        class = 0x6a5b30
        error = 0x0
        __PRETTY_FUNCTION__ = "g_input_stream_read_async"
#6  0x0000000000423488 in wocky_xmpp_connection_do_read (self=0x6bda50) at /home/smcv/src/fdo/wocky/wocky/wocky-xmpp-connection.c:478
        priv = 0x6bda70
        input = <optimized out>
#7  0x000000000040a21e in client_connected (channel=<optimized out>, cond=<optimized out>, data=0x663f68 <tests+392>) at /home/smcv/src/fdo/wocky/tests/wocky-connector-test.c:3311
        srv = 0x663f68 <tests+392>
        client = {sin_family = 2, sin_port = 63365, sin_addr = {s_addr = 16777343}, sin_zero = "\000\000\000\000\000\000\000"}
        clen = 16
        ssock = <optimized out>
        csock = <optimized out>
        gsock = <optimized out>
        cproblem = 0x663f84 <tests+420>
        flags = <optimized out>
        gconn = 0x7fffe4002980
#8  0x00007ffff67ddea6 in g_main_dispatch (context=0x687460) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3054
        dispatch = 0x7ffff681dc50 <g_io_unix_dispatch>
        was_in_call = 0
        user_data = 0x663f68 <tests+392>
        callback = 0x40a0f0 <client_connected>
        cb_funcs = 0x7ffff6a93940 <g_source_callback_funcs>
        cb_data = 0x691180
        need_destroy = <optimized out>
        current_source_link = {data = 0x691250, next = 0x0}
        source = 0x691250
        current = 0x691ab0
        i = 0
#9  g_main_context_dispatch (context=context@entry=0x687460) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3630
No locals.
#10 0x00007ffff67de1f8 in g_main_context_iterate (context=0x687460, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3701
        max_priority = 2147483647
        timeout = -1
        some_ready = 1
        nfds = <optimized out>
        allocated_nfds = 3
        fds = 0x69dfc0
#11 0x00007ffff67de5fa in g_main_loop_run (loop=0x6877e0) at /tmp/buildd/glib2.0-2.36.3/./glib/gmain.c:3895
        __PRETTY_FUNCTION__ = "g_main_loop_run"
#12 0x000000000040a7ef in run_test (data=0x663f20 <tests+320>) at /home/smcv/src/fdo/wocky/tests/wocky-connector-test.c:3568
        wcon = 0x6b2030
        handler = 0x686c40
        test = 0x663f20 <tests+320>
        dummy = {st_dev = 2500, st_ino = 6826448, st_nlink = 140737488345472, st_mode = 4135513976, st_uid = 32767, st_gid = 6826448, __pad0 = 0, st_rdev = 140737488345472, st_size = 4, st_blksize = 140737328902293, st_blocks = 140737331675968, st_atim = {tv_sec = 140737488345488, tv_nsec = 140737488345464}, st_mtim = {tv_sec = 140737328965781, tv_nsec = 5318377472}, st_ctim = {tv_sec = 140737488345496, tv_nsec = -7059753778464474767}, __unused = {5330327780877018406, 3487246478737815860, 140737321293312}}
        base = <optimized out>
        path = <optimized out>
        ca = 0x439ea0 "/home/smcv/src/fdo/wocky/tests/certs/ca-0-cert.pem"
        __PRETTY_FUNCTION__ = "run_test"
#13 0x00007ffff68015a7 in test_case_run (tc=0x685860) at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1714
        test_run_timer = 0x68b0b0
        largs = {<invalid float value>, 0, <invalid float value>}
        fixture = 0x663f20 <tests+320>
        old_name = 0x691060 "/connector/basic/noserv/nohost"
        old_base = 0x68edc0 "http://bugs.freedesktop.org/show_bug.cgi?id="
        success = 1
#14 g_test_run_suite_internal (suite=suite@entry=0x683580, path=<optimized out>, path@entry=0x7fffffffe355 "/noport") at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1767
        tc = 0x685860
        n = <optimized out>
        n_bad = 0
        l = 6
        rest = 0x0
        old_name = 0x689dc0 "/connector/basic/noserv"
        slist = 0x690260
        reversed = 0x690260
        __PRETTY_FUNCTION__ = "g_test_run_suite_internal"
#15 0x00007ffff6801726 in g_test_run_suite_internal (suite=suite@entry=0x683560, path=<optimized out>, path@entry=0x7fffffffe34e "/nohost/noport") at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1778
        ts = 0x683580
        n = <optimized out>
        n_bad = 0
        l = 6
        rest = 0x7fffffffe355 "/noport"
        old_name = 0x6876b0 "/connector/basic"
        slist = 0x68f190
        reversed = 0x68f190
        __PRETTY_FUNCTION__ = "g_test_run_suite_internal"
#16 0x00007ffff6801726 in g_test_run_suite_internal (suite=suite@entry=0x683540, path=<optimized out>, path@entry=0x7fffffffe347 "/noserv/nohost/noport") at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1778
        ts = 0x683560
        n = <optimized out>
        n_bad = 0
        l = 6
        rest = 0x7fffffffe34e "/nohost/noport"
        old_name = 0x68f450 "/connector"
        slist = 0x68f160
        reversed = 0x68f160
        __PRETTY_FUNCTION__ = "g_test_run_suite_internal"
#17 0x00007ffff6801726 in g_test_run_suite_internal (suite=suite@entry=0x683520, path=<optimized out>, path@entry=0x7fffffffe341 "/basic/noserv/nohost/noport") at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1778
        ts = 0x683540
        n = <optimized out>
        n_bad = 0
        l = 5
        rest = 0x7fffffffe347 "/noserv/nohost/noport"
        old_name = 0x68f7a0 ""
        slist = 0x690110
        reversed = 0x690110
        __PRETTY_FUNCTION__ = "g_test_run_suite_internal"
#18 0x00007ffff6801726 in g_test_run_suite_internal (suite=suite@entry=0x683500, path=<optimized out>, path@entry=0x7fffffffe338 "connector/basic/noserv/nohost/noport") at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1778
        ts = 0x683520
        n = <optimized out>
        n_bad = 0
        l = 9
        rest = 0x7fffffffe341 "/basic/noserv/nohost/noport"
        old_name = 0x7ffff6850abe ""
        slist = 0x690370
        reversed = 0x690370
        __PRETTY_FUNCTION__ = "g_test_run_suite_internal"
#19 0x00007ffff6801a93 in g_test_run_suite (suite=0x683500) at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1823
        rest = <optimized out>
        path = 0x7fffffffe338 "connector/basic/noserv/nohost/noport"
        l = <optimized out>
        n = 0
        n_bad = 0
        __PRETTY_FUNCTION__ = "g_test_run_suite"
#20 0x00007ffff6801ad5 in g_test_run () at /tmp/buildd/glib2.0-2.36.3/./glib/gtestutils.c:1324
No locals.
#21 0x0000000000409c31 in main (argc=<optimized out>, argv=<optimized out>) at /home/smcv/src/fdo/wocky/tests/wocky-connector-test.c:3756
        i = <optimized out>
        base = 0x687700 ""
        path = <optimized out>
        dummy = {st_dev = 0, st_ino = 206158430210, st_nlink = 472446402651, st_mode = 119, st_uid = 124, st_gid = 32, __pad0 = 0, st_rdev = 140737324095040, st_size = 8, st_blksize = 140737488347016, st_blocks = 140737488347048, st_atim = {tv_sec = 140737334096360, tv_nsec = 0}, st_mtim = {tv_sec = 140737320784019, tv_nsec = 1}, st_ctim = {tv_sec = 4430109, tv_nsec = 140737334096360}, __unused = {0, 4430016, 4234355}}
        result = <optimized out>
        __PRETTY_FUNCTION__ = "main"
Comment 1 Simon McVittie 2013-08-08 16:55:42 UTC
Created attachment 83848 [details] [review]
wocky-connector-test: stop putting sockets in blocking  mode

GSocket configures its underlying fd to be in non-blocking mode, and
implements blocking calls by select()ing (or equivalent) first.
If we break this assumption, most test cases in wocky-connector-test
hang in a recv() that should have been non-blocking.
Comment 2 Simon McVittie 2013-08-08 16:56:53 UTC
Created attachment 83849 [details] [review]
wocky-xmpp-reader-test: don't assume non-characters will  be replaced

GLib now follows Unicode Corrigendum 9, which clarifies that
libraries shouldn't prohibit non-characters. We were assuming it did.

---

See also Bug #63072, https://bugzilla.gnome.org/show_bug.cgi?id=694669 and Bug #63069.
Comment 3 Simon McVittie 2013-08-08 16:57:11 UTC
Created attachment 83850 [details] [review]
wocky-dummy-xmpp-server: don't turn off non-blocking on  the socket

The very next thing we did with it was to give it to GSocketConnection,
which would turn on non-blocking again; so this code wasn't doing
anything except harming our portability.
Comment 4 Simon McVittie 2013-08-08 16:57:43 UTC
Created attachment 83851 [details] [review]
Tests: don't assume that other things can sneak in ahead  of cancellation

The porter test asserted that if you cancelled the sending of a stanza
after it had already been (sent and) received, the send reported
success, not cancellation; and the SASL auth test asserted that if
you closed a connection at around the same time that a cancellable
had been cancelled, the close reported success, not cancellation.

However, recent GLib seems to be either more careful about deferring the
results of async operations to an idle, or more consistent about
reporting the cancellation as an error even if the operation's
success had already been recorded. As a result, these operations
reported cancellation. To avoid that, delay the cancellation a little.
Comment 5 Vivek Dasmohapatra 2013-08-08 17:07:01 UTC
Comment on attachment 83848 [details] [review]
wocky-connector-test: stop putting sockets in blocking  mode

Review of attachment 83848 [details] [review]:
-----------------------------------------------------------------

+1
Comment 6 Vivek Dasmohapatra 2013-08-08 17:09:05 UTC
Comment on attachment 83850 [details] [review]
wocky-dummy-xmpp-server: don't turn off non-blocking on  the socket

Review of attachment 83850 [details] [review]:
-----------------------------------------------------------------

+1
Comment 7 Vivek Dasmohapatra 2013-08-08 17:10:09 UTC
Comment on attachment 83851 [details] [review]
Tests: don't assume that other things can sneak in ahead  of cancellation

Review of attachment 83851 [details] [review]:
-----------------------------------------------------------------

+1
Comment 8 Simon McVittie 2013-08-08 17:10:22 UTC
Created attachment 83855 [details] [review]
some tests: give better diagnostics on failure

---

I'd like to land the four patches above in the new gabble-0.18 branch and release them with Gabble 0.18, because it seems undesirable to be (effectively) stable-branching Wocky if it can't pass its own tests.

This one should only go to Wocky master (after the branch point) though.
Comment 9 Vivek Dasmohapatra 2013-08-08 17:11:57 UTC
Comment on attachment 83849 [details] [review]
wocky-xmpp-reader-test: don't assume non-characters will  be replaced

Review of attachment 83849 [details] [review]:
-----------------------------------------------------------------

+1
Comment 10 Vivek Dasmohapatra 2013-08-08 17:22:40 UTC
Comment on attachment 83855 [details] [review]
some tests: give better diagnostics on failure

Review of attachment 83855 [details] [review]:
-----------------------------------------------------------------

+1
Comment 11 Simon McVittie 2013-08-09 14:38:55 UTC
Fixed in git for telepathy-gabble 0.18.0, thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.