From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: Re: [PATCH] testsuite: Save ssh command stdout/stderr in case of failure
Date: Wed, 07 Aug 2024 17:36:37 +0300 [thread overview]
Message-ID: <ee68f45d2d7201ebf9c75d2889c944b0a2d066e5.camel@ilbers.de> (raw)
In-Reply-To: <20240805070616.18365-1-ubely@ilbers.de>
On Mon, 2024-08-05 at 10:06 +0300, Uladzimir Bely wrote:
> When ssh command returns non-zero code we stop test execution via
> "self.fail" and thus loose stdout and stderr that ssh_start/vm_start
> are expected to return.
>
> Save both stdout and stderr to the whiteboard file.
>
> Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
> ---
> testsuite/cibuilder.py | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
> index 35af3d9c..3f77cd42 100755
> --- a/testsuite/cibuilder.py
> +++ b/testsuite/cibuilder.py
> @@ -474,6 +474,7 @@ class CIBuilder(Test):
> rc, stdout, stderr = self.remote_run(cmd, script)
>
> if rc != 0:
> + self.whiteboard +=
> f'stdout:\n{stdout}\n\nstderr:\n{stderr}\n'
> self.fail(f"Failed with rc={rc}")
>
> return stdout, stderr
> @@ -689,6 +690,7 @@ class CIBuilder(Test):
> if rc != 0:
> if not keep:
> self.vm_turn_off(vm)
> + self.whiteboard +=
> f'stdout:\n{stdout}\n\nstderr:\n{stderr}\n'
> self.fail("Failed to run test over ssh")
> else:
> multiconfig = 'mc:qemu' + arch + '-' + distro + ':' +
> image
> --
> 2.44.2
>
Applied to next.
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/ee68f45d2d7201ebf9c75d2889c944b0a2d066e5.camel%40ilbers.de.
prev parent reply other threads:[~2024-08-07 14:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 7:06 Uladzimir Bely
2024-08-07 14:36 ` Uladzimir Bely [this message]
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=ee68f45d2d7201ebf9c75d2889c944b0a2d066e5.camel@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.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