From b99bb1b403d57dbbda5e52ea5b1dd070465f2a8f Mon Sep 17 00:00:00 2001 From: dingo Date: Sun, 11 Oct 2026 16:39:58 -0400 Subject: [PATCH] Diagnose X11 client lifecycle failure --- docs/engineering/VALIDATION.md | 10 ++++++++++ tests/client_lifecycle.cpp | 19 ++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/engineering/VALIDATION.md b/docs/engineering/VALIDATION.md index c54b913..7e84766 100644 --- a/docs/engineering/VALIDATION.md +++ b/docs/engineering/VALIDATION.md @@ -6978,3 +6978,13 @@ PostgreSQL-enabled Clang analysis rejected the provision CLI's assignments from optional, so these destinations now copy `n` directly. PostgreSQL analysis failed before the dependent server-image build and Harbor publication could start; the next pushed run must confirm the analyzer and image publish gates. + +CI run #299 confirms the clone parser now builds in the PostgreSQL-enabled +release job, and the network suite passed. The client matrix job passed its +13 CTest cases under SDL's dummy driver and the standalone X11 client/UI probes, +but its additional X11 `evo-client-lifecycle-tests` invocation failed while +opening the final toolkit-capture application (`tests/client_lifecycle.cpp`). +That failure gates `server-image`; the test now reports its typed open error and +checks SDL teardown after each test section so the next CI run can identify the +failing lifecycle boundary. The PostgreSQL integration and static-analysis job +is still running; no Harbor publish has started. diff --git a/tests/client_lifecycle.cpp b/tests/client_lifecycle.cpp index dd312b8..c27b889 100644 --- a/tests/client_lifecycle.cpp +++ b/tests/client_lifecycle.cpp @@ -22,6 +22,12 @@ void check(bool ok, std::source_location at = std::source_location::current()) { throw std::runtime_error("client lifecycle line " + std::to_string(at.line())); } #define CHECK(...) check(static_cast(__VA_ARGS__)) +void check_sdl_shutdown(std::string_view test) { + const auto initialized = SDL_WasInit(0); + if (initialized != 0) + throw std::runtime_error(std::string{test} + + " left SDL initialized: " + std::to_string(initialized)); +} template bool refused(const std::expected& result, E error) { return !result && result.error() == error; } @@ -563,7 +569,11 @@ int queued_keyboard_events() { void capture_balances_toolkit() { const auto frame = fixture(); auto result = Application::open({320, 240, false, "software"}); - CHECK(result); + if (!result) + throw std::runtime_error("capture-balances open failed error=" + + std::to_string(static_cast(result.error())) + + " SDL_WasInit=" + std::to_string(SDL_WasInit(0)) + + " SDL=" + SDL_GetError()); auto app = std::move(result.value()); CHECK(app->poll_events()); const auto id = SDL_GetWindowID(window()); @@ -760,12 +770,19 @@ void capture_balances_toolkit() { } // namespace int main() try { client_controls_tests(); + check_sdl_shutdown("client controls"); frame_contract(); + check_sdl_shutdown("frame contract"); lifecycle(); + check_sdl_shutdown("lifecycle"); native_input(); + check_sdl_shutdown("native input"); toolkit_capture(); + check_sdl_shutdown("toolkit capture"); rebinding(); + check_sdl_shutdown("rebinding"); capture_balances_toolkit(); + check_sdl_shutdown("capture balances toolkit"); return 0; } catch (const std::exception& e) { std::fprintf(stderr, "%s: %s\n", e.what(), SDL_GetError());