[PATCH 3/6] binman: test: Capture output from tests with warnings
Simon Glass
sjg at chromium.org
Fri Feb 27 00:44:49 CET 2026
Hi Quentin,
On Thu, 26 Feb 2026 at 09:44, Quentin Schulz <quentin.schulz at cherry.de> wrote:
>
> Hi Simon,
>
> On 2/25/26 11:50 PM, Simon Glass wrote:
> > From: Simon Glass <simon.glass at canonical.com>
> >
> > Tests are supposed to run silently and capture any output produced.
> >
>
> Fair enough. But how about making _DoTestFile() and other various
> function calls actually eat stdout/stderr by default such that test
> implementers don't have to remember doing that?
>
> We can always return stderr, stdout to the caller of _DoTestFile() if we
> wanted to be able to parse the output.
>
> What do you think?
It's actually quite painful to develop tests when output is captured.
You cannot print state or see errors. So I try to capture it for the
smallest possible code area.
I did actually add a 'patman test -N' flag to help with this but have
not plumbed it into binman. I'm not sure if that would make the tool
even harder to develop in.
>
> > Fix testRemoveTemplate() so that the message about the missing openssl
> > is captured, along with the invalid-images message.
> >
> > Fix testNxpImx9Image() as well, since it is expected that container.img
> > and bl31.bin are missing.
> >
>
> Tested-by: Quentin Schulz <quentin.schulz at cherry.de>
Regards,
Simon
More information about the U-Boot
mailing list