Hi Rob, On Tue, Aug 1, 2023 at 10:50 PM Rob Herring <robh+dt@xxxxxxxxxx> wrote: > On Fri, Jul 28, 2023 at 2:50 AM Geert Uytterhoeven > <geert+renesas@xxxxxxxxx> wrote: > > When of_overlay_fdt_apply() fails, the changeset may be partially > > applied, and the caller is still expected to call of_overlay_remove() to > > clean up this partial state. However, overlay_17 is the only test that > > takes care of cleaning up after an (expected) failure. > > > > Instead of adding cleanup code to each individual test, extend > > overlay_info with the optional expected return value of > > of_overlay_remove(), and handle cleanup in the overlay_data_apply() > > helper. While at it, simplify the end marker in the overlay_info table. > > > > Update the expected error output for errors during the newly cleanup. > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > > --- > > v2: > > - No changes. > > --- a/drivers/of/unittest.c > > +++ b/drivers/of/unittest.c > > @@ -3689,9 +3715,19 @@ static __init void of_unittest_overlay_high_level(void) > > unittest(overlay_data_apply("overlay_bad_phandle", NULL), > > "Adding overlay 'overlay_bad_phandle' failed\n"); > > > > + EXPECT_BEGIN(KERN_ERR, > > + "OF: changeset: remove_property failed @/testcase-data-2/substation@100/hvac-medium-2/name"); > > + EXPECT_BEGIN(KERN_ERR, > > + "OF: resolver: overlay phandle fixup failed: -22"); > > + > > unittest(overlay_data_apply("overlay_bad_symbol", NULL), > > "Adding overlay 'overlay_bad_symbol' failed\n"); > > > > + EXPECT_END(KERN_ERR, > > + "OF: resolver: overlay phandle fixup failed: -22"); > > I'm seeing "OF: Error reverting changeset (-19)" here instead. > Cut-n-paste error? Indeed. Thanks for pointing this out! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds