public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Freihofer, Adrian" <adrian.freihofer@siemens.com>
To: "louis.rannou@non.se.com" <louis.rannou@non.se.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Cc: "pascal.eberhard@se.com" <pascal.eberhard@se.com>
Subject: Re: [PATCH 0/4] oeqa: selftest: split and create a library
Date: Mon, 5 Jan 2026 13:31:56 +0000	[thread overview]
Message-ID: <a94aecf89e168c1bcc713536a0d05dded75d0322.camel@siemens.com> (raw)
In-Reply-To: <20260105-fitimage-v1-0-e319258c4c4f@non.se.com>

Hi Louis

Thank you for this patches.

Patch 1 and patch 4 are fine.

Regarding patches 2 and 3: I expected the series to include an
additional change that adds sanity checks or otherwise delivers a clear
functional benefit. I’m not seeing that yet—so far it looks like
refactoring only.

For example, replacing:

    self.assertIn("Signature check OK", result.output)

with something like:

    def a_function(...):
        if "Signature check OK" not in result.output:
            self.logger.error("Signature verification failed (%s)",
result.output)
            return False
        return True

    self.assertTrue(a_function(...))

seems like a net regression for tests: assertIn is a single line,
produces clear, familiar assertion failures, and includes useful type-
aware output. The new approach adds more code, a custom log message
that may be harder to scan, and an extra assertTrue(...) failure that
is less specific than the original assertion.

Would a small abstraction help here while keeping standard unittest
semantics?

    class FitImageUtils:
        def __init__(self, assertion_provider):
            self._assertion_provider = assertion_provider

        def foo(self, ...):
            ...
            self._assertion_provider.assertIn(...)

Existing tests could use FitImageUtils(self), while non-test users
could pass an object providing equivalent assertion behavior or domain-
specific checks.

So I’m asking for two things:
- Can we keep using standard test assertions (e.g., `assertIn`,
`assertEqual`, etc.)?
- Can you share the patch in this series that adds the promised sanity
checks (or clarify where the concrete benefit is)? If the refactoring
isn’t free for the core/readability, we need to weigh its cost against
the intended gains.


Regards,
Adrian



On Mon, 2026-01-05 at 11:49 +0100, Louis Rannou via B4 Relay wrote:
> [You don't often get email from
> devnull+louis.rannou.non.se.com@kernel.org. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> Take some generic code from the fitimage selftest to create a library
> oeqa.utils.fitimage than can be reused in other tests (such as
> sanity).
> 
> The first commit is a fix for missing spaces and the last is adds
> support
> for rsa4096 signatures.
> 
> The two mains commit (2nd and 3rd) are organized to make the diff
> easier. The 2nd looks at every generic functions ands remove unittest
> relative code. While the 3rd makes the move from selftest to utils,
> keeping
> the same architecture.
> 
> Signed-off-by: Louis Rannou <louis.rannou@non.se.com>
> ---
> Louis Rannou (4):
>       oeqa/selftests: fitimage: fix missing spaces
>       oeqa/selftests: fitimage: prepare for split
>       oeqa: fitimage: split the selftest and create a generic library
>       oeqa/utils: fitimage: rsa4096 signatures
> 
>  meta/lib/oeqa/selftest/cases/fitimage.py | 864 +++------------------
> ---------
>  meta/lib/oeqa/utils/fitimage.py          | 883
> +++++++++++++++++++++++++++++++
>  2 files changed, 961 insertions(+), 786 deletions(-)
> ---
> base-commit: f55407185c63c895fa3c4fdf74e6e63ea9517a20
> change-id: 20260105-fitimage-609bc669abca
> 
> Best regards,
> --
> Louis Rannou <louis.rannou@non.se.com>
> 

      parent reply	other threads:[~2026-01-05 13:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 10:49 [PATCH 0/4] oeqa: selftest: split and create a library Louis Rannou via B4 Relay
2026-01-05 10:49 ` [PATCH 1/4] oeqa/selftests: fitimage: fix missing spaces Louis Rannou via B4 Relay
2026-01-05 10:49 ` [PATCH 2/4] oeqa/selftests: fitimage: prepare for split Louis Rannou via B4 Relay
2026-01-05 10:49 ` [PATCH 3/4] oeqa: fitimage: split the selftest and create a generic library Louis Rannou via B4 Relay
2026-01-05 10:49 ` [PATCH 4/4] oeqa/utils: fitimage: rsa4096 signatures Louis Rannou via B4 Relay
2026-01-05 13:31 ` Freihofer, Adrian [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=a94aecf89e168c1bcc713536a0d05dded75d0322.camel@siemens.com \
    --to=adrian.freihofer@siemens.com \
    --cc=louis.rannou@non.se.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=pascal.eberhard@se.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