From 0efb8d33460c29c06779669d80b0f60899724bd2 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 10 Jun 2022 15:25:28 +0200 Subject: [PATCH] GenericLinuxDeviceTester: Don't continue testing when echo fails Change-Id: I4b21e1b914816271d59f9001122aedf1eda342dc Reviewed-by: Eike Ziller --- src/plugins/remotelinux/linuxdevicetester.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/plugins/remotelinux/linuxdevicetester.cpp b/src/plugins/remotelinux/linuxdevicetester.cpp index 4c7ac4302b5..869ac90b3e8 100644 --- a/src/plugins/remotelinux/linuxdevicetester.cpp +++ b/src/plugins/remotelinux/linuxdevicetester.cpp @@ -134,14 +134,15 @@ void GenericLinuxDeviceTester::handleEchoDone() else emit errorMessage(tr("echo failed.") + '\n'); setFinished(TestFailure); - } else { - const QString reply = d->echoProcess.stdOut().chopped(1); // Remove trailing \n - if (reply != s_echoContents) - emit errorMessage(tr("Device replied to echo with unexpected contents.") + '\n'); - else - emit progressMessage(tr("Device replied to echo with expected contents.") + '\n'); + return; } + const QString reply = d->echoProcess.stdOut().chopped(1); // Remove trailing \n + if (reply != s_echoContents) + emit errorMessage(tr("Device replied to echo with unexpected contents.") + '\n'); + else + emit progressMessage(tr("Device replied to echo with expected contents.") + '\n'); + testUname(); }