Commit 8d47edae authored by Kevin Funk's avatar Kevin Funk

test_gdb: Don't hang in GdbTest::testCoreFile

KProcess::execute(...) by default waits indefinitely. Set a timeout.
(cherry picked from commit a485241c96e221f3844d96f35a94a37752be7d6b)
parent c6f68e54
......@@ -1041,14 +1041,14 @@ void GdbTest::testCoreFile()
+ findExecutable(QStringLiteral("debuggee_crash")).toLocalFile();
debugeeProcess.start();
debugeeProcess.waitForFinished();
qDebug() << debugeeProcess.readAll();
qDebug() << "Debuggee output:\n" << debugeeProcess.readAll();
bool coreFileFound = f.exists();
if (!coreFileFound) {
// Try to use coredumpctl
auto coredumpctl = QStandardPaths::findExecutable(QStringLiteral("coredumpctl"));
if (!coredumpctl.isEmpty()) {
KProcess::execute(coredumpctl, {"-1", "-o", f.absoluteFilePath(), "dump", "debuggee_crash"});
KProcess::execute(coredumpctl, {"-1", "-o", f.absoluteFilePath(), "dump", "debuggee_crash"}, 5000);
coreFileFound = f.exists();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment