[PATCH RESEND 1/9] test: fdt_test_apply requires CONFIG_OF_LIBFDT_OVERLAY
Tom Rini
trini at konsulko.com
Tue Nov 11 22:26:21 CET 2025
On Tue, Nov 11, 2025 at 10:12:58PM +0100, Heinrich Schuchardt wrote:
> On 11/11/25 09:29, Ilias Apalodimas wrote:
> > Hi Heinrich
> >
> > On Sun, 9 Nov 2025 at 12:10, Heinrich Schuchardt
> > <heinrich.schuchardt at canonical.com> wrote:
> > >
> > > The `fdt apply` sub-command is only available if CONFIG_OF_LIBFDT_OVERLAY
> > > is enabled.
> > >
> > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> > > ---
> > > test/cmd/fdt.c | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
> > > index 96a8488e172..a36f2dcdda8 100644
> > > --- a/test/cmd/fdt.c
> > > +++ b/test/cmd/fdt.c
> > > @@ -1319,6 +1319,9 @@ static int fdt_test_apply(struct unit_test_state *uts)
> > > char fdt[8192], fdto[8192];
> > > ulong addr, addro;
> > >
> > > + if (!IS_ENABLED(CONFIG_OF_LIBFDT_OVERLAY))
> > > + return -EAGAIN;
> >
> > The asserts return CMD_RET_FAILURE on failures. Should't we use the same here?
>
> There is nothing wrong in CONFIG_OF_LIBFDT_OVERLAY=n. This is not a failure.
>
> -EAGAIN signals a skipped test.
> Look for EAGAIN in test/test-main.c.
>
> We should describe this in doc/develop/tests_writing.rst.
We should document it, yes. I don't have a strong preference over using
this rather than just not compiling the test in to start with.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251111/70f5456d/attachment.sig>
More information about the U-Boot
mailing list