From 04616d5cff135a3f2fa0dcd99c3d756b67312daa Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Wed, 14 Oct 2026 14:07:19 +0300 Subject: Test pre-init public API, header portability and integration requests Add tests/common/test_public_api.c: before yasl_init, argument errors are reported first, owner-thread calls fail with ENODEV, queries return their documented fallbacks, yasl_drop_next_path parses a crafted text/uri-list, yasl_get_system_string follows its length and NUL rules, and yasl_wake is a no-op with no display. Build tests/test_header_c11.c as strict C11 and C17 with -pedantic-errors. Extend the surface integration test, run on weston and Xwayland, with title, window requests, bell, desktop queries, drag cancel, input-less move/menu/drag calls, a popup (its parent's destroy must also remove it, checked through the display's surface list), and a clipboard round trip. Run tests/x11/test_input.c in the X11 phase of run_surfaces.py through an optional trailing argument. Co-Authored-By: Claude Haiku 5.5 --- tests/helpers/run_surfaces.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/helpers/run_surfaces.py') diff --git a/tests/helpers/run_surfaces.py b/tests/helpers/run_surfaces.py index f120e35..c266b3c 100644 --- a/tests/helpers/run_surfaces.py +++ b/tests/helpers/run_surfaces.py @@ -18,7 +18,8 @@ def wait_for(process, ready): raise TimeoutError('Display server readiness') def main(): - weston, xwayland, contract, hello, tablet, gl, vulkan, notepad = sys.argv[1:] + # Optional trailing binaries run only in the X11 phase. + weston, xwayland, contract, hello, tablet, gl, vulkan, notepad, *x11_only = sys.argv[1:] servers = [] with tempfile.TemporaryDirectory(prefix='yasl-surfaces-') as directory: root = Path(directory) @@ -49,9 +50,12 @@ def main(): if backend == 'x11': case.pop('WAYLAND_DISPLAY', None) case['XDG_SESSION_TYPE'] = 'x11' - for binary, args in ((contract,[backend]), (gl,[backend]), + cases = [(contract,[backend]), (gl,[backend]), (vulkan,[backend]), (tablet,['--backend',backend,'--smoke-test']), - (notepad,['--smoke-test'])): + (notepad,['--smoke-test'])] + if backend == 'x11': + cases += [(binary, []) for binary in x11_only] + for binary, args in cases: if binary == '-': continue print('Testing', Path(binary).name, backend, flush=True) -- cgit v1.2.3