In OpenSUSE/KDE it happens sometimes that the XCB qpa plugin receives twice the EXPOSE event for the created window.
Many tests that use qWaitForWindowExposed() return from this function call with the window not having focus yet. A second and final EXPOSE event is received together with the FOCUS_IN event later and this causes all kinds of trouble. This was the cause of the crash in
QTBUG-104268 for example. Here is part of the log:
This would explain a lot of flakiness that we have seen in our OpenSUSE platform on our CI. I'll try to link any relevant bugs I find.
it helps to run the test in a while loop with all logging enabled and QT_SCALE_FACTOR=5. For example
Replace call of qWaitForWindowExposed() with qWaitForWindowActive() which actually waits for the XCB_FOCUS_IN event, which I've only seen being delivered once.