aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2022-06-07 09:18:05 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2022-06-08 14:02:08 +0200
commit27cc99809d532e422c0be8c3238e0fde1d6964a8 (patch)
tree73c2aa487061ec06d4d4dfb717ebe56393827668 /tests
parent21a17fbd891fedfc47be9c0cf260f7c76b884935 (diff)
tst_qqmlnotifier: Do not assume qfatal crashes the process
Because we run a test, we might have a handler for SIGABRT installed. If qfatal uses SIGABRT to terminate the process, we will thus actually handle it gracefully. Instead, simply check that the process has terminated, and rely on the output being available. As we check for "FATAL" in the output, the exit status check was anyway redundant before. Fixes: QTBUG-104051 Pick-to: dev 6.3 Change-Id: I062a592e97e717cd1a0d93f7913b492aa322296a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp b/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp
index 25eaa22b86..6310ef7d54 100644
--- a/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp
+++ b/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp
@@ -361,7 +361,8 @@ void tst_qqmlnotifier::deleteFromHandler()
process.setProgram(QCoreApplication::applicationFilePath());
process.setArguments({"deleteFromHandler"});
process.start();
- QTRY_COMPARE(process.exitStatus(), QProcess::CrashExit);
+ const bool ok = process.waitForFinished(90000);
+ QVERIFY(ok);
const QByteArray output = process.readAllStandardOutput();
QVERIFY(output.contains("QFATAL"));
QVERIFY(output.contains("destroyed while one of its QML signal handlers is in progress"));