From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: <ross.burton@arm.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: Mon, 13 Oct 2025 13:02:17 +0200 [thread overview]
Message-ID: <DDH56F91Q48V.1QO5IE5R5S5UH@bootlin.com> (raw)
In-Reply-To: <DC955EFB-988F-4BCA-91C9-8205286AA5D7@arm.com>
On Thu Oct 9, 2025 at 4:26 PM CEST, Ross Burton via lists.openembedded.org wrote:
> 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.
>
I am going to send some patches to clean this.
On the logrotate one, I choose to keep two separate tests, but we can
highly simplify this cleanup part and integrate that in the tests. On
weston, let's remove the log file before starting weston, so we can
still be sure the log is clean.
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-10-13 11:02 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 [this message]
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=DDH56F91Q48V.1QO5IE5R5S5UH@bootlin.com \
--to=mathieu.dubois-briand@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@arm.com \
--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