[PATCH 2/2] test/py: Correct handling of exceptions
Mattijs Korpershoek
mkorpershoek at kernel.org
Fri May 30 09:10:23 CEST 2025
Hi Simon,
Thank you for the patch.
On jeu., mai 29, 2025 at 08:14, Simon Glass <sjg at chromium.org> wrote:
> If an Unexpected exception is thrown in a test, an undefined variable
> error is reported. Fix this.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> Fixes: 85d7dae377a ("test: Detect dead connections")
Reviewed-by: Mattijs Korpershoek <mkorpershoek at kernel.org>
> ---
>
> test/py/conftest.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/py/conftest.py b/test/py/conftest.py
> index eec0b5488e4..8ce680a92a0 100644
> --- a/test/py/conftest.py
> +++ b/test/py/conftest.py
> @@ -515,7 +515,7 @@ def ubman(request):
> except BootFail as err:
> handle_exception(ubconfig, ubman_fix, log, err, 'Boot fail', True,
> ubman_fix.get_spawn_output())
> - except Unexpected:
> + except Unexpected as err:
> handle_exception(ubconfig, ubman_fix, log, err, 'Unexpected test output',
> False)
> return ubman_fix
> --
> 2.43.0
>
> base-commit: 2f3766949bbea7aa5a472157561d387fd94205d2
> branch: py-fix
More information about the U-Boot
mailing list