2 Commits
Author SHA1 Message Date
John Paul Mattia 783d9fb43e Enable IPC tests on wxQt
The IPC tests were excluded from wxQt because wxIPC worker threads
marshal their socket I/O to the main thread via CallAfter(), and a
cross-thread CallAfter() was not reliably processed by the wxQt event
loop, stalling the tests. Now that the previous commit makes WakeUp()
post a real Qt event, the whole suite runs on wxQt: remove the
__WXQT__ exclusions from the test guards (including the one in
tests/test.cpp that compiled out the re-exec'd server mode) and the
comments explaining them.

All 10 [ipc] cases pass repeatedly on wxQt in both test and test_gui,
with both a real X server and QT_QPA_PLATFORM=offscreen. Notably the
offscreen runs are meaningful for the previous commit's fix: with an X
server connected, X-connection traffic keeps rescheduling the idle
timer and can mask a missing WakeUp() event, while offscreen the
event loop goes truly idle.
2026-08-24 12:45:07 -07:00
John Paul Mattia 122ff6d7db Add a multithreaded test for IPC over sockets
Add a test exercising the IPC-over-sockets implementation from a single
thread and from multiple threads concurrently (Execute, Request, Poke,
Advise, combined Advise+Request, and concurrent main-thread and
worker-thread Request()s).

Each test starts its own server by re-executing the test program with
WX_IPC_TEST_SERVER set and shuts it down again in the fixture teardown, so
no server process outlives a test (or disturbs the unrelated GUI tests in
test_gui). The client runs in the main Catch2 process and queries the server
for state to verify it (Catch2 macros cannot run in the server process). The
wait loops are wall-clock bounded so they behave under a GUI event loop, and
a per-fixture watchdog aborts with a diagnostic if a test ever hangs rather
than letting CI time out.

The test runs in both the console "test" and the GUI "test_gui" programs. It
is excluded from one configuration: wxQt, whose event loop does not reliably
process a cross-thread CallAfter() (a wxQt bug fixed separately).
2026-08-06 21:59:34 +02:00