From: Thomas Huth <thuth@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org,
qemu-s390x@nongnu.org, qemu-riscv@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [RFC PATCH] tests/functional: Move tests into architecture specific folders
Date: Fri, 11 Jul 2025 13:51:09 +0200 [thread overview]
Message-ID: <cf687af2-fd4e-4fbd-9dcb-824b980795fd@redhat.com> (raw)
In-Reply-To: <aG_TSITe2VhMfpA9@redhat.com>
On 10/07/2025 16.50, Daniel P. Berrangé wrote:
> On Thu, Jul 10, 2025 at 11:42:51AM +0200, Thomas Huth wrote:
>> This patch tackles two issues. First, the tests/functional folder has
>> become quite crowded already, some restructuring would be helpful here.
>> Second, we currently encode the target architecture twice in the test
>> names since a lot of the test file names contain the target, too.
>> This contributes to the very long output lines when running "make
>> check-functional".
>>
>> So let's move the individual test files to target specific folders now.
>> Then we can drop the target from the file name (and thus from the test
>> name).
>
>> ---
>> Note: Marked as RFC since I'm not that happy about the symlinks yet ...
>> if someone has a better idea, please let me know!
>> Also the update to the MAINTAINERS file is still missing - I'll add
>> that once we agreed on whether this patch is a good idea or not.
>
> FWIW, I don't find the symlinks to be a problem, but if they bother you,
> we could probably just have a trivial subclass.
>
>
> from ../generic/test_migration import MigrationTest
>
> class MigrateTestX86(MigrationTest):
> pass
>
>
> Unless pytest runner really needs the 'test_XXX' methods to be only on
> the leaf class, not a parent, in order to enumerate test cases ?
I played a little bit with this now, and it seems to be worse: If I keep the
test_* methods in the parent class, each test is now executed twice, once
for the leaf class, and once for the parent class :-/
I guess I could rename the functions in the parent class to use a different
prefix ("do_test_...) and then add test_... functions to the leaf classes
that call the ones from the parent, but that's quite a bit cumbersome...
I'll ponder for it a little bit longer, but if you have any other ideas,
that's welcome, too, of course!
Thomas
next prev parent reply other threads:[~2025-07-11 12:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 9:42 [RFC PATCH] tests/functional: Move tests into architecture specific folders Thomas Huth
2025-07-10 9:59 ` Manos Pitsidianakis
2025-07-10 12:18 ` Thomas Huth
2025-07-10 14:50 ` Daniel P. Berrangé
2025-07-11 11:51 ` Thomas Huth [this message]
2025-07-10 15:51 ` Pierrick Bouvier
2025-07-11 11:55 ` Thomas Huth
2025-07-11 16:15 ` Pierrick Bouvier
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=cf687af2-fd4e-4fbd-9dcb-824b980795fd@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=qemu-s390x@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).