Skip to content

Commit

Permalink
[WTR] Watchdog timer should not default to zero seconds
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=255920

Reviewed by Carlos Garcia Campos.

TestInvocation::m_timeout can have two special values: zero, for a
default timeout, and -1 for no timeout.

The current implementation of
initializeWaitToDumpWatchdogTimerIfNeeded() was not taking this into
consideration, which caused tests to immediately timeout (0 second
timeout) when invoking WebKitTestRunner without --no-timeout.

* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::initializeWaitToDumpWatchdogTimerIfNeeded):

Canonical link: https://commits.webkit.org/263374@main
  • Loading branch information
ntrrgc committed Apr 25, 2023
1 parent 4d11cf4 commit 0f7e57b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/WebKitTestRunner/TestInvocation.cpp
Expand Up @@ -1756,10 +1756,10 @@ void TestInvocation::dumpPrivateClickMeasurement()

void TestInvocation::initializeWaitToDumpWatchdogTimerIfNeeded()
{
if (m_waitToDumpWatchdogTimer.isActive())
if (m_waitToDumpWatchdogTimer.isActive() || m_timeout == TestController::noTimeout)
return;

m_waitToDumpWatchdogTimer.startOneShot(m_timeout);
m_waitToDumpWatchdogTimer.startOneShot(m_timeout > 0_s ? m_timeout : TestController::defaultShortTimeout);
}

void TestInvocation::invalidateWaitToDumpWatchdogTimer()
Expand Down

0 comments on commit 0f7e57b

Please sign in to comment.