[PATCH] bdinfo: Correct use of assertions

Simon Glass sjg at chromium.org
Wed Jul 12 02:24:14 CEST 2023


Hi Marek,

On Tue, 11 Jul 2023 at 17:10, Marek Vasut <marex at denx.de> wrote:
>
> On 7/12/23 00:51, Simon Glass wrote:
> > This test was written for the incorrect use of assertions. Update it to
> > build with the previous approach, where tests fail at the first
> > assertion.
>
> So basically ut_assert_nextline() does not automatically bail, you have
> to make it expand to return -ERRNO and check for that errno again with
> ut_assertok() at the callsite ?

Yes, or any non-zero value. The call stack unwinds since each function
that fails returns a non-zero value.

Regards,
Simon


More information about the U-Boot mailing list