All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Frank Rowand <frowand.list@gmail.com>,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2 07/13] of: unittest: Cleanup partially-applied overlays
Date: Wed, 23 Aug 2023 20:06:10 -0500	[thread overview]
Message-ID: <CAL_JsqKF2m6XjO5OY3B4EPKpSY1LYd7F-v6BeDPZNS-cCYyCHw@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdXrKzM5B6_=pQmnXb8wWHpkw0yjQnzwOfYwFqw4aCfGEA@mail.gmail.com>

On Mon, Aug 14, 2023 at 4:21 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Rob,
>
> On Tue, Aug 1, 2023 at 10:50 PM Rob Herring <robh+dt@kernel.org> wrote:
> > On Fri, Jul 28, 2023 at 2:50 AM Geert Uytterhoeven
> > <geert+renesas@glider.be> 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@glider.be>
> > > ---
> > > 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!

I've fixed this up along with the other EXPECTs that changed due to my
rework and applied the series.

Thanks,
Rob

  reply	other threads:[~2023-08-24  1:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28  8:50 [PATCH v2 00/13] of: overlay/unittest: Miscellaneous fixes and improvements Geert Uytterhoeven
2023-07-28  8:50 ` [PATCH v2 01/13] of: dynamic: Do not use "%pOF" while holding devtree_lock Geert Uytterhoeven
2023-07-28  8:50 ` [PATCH v2 02/13] of: overlay: Call of_changeset_init() early Geert Uytterhoeven
2023-07-28  8:50 ` [PATCH v2 03/13] of: unittest: Fix overlay type in apply/revert check Geert Uytterhoeven
2023-07-28  8:50 ` [PATCH v2 04/13] of: unittest: Restore indentation in overlay_bad_add_dup_prop test Geert Uytterhoeven
2023-07-28  8:50 ` [PATCH v2 05/13] of: unittest: Improve messages and comments in apply/revert checks Geert Uytterhoeven
2023-07-28  8:50 ` [PATCH v2 06/13] of: unittest: Merge of_unittest_apply{,_revert}_overlay_check() Geert Uytterhoeven
2023-07-28  8:50 ` [PATCH v2 07/13] of: unittest: Cleanup partially-applied overlays Geert Uytterhoeven
2023-08-01 20:50   ` Rob Herring
2023-08-14  9:21     ` Geert Uytterhoeven
2023-08-24  1:06       ` Rob Herring [this message]
2023-07-28  8:50 ` [PATCH v2 08/13] of: unittest: Add separators to of_unittest_overlay_high_level() Geert Uytterhoeven
2023-07-28  8:50 ` [PATCH v2 09/13] of: overlay: unittest: Add test for unresolved symbol Geert Uytterhoeven
2023-07-28  8:50 ` [PATCH v2 10/13] of: unittest-data: Convert remaining overlay DTS files to sugar syntax Geert Uytterhoeven
2023-07-28  8:50 ` [PATCH v2 11/13] of: unittest-data: Fix whitespace - blank lines Geert Uytterhoeven
2023-07-28  8:50 ` [PATCH v2 12/13] of: unittest-data: Fix whitespace - indentation Geert Uytterhoeven
2023-07-28  8:50 ` [PATCH v2 13/13] of: unittest-data: Fix whitespace - angular brackets Geert Uytterhoeven
2023-07-31 16:14 ` [PATCH v2 00/13] of: overlay/unittest: Miscellaneous fixes and improvements Rob Herring
2023-07-31 16:35   ` Rob Herring
2023-08-14 10:08     ` Geert Uytterhoeven

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=CAL_JsqKF2m6XjO5OY3B4EPKpSY1LYd7F-v6BeDPZNS-cCYyCHw@mail.gmail.com \
    --to=robh+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=pantelis.antoniou@konsulko.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.