[Concept,07/19] test: py: Restore default log format after test_log_format()

Message ID 20260314231618.338113-8-sjg@u-boot.org
State New
Headers
Series test: Fix pytest inter-test side effects |

Commit Message

Simon Glass March 14, 2026, 11:15 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

test_log_format() changes the log format to various values but does
not restore the default at the end. This can affect later tests that
depend on the default format.

Add 'log format default' at the end of the test to restore it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 test/py/tests/test_log.py | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/test/py/tests/test_log.py b/test/py/tests/test_log.py
index 3fc61e258a0..c1b7e1d6b1b 100644
--- a/test/py/tests/test_log.py
+++ b/test/py/tests/test_log.py
@@ -39,6 +39,8 @@  def test_log_format(ubman):
         run_with_format('lm', 'NOTICE. msg')
         run_with_format('m', 'msg')
 
+        ubman.run_command('log format default')
+
 @pytest.mark.buildconfigspec('debug_uart')
 @pytest.mark.boardspec('sandbox')
 @pytest.mark.restart