summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/thread
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2021-07-20 11:24:51 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2021-07-20 16:51:51 +0200
commitf3bccd2f4fb583d2f36d41d233c7ad2deb7a7ca2 (patch)
tree69b25440c0281623104e3299be63fb35886a3902 /tests/auto/corelib/thread
parente9519d207e3c38ca779f7dcfc5e5a716ec041590 (diff)
Skip tst_qthreadonce test on QEMU
The test causes frequent failures in the CI. Couldn't reproduce on actual arm64 hardware, so it's likely to be a QEMU bug. From the available logs it seems that all the test cases are flaky (there's a failure even after cleanupTestCase() is called), so disable all of them. Fixes: QTBUG-94737 Pick-to: 6.1 6.2 Change-Id: I783ec2179ba779a2c8d93351a78e8472a4f7a907 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/corelib/thread')
-rw-r--r--tests/auto/corelib/thread/qthreadonce/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp9
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/corelib/thread/qthreadonce/CMakeLists.txt b/tests/auto/corelib/thread/qthreadonce/CMakeLists.txt
index cd4aaa5d72..18ec7723f2 100644
--- a/tests/auto/corelib/thread/qthreadonce/CMakeLists.txt
+++ b/tests/auto/corelib/thread/qthreadonce/CMakeLists.txt
@@ -8,4 +8,6 @@ qt_internal_add_test(tst_qthreadonce
SOURCES
qthreadonce.cpp
tst_qthreadonce.cpp
+ LIBRARIES
+ Qt::TestPrivate
)
diff --git a/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp b/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
index 7bb39da85c..76b5d87283 100644
--- a/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
+++ b/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
@@ -36,11 +36,14 @@
#include <qwaitcondition.h>
#include "qthreadonce.h"
+#include <QtTest/private/qemulationdetector_p.h>
+
class tst_QThreadOnce : public QObject
{
Q_OBJECT
private slots:
+ void initTestCase();
void sameThread();
void sameThread_data();
void multipleThreads();
@@ -52,6 +55,12 @@ private slots:
#endif
};
+void tst_QThreadOnce::initTestCase()
+{
+ if (QTestPrivate::isRunningArmOnX86())
+ QSKIP("Flaky on QEMU, QTBUG-94737");
+}
+
class SingletonObject: public QObject
{
Q_OBJECT