From 514d24da02ccc30a930bc3f0aed1a7b2ce1f55cc Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 28 Aug 2023 17:57:55 -0700 Subject: [PATCH] tst_selftests: deduplicate the Unix/Linux conditions Amends 118f2210c6279803b9a4103a796ce75e88f8beb2. That commit added #ifdef Q_OS_UNIX if (test == "assert" || test == "crashes" || test == "failfetchtype" || test == "faildatatype") return; // Outputs "Received signal 6 (SIGABRT)" #endif Which duplicated 4 out of the 5 tests in the block: #ifdef Q_OS_LINUX // QEMU outputs to stderr about uncaught signals if (QTestPrivate::isRunningArmOnX86() && (test == "assert" || test == "crashes" || test == "faildatatype" || test == "failfetchtype" || test == "silent" )) return; #endif But as Linux is Unix, we never got to that second block for those 4 tests. Change-Id: I2b24e1d3cad44897906efffd177fb4b5507d190a Reviewed-by: Edward Welbourne (cherry picked from commit f1ba2b9f44964a0546da4815669cf728e50dd4a8) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/testlib/selftests/tst_selftests.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 5ff1304ec2a..b3ecb24470e 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -783,15 +783,10 @@ void checkErrorOutput(const QString &test, const QByteArray &errorOutput) #endif #ifdef Q_OS_LINUX - // QEMU outputs to stderr about uncaught signals - if (QTestPrivate::isRunningArmOnX86() && - (test == "assert" - || test == "crashes" - || test == "faildatatype" - || test == "failfetchtype" - || test == "silent" - )) - return; + if (test == "silent") { + if (QTestPrivate::isRunningArmOnX86()) + return; // QEMU outputs to stderr about uncaught signals + } #endif INFO(errorOutput.toStdString());