[Libreoffice-commits] online.git: common/Unit.cpp
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 19 10:16:32 UTC 2020
common/Unit.cpp | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit c414b4a240ac59ebc7b9ffa5b126c233404721b0
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Feb 19 09:24:36 2020 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Feb 19 11:16:09 2020 +0100
UnitBase::exitTest: make sure we flag for termination only once
It can happen that a test succeeds, but right after that, the timeout
thread still fails the test:
09:21:10.411840 [ loolwsd ] INF exitTest: 1. Flagging for termination.| common/Unit.cpp:201
09:21:10.412016 [ loolwsd ] ERR Timed out waiting for unit test to complete| common/Unit.cpp:212
09:21:10.412060 [ loolwsd ] INF exitTest: 2. Flagging for termination.| common/Unit.cpp:201
(1 is TestResult::Ok, 2 is TestResult::TimedOut.)
Fix these cases by just ignoring the timeout invocation, we'll exit soon
anyway.
With this, finally a sanitizers-enabled 'make check' passes agains a
sanitizers-enabled core.git.
Change-Id: Id52c4b6f88a795d4ff2af7929a71d5eb83c56773
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88999
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/common/Unit.cpp b/common/Unit.cpp
index 875c97686..82cd82342 100644
--- a/common/Unit.cpp
+++ b/common/Unit.cpp
@@ -198,6 +198,11 @@ UnitKit::~UnitKit()
void UnitBase::exitTest(TestResult result)
{
+ if (_setRetValue)
+ {
+ return;
+ }
+
LOG_INF("exitTest: " << (int)result << ". Flagging for termination.");
_setRetValue = true;
_retValue = result == TestResult::Ok ? EX_OK : EX_SOFTWARE;
More information about the Libreoffice-commits
mailing list