From d441f6bba7b2aaf1e11b95c1ad4c785e6939f6ba Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 14 May 2019 14:09:59 +0200 Subject: Skip flaky qfloat16 1/inf == 0 test on QEMU/Arm64 It's not clear why this test fails - and only does so sometimes - but fail it does, so we ned to skip it to let development keep going. As it happens, the same platform over-optimizes various computations using qfloat16; which can at least be used to test for this platform, since it wrongly distinguishes two qfloat16 values that theory and all other platfomrs agree should coincide. Fixes: QTBUG-75812 Change-Id: Ie9463d7dc21bca679337b475d13417b9f42bbf9b Reviewed-by: Friedemann Kleint Reviewed-by: Qt CI Bot --- tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp index 241dccb90e..aa6f0935e8 100644 --- a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp +++ b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp @@ -172,7 +172,9 @@ void tst_qfloat16::qNan() QVERIFY(qIsInf(-inf)); QVERIFY(qIsInf(2.f*inf)); QVERIFY(qIsInf(inf*2.f)); - QCOMPARE(qfloat16(1.f/inf), qfloat16(0.f)); + // QTBUG-75812: QEMU's over-optimized arm64 flakily fails 1/inf == 0 :-( + if (qfloat16(9.785e-4f) == qfloat16(9.794e-4f)) + QCOMPARE(qfloat16(1.f/inf), qfloat16(0.f)); #ifdef Q_CC_INTEL QEXPECT_FAIL("", "ICC optimizes zero * anything to zero", Continue); #endif -- cgit v1.2.3