Tests were re-enabled in r23918 because the tests pass when run from the command line, even from a clean user account logged in via su. But they still fail during rpmbuild:
running unit.server.server_sockets_test ..F.. ====================================================================== FAIL: test_ssl (__main__.ServerSocketsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/rpmbuild/BUILD/xpra-3.0-python3/unittests/unit/server/server_sockets_test.py", line 139, in test_ssl test_connect("ssl://127.0.0.1:%i/" % ssl_port, EXIT_OK, noverify) File "/home/antoine/rpmbuild/BUILD/xpra-3.0-python3/unittests/unit/server/server_sockets_test.py", line 136, in test_connect assert r==exit_code, "expected info client to return %s but got %s" % (exit_code, client.poll()) AssertionError: expected info client to return 0 but got None
From the command line:
running all the tests in ['/home/guest/trunk/src/unittests/unit/server/server_sockets_test.py'] running unit.server.server_sockets_test ..... ---------------------------------------------------------------------- Ran 5 tests in 65.168s OK
xpra initialization error: failed to setup tcp socket on 0.0.0.0:49355 [Errno 98] Address already in use
A stray server from the previous failed test?
====================================================================== FAIL: test_to_server (__main__.X11ClipboardTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/rpmbuild/BUILD/xpra-3.0-python3/unittests/unit/client/x11_clipboard_test.py", line 27, in test_to_server self.do_test_copy("to-server") File "/home/antoine/rpmbuild/BUILD/xpra-3.0-python3/unittests/unit/client/x11_clipboard_test_util.py", line 83, in do_test_copy self.do_test_copy_selection(selection, direction) File "/home/antoine/rpmbuild/BUILD/xpra-3.0-python3/unittests/unit/client/x11_clipboard_test_util.py", line 69, in do_test_copy_selection self.copy_and_verify(client_display, server_display, direction in ("both", "to-server"), selection=selection) File "/home/antoine/rpmbuild/BUILD/xpra-3.0-python3/unittests/unit/client/x11_clipboard_test_util.py", line 43, in copy_and_verify assert new_value==value, "clipboard contents do not match, expected '%s' but got '%s'" % (value, new_value) AssertionError: clipboard contents do not match, expected '6d40a0ce2284457c8d0eb23e504483d9' but got '00bd4f66e351473794ce8bd304a0157b'
removing the python2 tests "fixes" things, so something must be left over from those tests. Just to get moving again, r24039 removes those tests again.
Another issue seems to be some spinning xpra_signal_listener
processes left behind.
Doesn't occur with v4.0, odd.
From the mailing list: Xpra 3 Test Failures - I have seen the same thing before:
..FE. 2259 ====================================================================== 2260 ERROR: test_tcp_socket (__main__.ServerSocketsTest) 2261 ---------------------------------------------------------------------- 2262 Traceback (most recent call last): 2263 File "/rpmbuild.xpra3-rhel7.7/BUILD/xpra-3.0.5-python2/unittests/unit/server/server_sockets_test.py", line 71, in test_tcp_socket 2264 self._test_connect(["--bind-tcp=0.0.0.0:%i" % port], "allow", [], b"hello", "ws://127.0.0.1:%i/" % port, EXIT_OK) 2265 File " /rpmbuild.xpra3-rhel7.7/BUILD/xpra-3.0.5-python2/unittests/unit/server/server_sockets_test.py", line 47, in _test_connect 2266 raise Exception("version client failed to connect, returned %s" % estr(r)) 2267 Exception: version client failed to connect, returned 1 : CONNECTION_LOST 2268 2269 ====================================================================== 2270 FAIL: test_ssl (__main__.ServerSocketsTest) 2271 ---------------------------------------------------------------------- 2272 Traceback (most recent call last): 2273 File "/rpmbuild.xpra3-rhel7.7/BUILD/xpra-3.0.5-python2/unittests/unit/server/server_sockets_test.py", line 143, in test_ssl 2274 test_connect("wss://127.0.0.1:%i/" % tcp_port, EXIT_OK, noverify) 2275 File "/rpmbuild.xpra3-rhel7.7/BUILD/xpra-3.0.5-python2/unittests/unit/server/server_sockets_test.py", line 136, in test_connect 2276 assert r==exit_code, "expected info client to return %s but got %s" % (exit_code, client.poll()) 2277 AssertionError: expected info client to return 0 but got None 2278
r25105 fixes this failure which was caused by r24730:
====================================================================== ERROR: test_audio (__main__.AudioMixinTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/projects/Xpra/tags/v3.0.x/src/unittests/unit/server/mixins/audio_test.py", line 32, in test_audio }, AudioMixin) File "/home/antoine/projects/Xpra/tags/v3.0.x/src/unittests/unit/server/mixins/servermixintest_util.py", line 88, in _test_mixin_class x.init(opts) File "/home/antoine/projects/Xpra/tags/v3.0.x/src/dist/python3/lib64/python/xpra/server/mixins/audio_server.py", line 57, in init self.av_sync = opts.av_sync AttributeError: 'AdHocStruct' object has no attribute 'av_sync'
Server sockets test fixes:
Backports to v3: r25252.
One test is still failing (similar to comment:3), but only on the buildbot (in a container), despite tweaks to try to prevent timeouts (r25280 + r25282 + r25283):
running unit.server.server_sockets_test ..FE. ====================================================================== ERROR: test_tcp_socket (__main__.ServerSocketsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/src/rpmbuild/BUILD/xpra-4.0/unittests/unit/server/server_sockets_test.py", line 78, in test_tcp_socket self._test_connect(["--bind-tcp=0.0.0.0:%i" % port], "allow", [], b"hello", "ws://127.0.0.1:%i/" % port, EXIT_OK) File "/usr/src/rpmbuild/BUILD/xpra-4.0/unittests/unit/server/server_sockets_test.py", line 52, in _test_connect raise Exception("version client failed to connect, returned %s" % estr(r)) Exception: version client failed to connect, returned 18 : CONNECTION_FAILED ====================================================================== FAIL: test_ssl (__main__.ServerSocketsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/src/rpmbuild/BUILD/xpra-4.0/unittests/unit/server/server_sockets_test.py", line 150, in test_ssl test_connect("wss://127.0.0.1:%i/" % tcp_port, EXIT_OK, noverify) File "/usr/src/rpmbuild/BUILD/xpra-4.0/unittests/unit/server/server_sockets_test.py", line 143, in test_connect assert r==exit_code, "expected info client to return %s but got %s" % (estr(exit_code), estr(client.poll())) AssertionError: expected info client to return 0 : OK but got 18 : CONNECTION_FAILED ---------------------------------------------------------------------- Ran 5 tests in 240.639s
What's interesting is that in both cases, it's failing to connect using websockets connection: plain ws for the first test, wss for the second.
Running the same container on a different host and the test succeeds when ran directly.
Could this be related to #2587?
New one:
running unit.server.proxy_server_test F Warning: running as root server socket for display :100 is in UNKNOWN state waiting up to 20 seconds do_setup_connection() display_desc={'display_name': ':100', 'type': 'unix-domain', 'local': True, 'display': ':100', 'socket_dirs': ['/tmp']} Traceback (most recent call last): File "/root/rpmbuild/BUILDROOT/xpra-4.0-0.fc32.x86_64/usr/lib64/python3.8/site-packages/xpra/scripts/main.py", line 1459, in do_setup_connection conn = connect_or_fail(display_desc, opts) File "/root/rpmbuild/BUILDROOT/xpra-4.0-0.fc32.x86_64/usr/lib64/python3.8/site-packages/xpra/scripts/main.py", line 1126, in connect_or_fail return connect_to(display_desc, opts) File "/root/rpmbuild/BUILDROOT/xpra-4.0-0.fc32.x86_64/usr/lib64/python3.8/site-packages/xpra/scripts/main.py", line 1225, in connect_to sockpath = get_sockpath(display_desc, sockpathfail_cb) File "/root/rpmbuild/BUILDROOT/xpra-4.0-0.fc32.x86_64/usr/lib64/python3.8/site-packages/xpra/scripts/main.py", line 1412, in get_sockpath sockpath = single_display_match(dir_servers, error_cb, File "/root/rpmbuild/BUILDROOT/xpra-4.0-0.fc32.x86_64/usr/lib64/python3.8/site-packages/xpra/scripts/main.py", line 1103, in single_display_match error_cb(nomatch) File "/root/rpmbuild/BUILDROOT/xpra-4.0-0.fc32.x86_64/usr/lib64/python3.8/site-packages/xpra/scripts/main.py", line 1224, in sockpathfail_cb raise InitException(msg) xpra.scripts.config.InitException: cannot find live server for display :100 Error: failed to connect: cannot find live server for display :100 ====================================================================== FAIL: test_proxy_start_stop (__main__.ProxyServerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/rpmbuild/BUILD/xpra-4.0/unittests/unit/server/proxy_server_test.py", line 20, in test_proxy_start_stop assert pollwait(proxy, 5) is None, "proxy failed to start with cmd=%s" % cmdstr AssertionError: proxy failed to start with cmd='proxy' ':100' '--no-daemon'
r25799 fixes the last? error:
Traceback (most recent call last): File "/home/antoine/rpmbuild/BUILD/xpra-4.0/unittests/unit/version_util_test.py", line 41, in test_get_platform_info self.assertTrue(x in get_platform_info(), "%s not found in platform info" % x) File "/home/antoine/rpmbuild/BUILDROOT/xpra-4.0-0.fc31.x86_64/usr/lib64/python3.7/site-packages/xpra/version_util.py", line 176, in get_platform_info platform_info_cache = do_get_platform_info() File "/home/antoine/rpmbuild/BUILDROOT/xpra-4.0-0.fc31.x86_64/usr/lib64/python3.7/site-packages/xpra/version_util.py", line 156, in do_get_platform_info release = platform_release(pp.release()) AttributeError: module 'platform' has no attribute 'release'
But the tests are still not enabled by default on the buildbot as they take far too long.
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2432