public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Enrico Jorns <ejo@pengutronix.de>
To: openembedded-core@lists.openembedded.org
Cc: yocto@pengutronix.de, ejo@pengutronix.de
Subject: [PATCH 07/10] oeqa/utils/qemurunner: replace hard-coded user 'root' in debug output
Date: Fri, 31 Mar 2023 12:26:19 +0200	[thread overview]
Message-ID: <20230331102622.1468385-8-ejo@pengutronix.de> (raw)
In-Reply-To: <20230331102622.1468385-1-ejo@pengutronix.de>

Since login user is configurable with boot_patterns['send_login_user'],
unconditionally using 'root' in the debug message can be confusing.

Also fix the debug message to say 'Logged in' instead of 'Logged'.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
---
 meta/lib/oeqa/utils/qemurunner.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 05385763ac..9d6fe4fe59 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -516,7 +516,7 @@ class QemuRunner:
             (status, output) = self.run_serial(self.boot_patterns['send_login_user'], raw=True, timeout=120)
             if re.search(self.boot_patterns['search_login_succeeded'], output):
                 self.logged = True
-                self.logger.debug("Logged as root in serial console")
+                self.logger.debug("Logged in as %s in serial console" % self.boot_patterns['send_login_user'].replace("\n", ""))
                 if netconf:
                     # configure guest networking
                     cmd = "ifconfig eth0 %s netmask %s up\n" % (self.ip, self.netmask)
@@ -527,7 +527,7 @@ class QemuRunner:
                         self.logger.debug("Couldn't configure guest networking")
             else:
                 self.logger.warning("Couldn't login into serial console"
-                            " as root using blank password")
+                            " as %s using blank password" % self.boot_patterns['send_login_user'].replace("\n", ""))
                 self.logger.warning("The output:\n%s" % output)
         except:
             self.logger.warning("Serial console failed while trying to login")
-- 
2.39.2



  parent reply	other threads:[~2023-03-31 10:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31 10:26 [PATCH 00/10] oeqa: some minor fixes and cleanups Enrico Jorns
2023-03-31 10:26 ` [PATCH 01/10] oeqa/selftest/cases/runqemu: update imports Enrico Jorns
2023-03-31 10:26 ` [PATCH 02/10] oeqa/targetcontrol: fix misspelled RuntimeError Enrico Jorns
2023-03-31 10:26 ` [PATCH 03/10] oeqa/targetcontrol: do not set dump_host_cmds redundantly Enrico Jorns
2023-03-31 10:26 ` [PATCH 04/10] oeqa/targetcontrol: remove unused imports Enrico Jorns
2023-03-31 10:26 ` [PATCH 05/10] oeqa/utils/commands: fix usage of undefined EPIPE Enrico Jorns
2023-03-31 10:26 ` [PATCH 06/10] oeqa/utils/commands: remove unused imports Enrico Jorns
2023-03-31 10:26 ` Enrico Jorns [this message]
2023-03-31 10:26 ` [PATCH 08/10] oeqa/utils/qemurunner: limit precision of timing debugging output Enrico Jorns
2023-03-31 10:26 ` [PATCH 09/10] oeqa/utils/qemurunner: fix undefined TimeoutExpired Enrico Jorns
2023-03-31 10:26 ` [PATCH 10/10] oeqa: whitespace and indentation cleanups Enrico Jorns

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230331102622.1468385-8-ejo@pengutronix.de \
    --to=ejo@pengutronix.de \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=yocto@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox