Skip to contentSkip to conversation

test/py: Reset the console timeout value

PATCH In review Bin Meng 2 participants 6 messages May 17, 2022 – May 27, 2022

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/3 test/py: Reset the console timeout value

Reset the console timeout value as some tests may change its default value during the execution.

This fixes the random case timeout issue seen in the U-Boot CI.

---

 test/py/u_boot_console_base.py | 4 ++++
 1 file changed, 4 insertions(+)
test/py/u_boot_console_base.py +4 -0
index 58ec859b34..26b6de07f8 100644
@@ -400,6 +400,10 @@ class ConsoleBase(object):
         """
 
         if self.p:
+            # Reset the console timeout value as some tests may change
+            # its default value during the execution
+            if not self.config.gdbserver:
+                self.p.timeout = 30000
             return
         try:
             self.log.start_section('Starting U-Boot')
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 2/3 test/py: test_fs: Correct the test case name

Use test_fstypes as the name instead of test_dm_compact.

---

 test/py/tests/test_fs/test_fs_cmd.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/py/tests/test_fs/test_fs_cmd.py +1 -1
index ba39a53159..700cf3591d 100644
@@ -6,7 +6,7 @@ import pytest
 
 @pytest.mark.boardspec('sandbox')
 @pytest.mark.buildconfigspec('cmd_fs_generic')
-def test_dm_compat(u_boot_console):
+def test_fstypes(u_boot_console):
     """Test that `fstypes` prints a result which includes `sandbox`."""
     output = u_boot_console.run_command('fstypes')
     assert "Supported filesystems:" in output
Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH 2/3] test/py: test_fs: Correct the test case name

Quoted 3 lines · Bin Meng

Use test_fstypes as the name instead of test_dm_compact.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
author
#3 lore raw

PATCH 3/3 test/py: test_part: Correct the test case name

In reply to Bin Meng

Use test_part_types as the name instead of dm_compact.

---

 test/py/tests/test_part.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/py/tests/test_part.py +1 -1
index cba9804510..2b5184654d 100644
@@ -7,7 +7,7 @@ import pytest
 @pytest.mark.buildconfigspec('cmd_part')
 @pytest.mark.buildconfigspec('partitions')
 @pytest.mark.buildconfigspec('efi_partition')
-def test_dm_compat(u_boot_console):
+def test_part_types(u_boot_console):
     """Test that `part types` prints a result which includes `EFI`."""
     output = u_boot_console.run_command('part types')
     assert "Supported partition tables:" in output
Signature · 1 line
2.25.1
#4 lore raw

Re: [PATCH 3/3] test/py: test_part: Correct the test case name

Quoted 3 lines · Bin Meng

Use test_part_types as the name instead of dm_compact.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#5 lore raw
In reply to Bin Meng
Quoted 6 lines · Bin Meng

Reset the console timeout value as some tests may change its default value during the execution.

This fixes the random case timeout issue seen in the U-Boot CI.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom