Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109466

QTEST_FUNCTION_TIMEOUT applies to the whole test, not per function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 5.15.14, 6.2.7, 6.4.3, 6.5.0, 6.6.0
    • 5.15.11, 6.0.4, 6.1.3, 6.2.6, 6.3.2, 6.4.1, 6.5.0 FF
    • Testing: qtestlib
    • None
    • All
    • 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

      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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            mmutz Marc Mutz
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: