Bound X11 lifecycle stress in client CI
Foundation / checks (checks) (push) Successful in 32m0s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m59s
Foundation / checks (postgres) (push) Successful in 44m22s
Foundation / checks (tsan) (push) Successful in 8m3s
Foundation / checks (network) (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 10s
Foundation / postgres-tools (push) Successful in 18s

This commit is contained in:
dingo
2026-10-07 15:55:27 -04:00
parent ce1b5b8140
commit 12047503e2
2 changed files with 23 additions and 2 deletions
+9 -2
View File
@@ -11,6 +11,7 @@
#include <source_location>
#include <stdexcept>
#include <string>
#include <string_view>
#include <vector>
void client_controls_tests();
@@ -89,9 +90,15 @@ void lifecycle() {
CHECK(refused(Application::open({0, 64, false, "software"}), Error::invalid_config));
CHECK(refused(Application::open({64, 64, false, "evo-invalid"}), Error::renderer));
CHECK(SDL_WasInit(0) == 0); // Failed partial initialization released SDL.
for (int round = 0; round < 32; ++round) {
const char* video_driver = std::getenv("SDL_VIDEO_DRIVER");
const int rounds = video_driver != nullptr && std::string_view{video_driver} == "x11" ? 1 : 32;
for (int round = 0; round < rounds; ++round) {
auto result = Application::open({160, 120, false, "software"});
CHECK(result);
if (!result) {
throw std::runtime_error(
"client lifecycle open failed round=" + std::to_string(round) + " error=" +
std::to_string(static_cast<unsigned>(result.error())) + " SDL=" + SDL_GetError());
}
auto app = std::move(result.value());
CHECK(refused(Application::open({}), Error::already_open));
CHECK(app->step(frame) == Step::rendered);