tst_qxmlsimplereader/tst_qxmlinputsource: serialize with RESOURCE_LOCK


Both tests hard-code the same TCP port, 1088, on localhost:
tst_qxmlsimplereader's TEST_PORT and tst_qxmlinputsource's listen()
call both bind it. Under a parallel ctest run, whichever test starts
first wins the port; the other's QTcpServer::listen() fails.
tst_qxmlsimplereader at least QSKIPs the affected test function, but
tst_qxmlinputsource doesn't check the return value and goes on to
point a QNetworkAccessManager at http://127.0.0.1:1088 regardless -
if that port is already held by the other test's server, the request
can hang waiting for a reply that never comes, rather than failing
cleanly.

Found by both tests running unusually long (one even timing out) when
run under ctest, but completing successfully when run in isolation.

Give both tests a shared RESOURCE_LOCK so ctest never schedules them
concurrently. Same pattern as the docker-based network tests in
qtbase/cmake/QtTestHelpers.cmake, which serialize for the same reason
(shared external server, concurrent access corrupts state instead of
just failing).

RESOURCE_LOCK idea by Claude.

Amends the start of the public history in qtbase.

Picking to all active branches to avoid CI hiccups. In the Qt 5 pick,
sax.pro needs to have CONFIG += ordered to achieve the same.

Pick-to: 6.12 6.11 6.8 6.5 5.15
Change-Id: I2484fc2cacdce8a1f464e0df1380786072c81b59
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
commitec93d6ebef46373a870adc32caf2183a583c69ae
parent6bbac37fc1c6567ca106b7cb64c2df98aeea5202
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeMon, 7 Sep 2026 14:22:42 +0000