From: Ross Burton <Ross.Burton@arm.com>
To: "mathieu.dubois-briand@bootlin.com" <mathieu.dubois-briand@bootlin.com>
Cc: "openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [OE-core] [PATCH 2/4] oeqa: runtime: Ignore SSH errors during setup and tear down
Date: Thu, 9 Oct 2025 14:26:36 +0000 [thread overview]
Message-ID: <DC955EFB-988F-4BCA-91C9-8205286AA5D7@arm.com> (raw)
In-Reply-To: <20251007-mathieu-ssh-fails-v1-2-a6affee3571b@bootlin.com>
On 7 Oct 2025, at 18:38, Mathieu Dubois-Briand via lists.openembedded.org <mathieu.dubois-briand=bootlin.com@lists.openembedded.org> wrote:
>
> Tests using SSH will fail when no SSH server is present on the target.
> These tests are disabled in these cases, by being marked with a
> dependency on ssh.SSHTest.test_ssh, which in turns has a dependency on
> having either dropbear or openssh-sshd in the image.
>
> But setUpClass() and tearDownClass() functions are always executed, even
> on tests failing the dependency checks, leading to unexpected failed
> tests.
Well that’s just silly. I wonder if OEHasPackage() works on the class scope too and does actually avoid doing the setup/teardown?
However, this does demonstrate that doing non-trivial setup/teardown is a bad idea in test cases, and copying files to the target is definitely non-trivial.
I suggest merging all of the logrotate tests and setup/teardown into a single test that uses finally: to cleanup, and just removing the teardown from the weston test.
Cheers,
Ross
next prev parent reply other threads:[~2025-10-09 14:27 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 ` Ross Burton [this message]
2025-10-13 11:02 ` [OE-core] " Mathieu Dubois-Briand
2025-10-07 17:38 ` [PATCH 3/4] oeqa: postactions: Ignore SSH errors Mathieu Dubois-Briand
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=DC955EFB-988F-4BCA-91C9-8205286AA5D7@arm.com \
--to=ross.burton@arm.com \
--cc=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