xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Opened 3 years ago

Closed 3 years ago

Last modified 5 months ago

#1963 closed defect (fixed)

TestX11Keyboard failure with GTK3

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: blocker Milestone: 2.4
Component: tests Version: 2.3.x
Keywords: Cc:

Description

Occurs when running the unit tests without a DISPLAY:

$ DISPLAY= ./run3
(..)
running unit.x11.keyboard_test

Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
E
======================================================================
ERROR: test_unicode (__main__.TestX11Keyboard)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/antoine/projects/Xpra/trunk/src/unittests/unit/x11/keyboard_test.py", line 21, in test_unicode
    keyboard_bindings = X11KeyboardBindings()
  File "xpra/x11/bindings/keyboard_bindings.pyx", line 253, in xpra.x11.bindings.keyboard_bindings.X11KeyboardBindings
  File "xpra/x11/bindings/core_bindings.pyx", line 83, in xpra.x11.bindings.core_bindings._X11CoreBindings.__cinit__
  File "/home/antoine/projects/Xpra/trunk/src/install/python3/lib64/python/xpra/os_util.py", line 272, in is_X11
    x11 = is_X11_Display()
  File "xpra/x11/gtk3/gdk_bindings.pyx", line 54, in xpra.x11.gtk3.gdk_bindings.is_X11_Display
  File "xpra/gtk_common/gtk3/gdk_bindings.pyx", line 64, in xpra.gtk_common.gtk3.gdk_bindings.get_raw_display_for
  File "xpra/gtk_common/gtk3/gdk_bindings.pyx", line 50, in xpra.gtk_common.gtk3.gdk_bindings.get_display_for
TypeError: Cannot get a display: instance is None!

Strangely enough, running the test directly works:

$ XPRA_ALL_DEBUG=1 DISPLAY= PYTHONPATH=. ./unit/x11/keyboard_test.py 
2018-09-18 22:19:38,370 socket_details(0, None, None) sockdir=/tmp, sockdirs=['/tmp'], testing=['/tmp']
2018-09-18 22:19:38,372 stdout: /tmp/xpra-stdout-WVcbKp for 'python2' '/usr/bin/xpra' '--speaker=no' '--microphone=no' '--systemd-run=no' '--pulseaudio=no' '--socket-dirs=/tmp' 'list'
2018-09-18 22:19:38,373 stderr: /tmp/xpra-stderr-en3NBc for 'python2' '/usr/bin/xpra' '--speaker=no' '--microphone=no' '--systemd-run=no' '--pulseaudio=no' '--socket-dirs=/tmp' 'list'
2018-09-18 22:19:38,775 socket_details(0, None, None) sockdir=/tmp, sockdirs=['/tmp'], testing=['/tmp']
2018-09-18 22:19:38,781 stdout=/tmp/Xorg-stdout-Kxps3m for ['/usr/libexec/Xorg', '-noreset', '-novtswitch', '-nolisten', 'tcp', '+extension', 'GLX', '+extension', 'RANDR', '+extension', 'RENDER', '-auth', '$XAUTHORITY', '-logfile', '${XPRA_LOG_DIR}/Xorg.${DISPLAY}.log', '-configdir', '/run/user/1000/xpra/xorg.conf.d/8993', '-config', '/etc/xpra/xorg.conf', ':100']
2018-09-18 22:19:38,781 stderr=/tmp/Xorg-stderr-KNw30h for ['/usr/libexec/Xorg', '-noreset', '-novtswitch', '-nolisten', 'tcp', '+extension', 'GLX', '+extension', 'RANDR', '+extension', 'RENDER', '-auth', '$XAUTHORITY', '-logfile', '${XPRA_LOG_DIR}/Xorg.${DISPLAY}.log', '-configdir', '/run/user/1000/xpra/xorg.conf.d/8993', '-config', '/etc/xpra/xorg.conf', ':100']
2018-09-18 22:19:39,784 xvfb('/usr/libexec/Xorg' '-noreset' '-novtswitch' '-nolisten' 'tcp' '+extension' 'GLX' '+extension' 'RANDR' '+extension' 'RENDER' '-auth' '$XAUTHORITY' '-logfile' '/tmp/Xorg.:100.log' '-configdir' '/run/user/1000/xpra/xorg.conf.d/8993' '-config' '/etc/xpra/xorg.conf' ':100')=<subprocess.Popen object at 0x7f5f82bb6710>
.2018-09-18 22:19:47,813 socket_details(0, None, None) sockdir=/tmp, sockdirs=['/tmp'], testing=['/tmp']

Change History (2)

comment:1 Changed 3 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

r20466 fixes this particular problem.

Lots of other test related changes and fixes (XAUTHORITY, etc): r20459, r20460, r20465, r20466, r20467, r20468, r20469, r20471, #1965..

Version 0, edited 3 years ago by Antoine Martin (next)

comment:2 Changed 5 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1963

Note: See TracTickets for help on using tickets.