Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.11, 6.0.4, 6.1.3, 6.2.6, 6.3.2, 6.4.1, 6.5.0 FF
-
None
-
-
5
-
17a7e5cfd (dev), 26c190f57 (dev), e6adca47d (6.4), 4a68590fb (6.4), 2d7753a72 (tqtc/lts-6.2), bba67039b (tqtc/lts-6.2), cf573f97f (6.5), 90384f4d8 (6.5), f1052aac0 (tqtc/lts-5.15), 51fd0b809 (tqtc/lts-5.15)
-
Foundation Sprint 72
Description
Since e0cad1aab53119a0e47467f2236f019ce8d6da2a, a QTEST_FUNCTION_TIMEOUT applies no longer to a single test function run, but to the whole test execution.
This appears to be due to an ABA problem where the TestFunctionStart expectation is set in testFinished(), but by the time the WatchDog thread gets around to examining the state returning from condition_variable::wait(), 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 looks most straight-forward at this point, 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.