Skip to content
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

Fix for mir_performance_tests failure due to not cleaning up our displays #3080

Merged

Conversation

mattkae
Copy link
Contributor

@mattkae mattkae commented Oct 13, 2023

How to test

  • On an nvidia + intel platform, run:
sudo MIR_EXPERIMENTAL_HYBRID_GRAPHICS=1 MIR_SERVER_PLATFORM_RENDERING_LIBS=mir:eglstream-kms XDG_RUNTIME_DIR=/run/ ./bin/mir_performance_tests --gtest_filter=GLMark2Wayland.*

Expected output

LD_LIBRARY_PATH=./bin/../lib/
MIR_SERVER_PLATFORM_PATH=./bin/../lib/server-modules/
exec=./bin/mir_performance_tests.bin
Running main() from main.cpp
Note: Google Test filter = GLMark2Wayland.*
[==========] Running 2 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 2 tests from GLMark2Wayland
[ RUN      ] GLMark2Wayland.fullscreen
Saving server logs to: /tmp/GLMark2Wayland_fullscreen_server.log
libEGL warning: egl: failed to create dri2 screen
libEGL warning: egl: failed to create dri2 screen
libEGL warning: egl: failed to create dri2 screen
libEGL warning: egl: failed to create dri2 screen
Saving GLMark2 detailed results to: /tmp/GLMark2Wayland_fullscreen.log
[       OK ] GLMark2Wayland.fullscreen (11871 ms)
[ RUN      ] GLMark2Wayland.windowed
Saving server logs to: /tmp/GLMark2Wayland_windowed_server.log
libEGL warning: egl: failed to create dri2 screen
libEGL warning: egl: failed to create dri2 screen
libEGL warning: egl: failed to create dri2 screen
libEGL warning: egl: failed to create dri2 screen
Saving GLMark2 detailed results to: /tmp/GLMark2Wayland_windowed.log
[       OK ] GLMark2Wayland.windowed (11712 ms)
[----------] 2 tests from GLMark2Wayland (23584 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test suite ran. (23584 ms total)
[  PASSED  ] 2 tests.

@mattkae mattkae force-pushed the testing/fix-for-platform-api-merge branch from 6cc6303 to ff41d81 Compare October 13, 2023 16:06
@mattkae mattkae marked this pull request as ready for review October 13, 2023 16:08
@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #3080 (a34f56b) into platform-API-merge (79622a9) will decrease coverage by 0.02%.
Report is 8 commits behind head on platform-API-merge.
The diff coverage is 48.48%.

@@                  Coverage Diff                   @@
##           platform-API-merge    #3080      +/-   ##
======================================================
- Coverage               75.94%   75.92%   -0.02%     
======================================================
  Files                    1058     1058              
  Lines                   74005    74028      +23     
======================================================
+ Hits                    56200    56206       +6     
- Misses                  17805    17822      +17     
Files Coverage Δ
include/platform/mir/graphics/platform.h 85.29% <100.00%> (ø)
src/platforms/gbm-kms/server/kms/platform.cpp 23.83% <100.00%> (ø)
...latforms/renderer-generic-egl/platform_symbols.cpp 95.23% <100.00%> (ø)
src/platforms/wayland/platform_symbols.cpp 65.21% <ø> (ø)
src/platforms/x11/graphics/graphics.cpp 97.61% <ø> (ø)
src/platforms/x11/graphics/platform.cpp 90.32% <100.00%> (ø)
src/server/compositor/basic_screen_shooter.cpp 83.67% <100.00%> (ø)
src/server/graphics/default_configuration.cpp 79.83% <100.00%> (+0.25%) ⬆️
src/server/graphics/platform_probe.cpp 95.83% <100.00%> (ø)
src/server/input/vt_filter.cpp 6.66% <100.00%> (+1.58%) ⬆️
... and 13 more

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@AlanGriffiths AlanGriffiths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity, should we be testing against EGL_NO_STREAM_KHR (for example)?

And this looks like the same issue exists on main and maybe better applied there?

@RAOF
Copy link
Contributor

RAOF commented Oct 16, 2023

For clarity, should we be testing against EGL_NO_STREAM_KHR (for example)?

Yeah. I can't find it offhand, but I'm pretty sure that there's at least one EGL_NO_FOO that's not 0.

@mattkae
Copy link
Contributor Author

mattkae commented Oct 16, 2023

For clarity, should we be testing against EGL_NO_STREAM_KHR (for example)?

And this looks like the same issue exists on main and maybe better applied there?

We are already checking against EGL_NO_STREAM_KHR at construction. Unless I am misunderstanding you?

The original error occurs in DisplayBuffer::post() at

if (nv_stream(dpy).eglStreamConsumerAcquireAttribNV(dpy, output_stream, acquire_attribs) != EGL_TRUE)
...

@mattkae
Copy link
Contributor Author

mattkae commented Oct 16, 2023

@AlanGriffiths @RAOF I can move this to main if you both think it makes sense. Unless the api-merge is going to main soon, in which case I will hold off

Copy link
Collaborator

@AlanGriffiths AlanGriffiths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I meant.

Although, the tests are redundant: they test an invariant established in the constructor. (Which would be more obvious if the members were const.)

src/platforms/eglstream-kms/server/display.cpp Outdated Show resolved Hide resolved
src/platforms/eglstream-kms/server/display.cpp Outdated Show resolved Hide resolved
@mattkae mattkae force-pushed the testing/fix-for-platform-api-merge branch from d23b99e to a34f56b Compare October 17, 2023 17:36
@mattkae mattkae requested a review from AlanGriffiths October 17, 2023 19:53
@AlanGriffiths AlanGriffiths merged commit 926748e into platform-API-merge Oct 18, 2023
28 of 30 checks passed
@AlanGriffiths AlanGriffiths deleted the testing/fix-for-platform-api-merge branch October 18, 2023 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants