How to test Weston gfx (Re: Weston test suite)

Derek Foreman derekf at
Mon Aug 31 11:47:47 PDT 2015

Hash: SHA1

On 31/08/15 03:58 AM, Pekka Paalanen wrote:
> On Tue, 25 Aug 2015 10:43:22 +0300 Pekka Paalanen 
> <ppaalanen at> wrote:
>> On Tue, 25 Aug 2015 10:16:17 +0300 Pekka Paalanen 
>> <ppaalanen at> wrote:
>>> Btw. I CC'd you on 
>>> where we 
>>> have been talking about testing things. I wonder how you'd 
>>> handle some tests being specific to a backend, and some tests 
>>> being generic such that a user (the person doing 'make check') 
>>> could run it against any backend he chooses? If we need such 
>>> things... perhaps backend-specificity comes mostly from 
>>> configuration and options, so maybe we might be able to unify 
>>> the options so much that the differences don't matter.
>>> And then screenshot-based tests are likely something we want
>>> to run once for each possible renderer for a chosen backend.
>>> Hmm... I just got an idea.
>>> We've been adding renderer support to so 
>>> that we could run screenshot-based tests headless. What if... 
>>> we kept headless backend without real renderers (only mocked 
>>> renderer, one capable of initialising 
>>> EGL_WL_bind_wayland_display though), ran Weston/wayland on top 
>>> of Weston/headless, and test clients on the Weston/wayland 
>>> instance?
>>> It might require some work on the wayland-backend, but it
>>> would also leave all testing related mocks and hacks into the 
>>> headless backend code, without leaking it into gl-renderer or 
>>> such. And it would stress the wayland-backend which I imagine 
>>> could use more use.
>>> Well, that's just a wild idea, I'm not sure what it would 
>>> entail. What do you all think?
>> Wait... using Weston/headless to host Weston/wayland would 
>> immediately enable software GL rendering, wouldn't it? The EGL 
>> Wayland platform in Mesa today supports software-GL on wl_shm. 
>> This means we should be able to test Weston's gl-renderer on 
>> llvmpipe by just running it with the wayland-backend on another 
>> Weston instace.
> Hi all,
> I think this needs a bit of discussion. Should we be adding more 
> and more renderer features into the headless backend, or should we 
> move to running Weston/wayland on top of Weston/headless for 'make 
> check'?
> It is a blocker question for things like 
> which Dawid is 
> working on.
> Derek, I recall you had plans to control Weston's repaint loop from
> tests. How would that be affected if we run nested instead of 
> directly on headless?

Right, I'll try to get a new revision of those patches out shortly
after the release...

I can't immediately think of a reason why nesting would cause
problems.  I think it should be ok.

> The reason why I like the nested approach now is that while it 
> allows immediately to run things with llvmpipe, we would not need 
> to modify gl-renderer to e.g. render into an FBO just for testing. 
> We could have the headless backend even initialize a render node 
> and support EGL_WL_bind_wayland_display. Code only related to 
> testing would be limited into the headless backend with its 
> built-in mock-renderer.

Well, I think the clock control stuff would have to take place in the
nested instance, so there's a limit to how much we can
compartmentalize the test stuff to the headless backend?

Screenshots would be taken on the headless backend though - the test
clients would have to connect to both the nested and the parent

> What do you think?
> Hmm, and we could pull in fullscreen-shell into the mix and use it 
> on headless. The wayland backend seems to already have code for
> it. This would avoid running weston-desktop-shell or the VKB app
> for the headless instance.

I guess if I was trying very hard to find a reason to dislike this it
would be that changes to fullscreen-shell could break all sorts of
tests that don't intentionally test fullscreen-shell...

Really though, I think it seems like a reasonable idea.  And I think
fullscreen-shell is fairly mature.

Having gl-renderer not have to worry about whether it's in "test mode"
or not sounds like the lesser of two evils.

> Thanks, pq

Version: GnuPG v1


More information about the wayland-devel mailing list