From a72b6fe67685aad93062ca491e4e4cde7a87158c Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Thu, 8 Feb 2018 13:00:52 +0100 Subject: Blacklist tst_QtConcurrentMap::qFutureAssignmentLeak This test was blacklisted in 5.10 on opensuse, but it fails a lot on ubuntu as well. While we are discussing a real fix for this, temporarily get this out of the way. Task-number: QTBUG-63152 Change-Id: I4f1d3b261013052636ee13eda30f94b647a43a38 Reviewed-by: Sami Nurmenniemi Reviewed-by: Simon Hausmann --- tests/auto/concurrent/qtconcurrentmap/BLACKLIST | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tests/auto/concurrent/qtconcurrentmap/BLACKLIST (limited to 'tests/auto/concurrent/qtconcurrentmap') diff --git a/tests/auto/concurrent/qtconcurrentmap/BLACKLIST b/tests/auto/concurrent/qtconcurrentmap/BLACKLIST new file mode 100644 index 0000000000..c92cc3e0f1 --- /dev/null +++ b/tests/auto/concurrent/qtconcurrentmap/BLACKLIST @@ -0,0 +1,3 @@ +[qFutureAssignmentLeak] +ci opensuse-42.3 +ci ubuntu-16.04 -- cgit v1.2.3 From 5e98873cd3408d3900903efd926c36158941d67e Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 7 Feb 2018 18:37:22 +0100 Subject: Fix of flaky qFutureAssignmentLeak test Switch to QTRY_COMPARE since thread-local references might be held shortly after finished is signalled. Change-Id: Ia32f1f45f6cc461352558e0f2acf9612f8a4639e Reviewed-by: Thiago Macieira --- tests/auto/concurrent/qtconcurrentmap/BLACKLIST | 3 --- tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp | 7 +++++-- 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 tests/auto/concurrent/qtconcurrentmap/BLACKLIST (limited to 'tests/auto/concurrent/qtconcurrentmap') diff --git a/tests/auto/concurrent/qtconcurrentmap/BLACKLIST b/tests/auto/concurrent/qtconcurrentmap/BLACKLIST deleted file mode 100644 index 0320f61fab..0000000000 --- a/tests/auto/concurrent/qtconcurrentmap/BLACKLIST +++ /dev/null @@ -1,3 +0,0 @@ -[qFutureAssignmentLeak] -ci opensuse -ci ubuntu-16.04 diff --git a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp index 2d7c0c2f64..f539f012df 100644 --- a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp +++ b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp @@ -2402,9 +2402,12 @@ void tst_QtConcurrentMap::qFutureAssignmentLeak() future.waitForFinished(); } - QCOMPARE(currentInstanceCount.load(), 1000); + // Use QTRY_COMPARE because QtConcurrent::ThreadEngine::asynchronousFinish() + // deletes its internals after signaling finished, so it might still be holding + // on to copies of InstanceCounter for a short while. + QTRY_COMPARE(currentInstanceCount.load(), 1000); future = QFuture(); - QCOMPARE(currentInstanceCount.load(), 0); + QTRY_COMPARE(currentInstanceCount.load(), 0); } inline void increment(int &num) -- cgit v1.2.3