Commit Graph
3 Commits
Author SHA1 Message Date
dotCooCoo 23b10d78fb craft-ui: unit tests that render take turns with the wgpu renderer
Each egui_kittest wgpu renderer creates its own Vulkan instance and
device. When one test uses its device while a test on another thread
creates or destroys one, the Vulkan loader now and then crashes the test
binary with SIGSEGV. The previous commit serialized the four rendering
tests in tests/visual_regression.rs; the craft-ui unit test binary has
the same pattern in two tests:
combo::tests::the_button_and_menu_look_like_eguis and
tabs::dialog::tests::selected_tab_erases_a_baseline_centered_on_its_bottom_edge.

Both now take crate::gpu_test_lock() before building their harness and
hold it until the harness is dropped. The comment on the lock in
visual_regression.rs now names the loader race instead of concurrent
rendering alone.
2026-11-13 06:05:11 -08:00
dotCooCoo eb752a4209 craft-ui: visual regression tests take turns with the wgpu renderer
The visual_regression test binary crashed with SIGSEGV now and then on
the Ubuntu CI runner, where wgpu uses Vulkan (WGPU_BACKEND=vulkan) with
Mesa's software driver. Four of its tests each create a
WgpuTestRenderer, which creates its own Vulkan instance and device, and
the test harness runs them on parallel threads. When one test uses its
device while another creates or destroys one, the Vulkan loader can
read a device entry that is being freed.

Each of those tests now takes a shared lock before it creates its
renderer and holds it until the renderer is dropped. A poisoned lock is
taken over, so a failed test does not block the others.
2026-11-13 06:05:11 -08:00
skylar taylor-barrick 67ce2e9a82 UI.6: add precise visual regressions and toolbar overflow fitting 2026-10-09 19:15:10 -06:00