[PATCH v2] efi_loader: Disable ANSI output for tests

Simon Glass sjg at chromium.org
Sun May 11 16:17:57 CEST 2025


Hi Tom,

On Sat, 10 May 2025 at 17:05, Tom Rini <trini at konsulko.com> wrote:
>
> On Sat, May 10, 2025 at 02:54:38PM +0200, Simon Glass wrote:
> > We don't want ANSI escape-sequences written in tests since it is a pain
> > to check the output with ut_assert_nextline() et al.
> >
> > Provide a way to tests to request that these characters not be sent.
> >
> > Add a proper function comment while we are here, to encourage others.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> > Changes in v2:
> > - Use the term 'ANSI escape-sequences'
> >
> >  include/efi_loader.h         | 21 ++++++++++++++++++++-
> >  lib/efi_loader/efi_console.c | 26 +++++++++++++++++---------
> >  2 files changed, 37 insertions(+), 10 deletions(-)
>
> Since we keep coming back to this, here's the email where *why* there
> are ANSI escape sequences is explained along with Heinrich's suggestion
> of a fix for your concern:
> https://lore.kernel.org/all/ba46d2c2-38ac-411a-a48c-429295cf6efb@gmx.de/
>
> I assume that this, rather than repeating and reposting this solution
> again is still what Heinrich prefers.

We discussed this and Heinrich pointed me to [1], which does a similar
thing. So I believe he is OK with it now.

Regards,
Simon

[1] https://patchwork.ozlabs.org/project/uboot/patch/20250508183034.3439777-3-adriano.cordova@canonical.com/


More information about the U-Boot mailing list