summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qxmlstream.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-12-16 12:20:08 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-12-16 22:58:10 +0100
commit26c190f57ea336106aeceffe1191a0314bb4443c (patch)
tree516c55e0cf9ba76a8acd8fd838f7f097c7aa4844 /src/corelib/serialization/qxmlstream.cpp
parent17a7e5cfddcbf33ef0fd1c2b7acc65b85159194e (diff)
QTest::WatchDog: fix missing timeout resets on test function change
Since e0cad1aab53119a0e47467f2236f019ce8d6da2a, the code suffered from an ABA problem where the TestFunctionStart expectation is set in testFinished(), but by the time WatchDog::run() gets around to examining the state when returning from condition_variable::wait() in waitFor(), the next beginTest() has already set the expectation back to TestFunctionEnd. There are several known solutions for ABA problems. Embedding a generation count into the expectation state seemed to be the most straight-forward fix, and can be done without DWCAS support, because the state is just 2 bits, leaving the other 30 or 62 bits for the generation counter, so do that. [ChangeLog][QTestLib] Fixed a bug which caused QTEST_FUNCTION_TIMEOUT to be applied to the whole test execution, as opposed to each test function. Fixes: QTBUG-109466 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: If71ade932330407b85d204d45c74350c651325fe Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/serialization/qxmlstream.cpp')
0 files changed, 0 insertions, 0 deletions