aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <[email protected]>2025-07-04 12:45:49 +0200
committerChristian Kandeler <[email protected]>2025-07-04 13:20:55 +0000
commit232e4a7e85209ac1711d4aaaa8ba53d2a95a018d (patch)
tree8f835b93b0043884bacba300a8aeb12a3a8c5145
parentbd13f4cc7f0d813355e3b0b2471b308e1c7278c0 (diff)
RemoteLinux: Show the real error on device test failureHEADmaster
- If the ssh process exited, e.g. due to connection timeout or authentification failure, report that instead of a misleading message about some tool like cat. - Drop the -q option from the command line, so ssh will say what went wrong. Fixes: QTCREATORBUG-32933 Change-Id: I23b83f1af380bcfaf0e5957750be2cef0ef1590f Reviewed-by: hjk <[email protected]>
-rw-r--r--src/libs/utils/deviceshell.cpp13
-rw-r--r--src/plugins/remotelinux/linuxdevice.cpp1
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libs/utils/deviceshell.cpp b/src/libs/utils/deviceshell.cpp
index 9da49f00582..59a239c03f9 100644
--- a/src/libs/utils/deviceshell.cpp
+++ b/src/libs/utils/deviceshell.cpp
@@ -216,12 +216,9 @@ Result<> DeviceShell::start()
} else if (m_shellProcess->isRunning()) {
m_shellProcess->kill();
}
- const QString stdErr = m_shellProcess->readAllStandardError();
m_shellProcess.reset();
-
- return ResultError(Tr::tr("Failed to install shell script: %1\n%2")
- .arg(installResult.error())
- .arg(stdErr));
+ return ResultError(Tr::tr("Failed to install shell script: %1")
+ .arg(installResult.error()));
},
Qt::BlockingQueuedConnection,
&result);
@@ -235,6 +232,10 @@ Result<QByteArray> DeviceShell::checkCommand(const QByteArray &command)
m_shellProcess->writeRaw(checkCmd);
if (!m_shellProcess->waitForReadyRead()) {
+ if (!m_shellProcess->isRunning()) {
+ return ResultError(
+ m_shellProcess->exitMessage(Process::FailureMessageFormat::WithStdErr));
+ }
return ResultError(
Tr::tr("Timeout while trying to check for %1.").arg(QString::fromUtf8(command)));
}
@@ -292,7 +293,7 @@ Result<> DeviceShell::installShellScript()
Tr::tr("Failed to install shell script: %1").arg(QString::fromUtf8(out)));
}
if (!out.isEmpty()) {
- qCWarning(deviceShellLog)
+ qCDebug(deviceShellLog)
<< "Unexpected output while installing device shell script:" << out;
}
}
diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp
index 51d67fd41d6..6f73acda79f 100644
--- a/src/plugins/remotelinux/linuxdevice.cpp
+++ b/src/plugins/remotelinux/linuxdevice.cpp
@@ -909,7 +909,6 @@ public:
const FilePath sshPath = SshSettings::sshFilePath();
CommandLine cmd { sshPath };
- cmd.addArg("-q");
cmd.addArgs(m_displaylessSshParameters.connectionOptions(sshPath)
<< m_displaylessSshParameters.host());
cmd.addArg("/bin/sh");