From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH v6 08/12] efi_loader: Disable ANSI output for tests
Date: Tue, 1 Oct 2024 04:34:54 +0200 [thread overview]
Message-ID: <79d98f61-7659-47a3-938f-1eb79f402edf@gmx.de> (raw)
In-Reply-To: <20241001002442.GC4737@bill-the-cat>
On 10/1/24 02:24, Tom Rini wrote:
> On Tue, Oct 01, 2024 at 01:38:56AM +0200, Heinrich Schuchardt wrote:
>> On 26.09.24 23:59, Simon Glass wrote:
>>> We don't want ANSI characters 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 ANSI characters not be sent.
>>>
>>> Add a proper function comment while we are here, to encourage others.
>>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>
>> Please, consider prior review before resubmitting patches.
>>
>> As responded to all prior submissions:
>>
>> We want to test the code running on actual machines.
>> We don't want to have sandbox code everywhere.
>>
>> I cannot see any test that is not passing due to the current behavior.
>
> The pytests for the EFI selftests are unreliable for me, on Raspberry Pi
> 3, more often in 32bit mode than 64bit mode, but I feel like I see it
> there too. And when they fail, the console log is full of ANSI escape
> sequences. Is this specific test a test you run regularly on real
> hardware?
>
It is not only the EFI test but also pytest adding color to the console
output.
When I download a raw LOG and display it with
wget
https://source.denx.de/u-boot/custodians/u-boot-efi/-/jobs/904222/raw
less -r raw
I see the correct colored output. Same when I run
cat raw
If you want to strip ANSI codes from a file, you can use ansi2txt from
Ubuntu package colorized logs.
ansi2txt < raw > flat.log
I typically run UEFI tests interactively on the sandbox, virtual
machines, and on actual hardware.
lib/efi_selftest/efi_selftest_textoutput.c is specifically used to print
out all combinations of fore- and background colors.
Furthermore color is used in /lib/efi_selftest/ for:
* start of test
* success, warning, error
This coloring is not functionally necessary but for my taste makes the
output easier to read.
test/py/tests/test_efi_selftest.py just has no problems with the color
output when running:
if u_boot_console.p.expect(['Summary: 0 failures', 'Press any key']):
While color output in UEFI unit tests as said is not functionally
necessary in most tests, the current patch tries to suppress ANSI output
which is functionally necessary and which probably should be tested for.
Best regards
Heinrich
next prev parent reply other threads:[~2024-10-01 2:35 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 21:59 [PATCH v6 00/12] efi: Add a test for EFI bootmeth Simon Glass
2024-09-26 21:59 ` [PATCH v6 01/12] efi_loader: Rename and move CMD_BOOTEFI_HELLO_COMPILE Simon Glass
2024-09-26 21:59 ` [PATCH v6 02/12] efi: arm: x86: riscv: Drop crt0/relocal extra- rules Simon Glass
2024-09-26 21:59 ` [PATCH v6 03/12] efi_loader: Shorten the app rules Simon Glass
2024-09-26 21:59 ` [PATCH v6 04/12] efi_loader: Shorten the app rules further Simon Glass
2024-09-26 21:59 ` [PATCH v6 05/12] efi_loader: Show the vendor in helloworld Simon Glass
2024-09-27 11:59 ` Ilias Apalodimas
2024-09-27 12:33 ` Simon Glass
2024-09-26 21:59 ` [PATCH v6 06/12] efi: Use the same filename for all sandbox builds Simon Glass
2024-09-30 23:18 ` Heinrich Schuchardt
2024-10-17 23:23 ` Simon Glass
2024-10-18 0:17 ` Tom Rini
2024-10-18 3:05 ` Simon Glass
2024-10-18 3:40 ` Heinrich Schuchardt
2024-10-18 15:02 ` Simon Glass
2024-10-18 16:51 ` Heinrich Schuchardt
2024-09-26 21:59 ` [PATCH v6 07/12] bootstd: Add debugging for efi bootmeth Simon Glass
2024-09-26 21:59 ` [PATCH v6 08/12] efi_loader: Disable ANSI output for tests Simon Glass
2024-09-30 23:38 ` Heinrich Schuchardt
2024-10-01 0:24 ` Tom Rini
2024-10-01 2:34 ` Heinrich Schuchardt [this message]
2024-10-01 18:02 ` Tom Rini
2024-10-01 22:18 ` Heinrich Schuchardt
2024-10-01 23:14 ` Tom Rini
2024-10-11 22:16 ` Simon Glass
2024-10-11 22:28 ` Tom Rini
2024-10-13 19:33 ` Simon Glass
2024-10-14 2:25 ` Tom Rini
2024-10-14 19:13 ` Simon Glass
2024-10-01 7:49 ` Peter Robinson
2024-10-01 14:28 ` Tom Rini
2024-10-11 22:18 ` Simon Glass
2024-10-11 22:54 ` Tom Rini
2024-10-11 23:45 ` Heinrich Schuchardt
2024-10-12 0:36 ` Tom Rini
-- strict thread matches above, loose matches on Subject: below --
2024-09-26 22:02 Simon Glass
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=79d98f61-7659-47a3-938f-1eb79f402edf@gmx.de \
--to=xypron.glpk@gmx.de \
--cc=ilias.apalodimas@linaro.org \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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.