On Sun, Nov 23, 2025 at 12:52:55AM +0100, Heinrich Schuchardt wrote:
> On 11/22/25 17:23, Tom Rini wrote:
> > On Sun, Nov 09, 2025 at 11:10:02AM +0100, Heinrich Schuchardt wrote:
> > 
> > > The `fdt apply` sub-command is only available if CONFIG_OF_LIBFDT_OVERLAY
> > > is enabled.
> > > 
> > > Signed-off-by: Heinrich Schuchardt <[email protected]>
> > > ---
> > >   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;
> > > +
> > >           /* Create base DT with __symbols__ node */
> > >           ut_assertok(fdt_create(fdt, sizeof(fdt)));
> > >           ut_assertok(fdt_finish_reservemap(fdt));
> > 
> > So, this is interesting. As part of merging this, I see that on
> > qemu_arm64 for example:
> >                 u-boot: add: 0/0, grow: 4/-4 bytes: 284/-9691 (-9407)
> >                   function                                   old     new   
> > delta
> >                   print_hexdump_line                         472     556    
> >  +84
> >                   fdt_test_move                              568     652    
> >  +84
> >                   print_do_hex_dump                         1704    1764    
> >  +60
> >                   print_display_buffer                      1736    1792    
> >  +56
> >                   static.__func__                           5670    5655    
> >  -15
> >                   bdinfo_test_all                           3064    2884    
> > -180
> >                   fdt_test_chosen                           1496     516    
> > -980
> >                   fdt_test_apply                            8524       8   
> > -8516
> > 
> > So we're as expected shrinking fdt_test_apply with a build time
> > optimization. But we've been building and running this test as can be
> > seen in older pipelines and their published artifacts. Should it not
> > have been a failing test? Did it fail for you somewhere or was this
> > found by inspection?
> > 
> 
> Hello Tom,
> 
> The target of the series was to test QFW and ACPI passthrough in the CI
> using qemu-riscv64_smode_acpi_defconfig.
> 
> fdt_test_apply and other tests failed on qemu-riscv64_smode_acpi_defconfig.
> This is why I touched the tests.
> 
> CONFIG_OF_LIBFDT_OVERLAY is not enabled on qemu_arm64_defconfig in
> origin/master. Without this setting the `fdt apply` sub-command is not
> available. So the test would not pass on this board.
> 
> But running `fdt ut` for qemu_arm64_defconfig shows:
> 
> => ut fdt
> Running 19 fdt tests
> Test: addr: fdt.c
> Skipping: Console recording disabled
> Test: addr_resize: fdt.c
> Skipping: Console recording disabled
> Test: apply: fdt.c
> Skipping: Console recording disabled
> Test: bootcpu: fdt.c
> 
> The fdt_test_apply_test was compiled but is always skipped.
> 
> We should enable console recording on boards where we want proper testing.
> 
> Furthermore we should change test/py/tests/test_ut.py to show skipped C
> tests by calling pytest.skip(), see
> 
> [PATCH 1/1] test: Let pytest indicate skipped C unit tests
> https://lore.kernel.org/u-boot/[email protected]/T/#u

Thanks for looking in to this more, your patches look like the right
direction to me!

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to