Menu

#388 QUTest 8.0.1 leaks host executable in failing tests that also trigger an assertion

QTOOLS
closed
QUTest (14)
1
2025-09-01
2025-06-12
No

In QUTest 8.0.1 and earlier, the following scenario leads to the leaked host executable:

  • tests are running on the host (so host executable is used instead of any embedded target)
  • a test fails due to missed expectation
  • additionally, in the same run-to-completion step the test fixture asserts
  • the failing test is followed by another test (a regular test that does reset the target)

The problem is that the assertion comes after the test has been failed (due to missed expectation). The test script mistakenly assignes the failing assertion to the next test that launches a new instance of the host executable. This new instance is then NOT terminated because the test script "thinks" that it asserted, so it terminated itself.

Discussion

  • Quantum Leaps

    Quantum Leaps - 2025-06-12

    The solution is to always wait (timeout) after any failing expectation till all data for the given run-to-completion step come in. That way, any potential assertion is accounted to the currently running test, instead to the next test and the new instance of the host executable. (Note that this policy slows down the tests failing due to a missed expectation, but not the succeeding tests and not asserting-test, where the assertion is expected.)

     
  • Quantum Leaps

    Quantum Leaps - 2025-09-01

    Fixed in QTools 8.0.4 (qutest.py 8.0.4).
    --MMS

     

Anonymous
Anonymous

Add attachments
Cancel