[autotests] Sub-surface resize test
ClosedPublic

Authored by romangg on Jan 22 2019, 10:59 AM.

Details

Summary

Adds an autotest to show that KWin fails an assertion when a client tries to
resize a sub-surface.

Since it is the first autotest dealing with sub-surfaces explicitly additional
autotest helpers are introduced to allow that.

We also add a new signal in Compositor to spy on to know when the buffer swap
has been completed.

Test Plan

Test fails as expected:

QFATAL : KWin::BufferSizeChangeTest::testShmBufferSizeChangeOnSubSurface() ASSERT: "image.size() == m_size" in file /home/roman/dev/kde/src/kde/workspace/kwin/platformsupport/scenes/opengl/abstract_egl_backend.cpp, line 394
FAIL!  : KWin::BufferSizeChangeTest::testShmBufferSizeChangeOnSubSurface() Received a fatal error.
   Loc: [Unknown file(0)]
Totals: 4 passed, 1 failed, 0 skipped, 0 blacklisted, 367ms
********* Finished testing of KWin::BufferSizeChangeTest *********

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.Jan 22 2019, 10:59 AM
Restricted Application added a project: KWin. · View Herald TranscriptJan 22 2019, 10:59 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Jan 22 2019, 10:59 AM
romangg edited the test plan for this revision. (Show Details)Jan 22 2019, 11:03 AM
romangg edited the test plan for this revision. (Show Details)

Cool stuff! I assume you want to push together with a patch fixing this?

Cool stuff! I assume you want to push together with a patch fixing this?

Yes, probably you know already since you accepted D18453, but for completeness: it's that one. ;)

zzag added a subscriber: zzag.Jan 22 2019, 10:08 PM
zzag added inline comments.
autotests/integration/buffer_size_change_test.cpp
6

Nitpick: missing "(C)". :D

22–24

Includes should be sorted.

52

Missing "this test verifies ..."

56

Just QVERIFY(surface);

58

Why ShellSurface?

60

Could you please add an explanatory comment for this flush?

80

Also, it would be great to destroy the client, though that's not mandatory. :-)

zzag added inline comments.Jan 22 2019, 10:10 PM
autotests/integration/buffer_size_change_test.cpp
56

Please ignore this one.

zzag added inline comments.Jan 22 2019, 10:14 PM
autotests/integration/buffer_size_change_test.cpp
63

We usually do QVERIFY after renderAndWaitForShown. :-)

zzag added inline comments.Jan 22 2019, 10:18 PM
autotests/integration/buffer_size_change_test.cpp
60

Also, do we need it anyway (flush)?

zzag requested changes to this revision.Feb 6 2019, 12:21 PM

Requesting changes to remove this revision from review queue.

Please don't use wl-shell in new autotests, or if you do, then please test xdg-shell as well.

This revision now requires changes to proceed.Feb 6 2019, 12:21 PM
This revision was not accepted when it landed; it landed in state Needs Revision.Thu, Feb 21, 10:33 PM
This revision was automatically updated to reflect the committed changes.
romangg marked 8 inline comments as done.