summary refs log tree commit diff stats
path: root/tests/functional/test_sh4_tuxrun.py
diff options
context:
space:
mode:
authorCédric Le Goater <clg@redhat.com>2024-11-22 15:18:27 +0100
committerThomas Huth <thuth@redhat.com>2024-11-27 09:25:17 +0100
commitc00989aae88544b96841ad0c4dc2737b003c2c9e (patch)
treeb1d84512ba672a2236972a02a960bdb36313be15 /tests/functional/test_sh4_tuxrun.py
parent0218f6c3b32de6ab587a6800671a50745ce676b6 (diff)
downloadfocaccia-qemu-c00989aae88544b96841ad0c4dc2737b003c2c9e.tar.gz
focaccia-qemu-c00989aae88544b96841ad0c4dc2737b003c2c9e.zip
tests/functional: Remove sleep workarounds from sh4 test
These were introduced in the avocado tests to workaround read issues
when interacting with console. They are no longer necessary and we can
use the expected login string instead.

Test always passes now. Remove skipUnless test on QEMU_TEST_FLAKY_TESTS.

Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20241122141827.2039984-1-clg@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/functional/test_sh4_tuxrun.py')
-rwxr-xr-xtests/functional/test_sh4_tuxrun.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/functional/test_sh4_tuxrun.py b/tests/functional/test_sh4_tuxrun.py
index 352cb360ef..b33533fc7e 100755
--- a/tests/functional/test_sh4_tuxrun.py
+++ b/tests/functional/test_sh4_tuxrun.py
@@ -15,7 +15,7 @@ import os
 import time
 
 from unittest import skipUnless
-from qemu_test import Asset, exec_command_and_wait_for_pattern, exec_command
+from qemu_test import Asset, exec_command_and_wait_for_pattern
 from qemu_test.tuxruntest import TuxRunBaselineTest
 
 class TuxRunSh4Test(TuxRunBaselineTest):
@@ -27,8 +27,6 @@ class TuxRunSh4Test(TuxRunBaselineTest):
         'https://storage.tuxboot.com/20230331/sh4/rootfs.ext4.zst',
         '3592a7a3d5a641e8b9821449e77bc43c9904a56c30d45da0694349cfd86743fd')
 
-    # Note: some segfaults caused by unaligned userspace access
-    @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable')
     def test_sh4(self):
         self.set_machine('r2d')
         self.cpu='sh7785'
@@ -46,10 +44,8 @@ class TuxRunSh4Test(TuxRunBaselineTest):
                          console_index=1)
         self.vm.launch()
 
-        self.wait_for_console_pattern("Welcome to TuxTest")
-        time.sleep(0.1)
-        exec_command(self, 'root')
-        time.sleep(0.1)
+        self.wait_for_console_pattern("tuxtest login:")
+        exec_command_and_wait_for_pattern(self, 'root', 'root@tuxtest:~#')
         exec_command_and_wait_for_pattern(self, 'halt',
                                           "reboot: System halted")