* [PATCH 1/2] test/py: Use the correct fixture name in exception handler
@ 2025-05-29 14:14 Simon Glass
2025-05-29 14:14 ` [PATCH 2/2] test/py: Correct handling of exceptions Simon Glass
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Simon Glass @ 2025-05-29 14:14 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Simon Glass, Heinrich Schuchardt, Jerome Forissier,
Mattijs Korpershoek, Stephen Warren, Stephen Warren, Tom Rini
If a BootFail exception is thrown in a test, it is not handled
correctly. Use the correct fixture variable 'ubman_fix' to resolve this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: d9ed4b75add ("test/py: Drop u_boot_ prefix on test files")
---
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 6c3ac67979a..eec0b5488e4 100644
--- a/test/py/conftest.py
+++ b/test/py/conftest.py
@@ -514,7 +514,7 @@ def ubman(request):
handle_exception(ubconfig, ubman_fix, log, err, 'Lab timeout', True)
except BootFail as err:
handle_exception(ubconfig, ubman_fix, log, err, 'Boot fail', True,
- ubman.get_spawn_output())
+ ubman_fix.get_spawn_output())
except Unexpected:
handle_exception(ubconfig, ubman_fix, log, err, 'Unexpected test output',
False)
--
2.43.0
base-commit: 2f3766949bbea7aa5a472157561d387fd94205d2
branch: py-fix
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] test/py: Correct handling of exceptions
2025-05-29 14:14 [PATCH 1/2] test/py: Use the correct fixture name in exception handler Simon Glass
@ 2025-05-29 14:14 ` Simon Glass
2025-05-30 7:10 ` Mattijs Korpershoek
2025-05-30 7:09 ` [PATCH 1/2] test/py: Use the correct fixture name in exception handler Mattijs Korpershoek
2025-06-12 19:17 ` Tom Rini
2 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2025-05-29 14:14 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Simon Glass, Heinrich Schuchardt, Jerome Forissier,
Mattijs Korpershoek, Stephen Warren, Stephen Warren, Tom Rini
If an Unexpected exception is thrown in a test, an undefined variable
error is reported. Fix this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 85d7dae377a ("test: Detect dead connections")
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] test/py: Use the correct fixture name in exception handler
2025-05-29 14:14 [PATCH 1/2] test/py: Use the correct fixture name in exception handler Simon Glass
2025-05-29 14:14 ` [PATCH 2/2] test/py: Correct handling of exceptions Simon Glass
@ 2025-05-30 7:09 ` Mattijs Korpershoek
2025-06-12 19:17 ` Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Mattijs Korpershoek @ 2025-05-30 7:09 UTC (permalink / raw)
To: Simon Glass, U-Boot Mailing List
Cc: Simon Glass, Heinrich Schuchardt, Jerome Forissier,
Mattijs Korpershoek, Stephen Warren, Stephen Warren, Tom Rini
Hi Simon,
Thank you for the patch.
On jeu., mai 29, 2025 at 08:14, Simon Glass <sjg@chromium.org> wrote:
> If a BootFail exception is thrown in a test, it is not handled
> correctly. Use the correct fixture variable 'ubman_fix' to resolve this.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Fixes: d9ed4b75add ("test/py: Drop u_boot_ prefix on test files")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@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 6c3ac67979a..eec0b5488e4 100644
> --- a/test/py/conftest.py
> +++ b/test/py/conftest.py
> @@ -514,7 +514,7 @@ def ubman(request):
> handle_exception(ubconfig, ubman_fix, log, err, 'Lab timeout', True)
> except BootFail as err:
> handle_exception(ubconfig, ubman_fix, log, err, 'Boot fail', True,
> - ubman.get_spawn_output())
> + ubman_fix.get_spawn_output())
> except Unexpected:
> handle_exception(ubconfig, ubman_fix, log, err, 'Unexpected test output',
> False)
> --
> 2.43.0
>
> base-commit: 2f3766949bbea7aa5a472157561d387fd94205d2
> branch: py-fix
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] test/py: Correct handling of exceptions
2025-05-29 14:14 ` [PATCH 2/2] test/py: Correct handling of exceptions Simon Glass
@ 2025-05-30 7:10 ` Mattijs Korpershoek
0 siblings, 0 replies; 5+ messages in thread
From: Mattijs Korpershoek @ 2025-05-30 7:10 UTC (permalink / raw)
To: Simon Glass, U-Boot Mailing List
Cc: Simon Glass, Heinrich Schuchardt, Jerome Forissier,
Mattijs Korpershoek, Stephen Warren, Stephen Warren, Tom Rini
Hi Simon,
Thank you for the patch.
On jeu., mai 29, 2025 at 08:14, Simon Glass <sjg@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@chromium.org>
> Fixes: 85d7dae377a ("test: Detect dead connections")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] test/py: Use the correct fixture name in exception handler
2025-05-29 14:14 [PATCH 1/2] test/py: Use the correct fixture name in exception handler Simon Glass
2025-05-29 14:14 ` [PATCH 2/2] test/py: Correct handling of exceptions Simon Glass
2025-05-30 7:09 ` [PATCH 1/2] test/py: Use the correct fixture name in exception handler Mattijs Korpershoek
@ 2025-06-12 19:17 ` Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2025-06-12 19:17 UTC (permalink / raw)
To: U-Boot Mailing List, Simon Glass
Cc: Heinrich Schuchardt, Jerome Forissier, Mattijs Korpershoek,
No generic patch CC mail please, No generic patch CC mail please
On Thu, 29 May 2025 08:14:51 -0600, Simon Glass wrote:
> If a BootFail exception is thrown in a test, it is not handled
> correctly. Use the correct fixture variable 'ubman_fix' to resolve this.
>
>
Applied to u-boot/master, thanks!
[1/2] test/py: Use the correct fixture name in exception handler
commit: ef82e45c2ef5278493576708d6aafd686ba77af9
[2/2] test/py: Correct handling of exceptions
commit: 2ab10ed2399b0c1c790733884935c94ad65aa2a8
--
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-06-12 19:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-29 14:14 [PATCH 1/2] test/py: Use the correct fixture name in exception handler Simon Glass
2025-05-29 14:14 ` [PATCH 2/2] test/py: Correct handling of exceptions Simon Glass
2025-05-30 7:10 ` Mattijs Korpershoek
2025-05-30 7:09 ` [PATCH 1/2] test/py: Use the correct fixture name in exception handler Mattijs Korpershoek
2025-06-12 19:17 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox