public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
To: openembedded-core@lists.openembedded.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	 Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Subject: [PATCH 3/4] oeqa: postactions: Ignore SSH errors
Date: Tue, 07 Oct 2025 19:38:08 +0200	[thread overview]
Message-ID: <20251007-mathieu-ssh-fails-v1-3-a6affee3571b@bootlin.com> (raw)
In-Reply-To: <20251007-mathieu-ssh-fails-v1-0-a6affee3571b@bootlin.com>

Postactions are not part of the tests but allow to retrieve useful data
from the target. They try to do this using SSH, but this can fail when
no SSH server is present on the target. Ignore these fails.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
 meta/lib/oeqa/utils/postactions.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/utils/postactions.py b/meta/lib/oeqa/utils/postactions.py
index c69481db6cbf29b5e3f267170151d85e73baa0d0..7b967edaad0f0a418347f18a7fa85073672ceeff 100644
--- a/meta/lib/oeqa/utils/postactions.py
+++ b/meta/lib/oeqa/utils/postactions.py
@@ -22,7 +22,7 @@ from oeqa.utils import get_artefact_dir
 def get_target_disk_usage(d, tc, artifacts_list, outputdir):
     output_file = os.path.join(outputdir, "target_disk_usage.txt")
     try:
-        (status, output) = tc.target.run('df -h')
+        (status, output) = tc.target.run('df -h', ignore_ssh_fails=True)
         with open(output_file, 'w') as f:
             f.write(output)
             f.write("\n")
@@ -49,7 +49,7 @@ def get_artifacts_list(target, raw_list):
     for raw_path in raw_list.split():
         cmd = f"for p in {raw_path}; do if [ -e $p ]; then echo $p; fi; done"
         try:
-            status, output = target.run(cmd)
+            status, output = target.run(cmd, ignore_ssh_fails=True)
             if status != 0 or not output:
                 raise Exception()
             result += output.split()

-- 
2.47.3



  parent reply	other threads:[~2025-10-07 17:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-07 17:38 [PATCH 0/4] oeqa: target: ssh: log SSH errors during tests Mathieu Dubois-Briand
2025-10-07 17:38 ` [PATCH 1/4] oeqa: target: ssh: Fail on SSH error even when errors are ignored Mathieu Dubois-Briand
2025-10-07 17:38 ` [PATCH 2/4] oeqa: runtime: Ignore SSH errors during setup and tear down Mathieu Dubois-Briand
2025-10-09 14:26   ` [OE-core] " Ross Burton
2025-10-13 11:02     ` Mathieu Dubois-Briand
2025-10-07 17:38 ` Mathieu Dubois-Briand [this message]
2025-10-07 17:38 ` [PATCH 4/4] oeqa: runtime: ssh: Manage any SSH failure locally Mathieu Dubois-Briand

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=20251007-mathieu-ssh-fails-v1-3-a6affee3571b@bootlin.com \
    --to=mathieu.dubois-briand@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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