aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-05-27 12:28:45 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-05-31 12:55:00 +0200
commit29e2c7b4149a5057a408cc9dddeede06c52ae9ca (patch)
tree305b18f0e4874593b733a6002fe319225da532d7 /tests
parentf5514e682b2c97d3dea0369ff7cb56e3376b3cde (diff)
QQmlDebugProcess: Crash if we cannot kill the debuggee
If the debuggee somehow manages to ignore our kill signal, the QProcess dtor will hang. Let's rather crash in this case, so that we see when it happens. Task-number: QTBUG-101678 Change-Id: Idc72412925244acfdb1dfdeec07369d5fb271080 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/debugger/shared/qqmldebugprocess.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp b/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp
index 216d1a9d43..c2dd248bcf 100644
--- a/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp
+++ b/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp
@@ -106,7 +106,8 @@ void QQmlDebugProcess::stop()
if (m_process.state() != QProcess::NotRunning) {
disconnect(&m_process, &QProcess::errorOccurred, this, &QQmlDebugProcess::processError);
m_process.kill();
- m_process.waitForFinished(5000);
+ if (!m_process.waitForFinished(5000))
+ qFatal("Debug process refused to be killed. We need to crash now.");
}
}