Review Request 115190: Add unit test for KWindowInfo on X11

Martin Gräßlin mgraesslin at kde.org
Wed Jan 22 06:35:36 UTC 2014



> On Jan. 21, 2014, 11:42 p.m., Ben Cooksley wrote:
> > I'm afraid the test fails Martin. Guess KWin and Openbox behave differently in some areas.
> > 
> > 5/9 Test #5: kwindowsystem-kwindowinfox11test ......***Failed    9.96 sec
> > ********* Start testing of KWindowInfoX11Test *********
> > Config: Using QtTest library 5.2.2, Qt 5.2.2
> > PASS   : KWindowInfoX11Test::initTestCase()
> > FAIL!  : KWindowInfoX11Test::testState(max) Compared values are not the same
> >    Actual   (info.state())                                                    : 0
> >    Expected (static_cast<unsigned long>(firstRun ? NET::DemandsAttention : 0)): 2048
> >    Loc: [/srv/jenkins/workspace/kwindowsystem_master_qt5/autotests/kwindowinfox11test.cpp(129)]
> > PASS   : KWindowInfoX11Test::testState(maxHoriz)
> > FAIL!  : KWindowInfoX11Test::testState(shaded) 'waitForWindow(spy, window->winId(), NET::WMState)' returned FALSE. ()
> >    Loc: [/srv/jenkins/workspace/kwindowsystem_master_qt5/autotests/kwindowinfox11test.cpp(159)]
> > FAIL!  : KWindowInfoX11Test::testState(skipTaskbar) 'waitForWindow(spy, window->winId(), NET::WMState)' returned FALSE. ()
> >    Loc: [/srv/jenkins/workspace/kwindowsystem_master_qt5/autotests/kwindowinfox11test.cpp(159)]
> > FAIL!  : KWindowInfoX11Test::testState(skipPager) 'waitForWindow(spy, window->winId(), NET::WMState)' returned FALSE. ()
> >    Loc: [/srv/jenkins/workspace/kwindowsystem_master_qt5/autotests/kwindowinfox11test.cpp(159)]
> > FAIL!  : KWindowInfoX11Test::testState(keep above) 'waitForWindow(spy, window->winId(), NET::WMState)' returned FALSE. ()
> >    Loc: [/srv/jenkins/workspace/kwindowsystem_master_qt5/autotests/kwindowinfox11test.cpp(159)]
> > FAIL!  : KWindowInfoX11Test::testState(keep below) 'waitForWindow(spy, window->winId(), NET::WMState)' returned FALSE. ()
> >    Loc: [/srv/jenkins/workspace/kwindowsystem_master_qt5/autotests/kwindowinfox11test.cpp(159)]
> > FAIL!  : KWindowInfoX11Test::testState(fullscreen) 'waitForWindow(spy, window->winId(), NET::WMState)' returned FALSE. ()
> >    Loc: [/srv/jenkins/workspace/kwindowsystem_master_qt5/autotests/kwindowinfox11test.cpp(159)]
> > PASS   : KWindowInfoX11Test::testMinimized()
> > PASS   : KWindowInfoX11Test::testMappingState()
> > PASS   : KWindowInfoX11Test::testWindowType(desktop)
> > PASS   : KWindowInfoX11Test::testWindowType(dock)
> > PASS   : KWindowInfoX11Test::testWindowType(toolbar)
> > PASS   : KWindowInfoX11Test::testWindowType(menu)
> > PASS   : KWindowInfoX11Test::testWindowType(dialog)
> > PASS   : KWindowInfoX11Test::testWindowType(override)
> > PASS   : KWindowInfoX11Test::testWindowType(override as normal)
> > PASS   : KWindowInfoX11Test::testWindowType(topmenu)
> > PASS   : KWindowInfoX11Test::testWindowType(topmenu as dock)
> > PASS   : KWindowInfoX11Test::testWindowType(utility)
> > PASS   : KWindowInfoX11Test::testWindowType(utility as dialog)
> > PASS   : KWindowInfoX11Test::testWindowType(splash)
> > PASS   : KWindowInfoX11Test::testWindowType(splash as dock)
> > PASS   : KWindowInfoX11Test::testWindowType(dropdownmenu)
> > PASS   : KWindowInfoX11Test::testWindowType(popupmenu)
> > PASS   : KWindowInfoX11Test::testWindowType(popupmenu as menu)
> > PASS   : KWindowInfoX11Test::testWindowType(tooltip)
> > PASS   : KWindowInfoX11Test::testWindowType(notification)
> > PASS   : KWindowInfoX11Test::testWindowType(ComboBox)
> > PASS   : KWindowInfoX11Test::testWindowType(DNDIcon)
> > PASS   : KWindowInfoX11Test::testWindowType(desktop-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(dock-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(toolbar-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(menu-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(dialog-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(override-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(topmenu-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(utility-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(splash-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(dropdownmenu-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(popupmenu-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(tooltip-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(notification-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(ComboBox-unknown)
> > PASS   : KWindowInfoX11Test::testWindowType(DNDIcon-unknown)
> > FAIL!  : KWindowInfoX11Test::testDesktop() 'waitForWindow(spy, window->winId(), NET::WMDesktop)' returned FALSE. ()
> >    Loc: [/srv/jenkins/workspace/kwindowsystem_master_qt5/autotests/kwindowinfox11test.cpp(304)]
> > PASS   : KWindowInfoX11Test::testWindowClass()
> > PASS   : KWindowInfoX11Test::testWindowRole()
> > PASS   : KWindowInfoX11Test::testClientMachine()
> > FAIL!  : KWindowInfoX11Test::testName() Compared values are not the same
> >    Actual   (info3.visibleName())     : kwindowinfox11test
> >    Expected (QStringLiteral("foobar")): foobar
> >    Loc: [/srv/jenkins/workspace/kwindowsystem_master_qt5/autotests/kwindowinfox11test.cpp(436)]
> > PASS   : KWindowInfoX11Test::testTransientFor()
> > PASS   : KWindowInfoX11Test::testGroupLeader()
> > PASS   : KWindowInfoX11Test::testExtendedStrut()
> > PASS   : KWindowInfoX11Test::testGeometry()
> > PASS   : KWindowInfoX11Test::cleanupTestCase()
> > Totals: 47 passed, 9 failed, 0 skipped
> > ********* Finished testing of KWindowInfoX11Test *********
> >

some of them I expected. Especially the first failure - that behavior looked to KWin specific.


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115190/#review47945
-----------------------------------------------------------


On Jan. 21, 2014, 6:41 p.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115190/
> -----------------------------------------------------------
> 
> (Updated Jan. 21, 2014, 6:41 p.m.)
> 
> 
> Review request for KDE Frameworks and Ben Cooksley.
> 
> 
> Repository: kwindowsystem
> 
> 
> Description
> -------
> 
> Add unit test for KWindowInfo on X11
> 
> Unit test for most methods provided by KWindowInfo. The general pattern
> is to create a window, show it, test the property, change it and
> verify that the change worked. This is a little bit tricky as the test
> needs to interact with large parts of the window manager. In case a
> property is updated by the window manager we need to send the client
> message, wait till the window manager has reacted on it and updated
> the property and then wait for the property update. This is mostly done
> by waiting for the signal KWindowSystem::windowChanged. Unfortunately
> that reports globally and not just for the window we are interested in.
> So we have to filter out till we got the correct one. If there is at
> the same time further interaction with the windowing system tests can
> fail, but a re-run normally fixes it.
> 
> The unit test is so far written against KWin. It's possible that it
> needs adjustments for succeeding on build.kde.org. Given that
> KWindowInfo::actionSupported is not tested as that is clearly to
> specific to the used window manager.
> 
> ---
> 
> @Ben: is it possible that you try the patch on build.kde.org while it's under review, so that I can fix any possible failures.
> 
> 
> Diffs
> -----
> 
>   autotests/CMakeLists.txt 58803aec9c807f68ff2bac227d0d9cf0305fa1f6 
>   autotests/kwindowinfox11test.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/115190/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140122/22f53099/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list