[autotests] Fix remaining autotests with failing border calculation
ClosedPublic

Authored by romangg on Jun 11 2019, 1:29 PM.

Details

Summary

As in 2c088894b fix remaining autotests failing since no borders has become
the new default behavior of Breeze.

Autotests should not rely on this default behavior of Breeze though, but be
run with a faked deco such that changes on Breeze does not directly change
the autotests behavior. That's a goal for the future.

Test Plan

100% tests passed, 0 tests failed out of 147

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Jun 11 2019, 1:29 PM
Restricted Application added a project: KWin. · View Herald TranscriptJun 11 2019, 1:29 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Jun 11 2019, 1:29 PM
zzag added a subscriber: zzag.Jun 11 2019, 2:15 PM
zzag added inline comments.
autotests/integration/dont_crash_glxgears.cpp
78–79

Can't we just update the config?

romangg added inline comments.Jun 11 2019, 2:18 PM
autotests/integration/dont_crash_glxgears.cpp
78–79

What config?

zzag added inline comments.Jun 11 2019, 3:43 PM
autotests/integration/dont_crash_glxgears.cpp
78–79

Heh, I was talking about writing BorderSize and BorderSizeAuto option to kwinrc.

romangg added inline comments.Jun 27 2019, 10:12 AM
autotests/integration/dont_crash_glxgears.cpp
78–79

In the future we want to test both possibilities and likely other decoration feature permutations. That's why I think we need a static target deco which we can change up according to test. Besides border size there could be other Breeze default settings affecting our tests in unwanted ways now or in the future.

zzag added a comment.Jun 27 2019, 10:30 AM

DontCrashGlxgearsTest fails on my machine

[vlad@lithium kwin]$ rm -rf ~/.qttest/
[vlad@lithium kwin]$ dbus-run-session bin/testDontCrashGlxgears 
QFile::remove: Empty or null file name
********* Start testing of KWin::DontCrashGlxgearsTest *********
Config: Using QtTest library 5.13.0, Qt 5.13.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 8.3.0)
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
glamor: No eglstream capable devices found
glamor: 'wl_drm' not supported
Missing Wayland requirements for glamor GBM backend
Missing Wayland requirements for glamor EGLStream backend
Failed to initialize glamor, falling back to sw
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported high keycode 372 for name <I372> ignored
>                   X11 cannot support keycodes above 255.
>                   This warning only shows for the first high keycode.
> Internal error:   Could not resolve keysym XF86MonBrightnessCycle
> Internal error:   Could not resolve keysym XF86RotationLockToggle
Errors from xkbcomp are not fatal to the X server
X-Server started on display :1
PASS   : KWin::DontCrashGlxgearsTest::initTestCase()
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 569, clipping.
>                   X11 cannot support keycodes above 255.
> Warning:          Unsupported high keycode 372 for name <I372> ignored
>                   X11 cannot support keycodes above 255.
>                   This warning only shows for the first high keycode.
> Internal error:   Could not resolve keysym XF86MonBrightnessCycle
> Internal error:   Could not resolve keysym XF86RotationLockToggle
Errors from xkbcomp are not fatal to the X server
QWARN  : KWin::DontCrashGlxgearsTest::testGlxgears() Module 'org.kde.kwin.decoration' does not contain a module identifier directive - it cannot be protected from external registrations.
QWARN  : KWin::DontCrashGlxgearsTest::testGlxgears() QQmlComponent: Component is not ready
QWARN  : KWin::DontCrashGlxgearsTest::testGlxgears() org.kde.kwindowsystem.keyserver.x11: X11 implementation of KKeyServer accessed from non-X11 platform! This is an application bug.
FAIL!  : KWin::DontCrashGlxgearsTest::testGlxgears() 'mousePressevent.isAccepted()' returned FALSE. ()
   Loc: [/home/vlad/Workspace/KDE/src/kde/workspace/kwin/autotests/integration/dont_crash_glxgears.cpp(86)]
QWARN  : KWin::DontCrashGlxgearsTest::testGlxgears() QProcess: Destroyed while process ("glxgears") is still running.
PASS   : KWin::DontCrashGlxgearsTest::cleanupTestCase()
Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 364ms
********* Finished testing of KWin::DontCrashGlxgearsTest *********
QSocketNotifier: Invalid socket 19 with type Read, disabling...
autotests/integration/maximize_test.cpp
145

There is a typo in the word "change."

I wonder why the linter is silent.

In D21746#487160, @zzag wrote:

DontCrashGlxgearsTest fails on my machine

Fails for me on master, fixed for me with this patch.

zzag added a comment.Jun 27 2019, 11:22 AM

Roman, does the Aurorae engine load fine on your computer?

zzag added a comment.EditedJun 27 2019, 11:23 AM

QWARN : KWin::DontCrashGlxgearsTest::testGlxgears() QQmlComponent: Component is not ready

This warning most likely comes from Aurorae.

My output is:

roman@workstation ~/dev/kde/build/kde/workspace/kwin % rm -rf ~/.qttest 
roman@workstation ~/dev/kde/build/kde/workspace/kwin % dbus-run-session bin/testDontCrashGlxgears
QFile::remove: Empty or null file name
********* Start testing of KWin::DontCrashGlxgearsTest *********
Config: Using QtTest library 5.12.3, Qt 5.12.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 7.4.0)
QWARN  : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5122:46: this compose sequence is a duplicate of another; skipping line

QWARN  : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5124:48: this compose sequence is a duplicate of another; skipping line

QWARN  : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5126:48: this compose sequence is a duplicate of another; skipping line

QWARN  : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5130:47: this compose sequence is a duplicate of another; skipping line

QWARN  : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5132:46: this compose sequence is a duplicate of another; skipping line

QWARN  : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5140:48: this compose sequence is a duplicate of another; skipping line

QWARN  : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5144:46: this compose sequence is a duplicate of another; skipping line

QWARN  : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5146:46: this compose sequence is a duplicate of another; skipping line

QWARN  : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5150:45: this compose sequence is a duplicate of another; skipping line

QWARN  : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5153:46: this compose sequence is a duplicate of another; skipping line

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: created compose table from locale en_US.UTF-8 with path /usr/share/X11/locale/en_US.UTF-8/Compose

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_core: KGlobalAcceld inited
QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_core: Compositing forced to QPainter mode by environment variable
QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_core: Instantiated compositing plugin: "SceneQPainter"
QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_core: Session path: "/org/freedesktop/login1/session/_33"
QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_core: "logind"  seat: "seat0" / "/org/freedesktop/login1/seat/seat0"
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
glamor: 'wl_drm' not supported
Missing Wayland requirements for glamor GBM backend
Failed to initialize glamor, falling back to sw
X-Server started on display :2
QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_core: Compositing forced to QPainter mode by environment variable
QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_decorations: Trying to load decoration plugin:  "/usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kdecoration2/breezedecoration.so"
QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_core: Extensions: shape: 0x "11"  composite: 0x "4"  render: 0x "b"  fixes: 0x "50"  randr: 0x "14"  sync: 0x "31"  damage: 0x  "11"
QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() org.kde.kwindowsystem: Loaded plugin "/home/roman/dev/kde/build/kde/workspace/kwin/bin/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemKWinPrivatePlugin.so" for platform "wayland-org.kde.kwin.qpa"
QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: Compiling from RMLVO: rules 'evdev', model 'pc104', layout 'us', variant '(null)', options ''

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: Compiling from KcCGST: keycodes 'evdev+aliases(qwerty)', types 'complete', compat 'complete', symbols 'pc+us+inet(evdev)'

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: Compiling xkb_keycodes "(unnamed)"

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: Compiling xkb_types "(unnamed)"

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: Compiling xkb_compatibility "(unnamed)"

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: The "group" statement in compat is unsupported; Ignored

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: The "group" statement in compat is unsupported; Ignored

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: The "group" statement in compat is unsupported; Ignored

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: The "indicatorDrivesKeyboard" field in indicator statements is unsupported; Ignored

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: Indicator name "Shift Lock" was not declared in the keycodes section; Adding new indicator

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: Indicator name "Group 2" was not declared in the keycodes section; Adding new indicator

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: Indicator name "Mouse Keys" was not declared in the keycodes section; Adding new indicator

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_xkbcommon: XKB: Compiling xkb_symbols "(unnamed)"

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_core: Vertical Refresh rate  60 Hz ( "primary screen" )
PASS   : KWin::DontCrashGlxgearsTest::initTestCase()
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Effect is not supported:  "blur"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Effect is not supported:  "colorpicker"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Effect is not supported:  "contrast"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Effect is not supported:  "kwin4_effect_translucency"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Successfully loaded built-in effect:  "desktopgrid"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Effect is not supported:  "kwin4_effect_login"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Successfully loaded built-in effect:  "highlightwindow"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Effect is not supported:  "kwin4_effect_windowaperture"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Successfully loaded built-in effect:  "kscreen"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Effect is not supported:  "kwin4_effect_squash"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Successfully loaded built-in effect:  "presentwindows"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Effect is not supported:  "kwin4_effect_dialogparent"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: User timestamp, ASN: 4294967295
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: User timestamp, final: 'Client:4194306;WMCLASS:"":"";Caption:"glxgears"':8312186
QWARN  : KWin::DontCrashGlxgearsTest::testGlxgears() org.kde.kwindowsystem.keyserver.x11: X11 implementation of KKeyServer accessed from non-X11 platform! This is an application bug.
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Successfully loaded built-in effect:  "screenedge"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Effect is not supported:  "kwin4_effect_maximize"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Effect is not supported:  "screenshot"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Effect is not supported:  "kwin4_effect_frozenapp"
QDEBUG : KWin::DontCrashGlxgearsTest::testGlxgears() kwin_core: Client::killWindow(): "glxgears"
PASS   : KWin::DontCrashGlxgearsTest::testGlxgears()
PASS   : KWin::DontCrashGlxgearsTest::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 225ms
********* Finished testing of KWin::DontCrashGlxgearsTest *********
QSocketNotifier: Invalid socket 19 with type Read, disabling...

If the aurorae engine is configured correctly I can't say. Let's push it and see result on CI.

zzag accepted this revision.Jun 27 2019, 11:43 AM

QDEBUG : KWin::DontCrashGlxgearsTest::initTestCase() kwin_decorations: Trying to load decoration plugin: "/usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kdecoration2/breezedecoration.so"

Hmm, I think I know why Aurorae is loaded on my machine. DecorationBridge fails to load the breeze decoration theme because it's not in <kwin builddir>/bin/org.kde.kdecoration2, so kwin falls back to Aurorae.

autotests/integration/quick_tiling_test.cpp
585–590

Remove one extra empty line.

This revision is now accepted and ready to land.Jun 27 2019, 11:44 AM
This revision was automatically updated to reflect the committed changes.