-
Notifications
You must be signed in to change notification settings - Fork 14
Add tests for wp_linux_drm_syncobj_v1 #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
c5df1e4 to
08d273a
Compare
08d273a to
9239756
Compare
…cit-sync on wl_shm buffers. The only guaranteed-supported buffers are linux-dmabuf buffers. It's easy for Mir to support wl_shm buffers, too, but maybe other compositors will not support wl_shm here. Skip all the tests which rely on committing a wl_shm buffer when an `unsupported_buffer` error is returned
Clients are allowed to make empty or null commits to surfaces managed by a syncobj (as long as they don't also set syncpoints).
mattkae
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense by me 👍
|
|
||
| namespace | ||
| { | ||
| class Fd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This could be nice to have in its own file for the future
AlanGriffiths
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to avoid tests that sleep, especially for more than a few milliseconds.
Isn't there any scope for client.dispatch_until(...) or similar? Failures might still take a_long_time() but success should be fast.
| // We don't have a way to ensure that WM has settled down, so just wait a little | ||
| std::this_thread::sleep_for(1s); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a very long time to be sleeping in a test - especially twice. (I'm no fan of sleeping in a test - that way leads to very slow feedback from the tests - imagine if every test case took at least a second...)
| // Again, we don't have a way to ensure that WM has settled down, so just wait a little | ||
| std::this_thread::sleep_for(1s); | ||
|
|
||
| EXPECT_THAT(surface,IsSurfaceOfSize(new_width, new_height)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Again, we don't have a way to ensure that WM has settled down, so just wait a little | |
| std::this_thread::sleep_for(1s); | |
| EXPECT_THAT(surface,IsSurfaceOfSize(new_width, new_height)); | |
| client.dispatch_until([&]() | |
| { | |
| return surface_has_size(surface, new_width, new_height); | |
| }); |
|
@RAOF ping! |
|
Needs work, converting to draft. |
No description provided.