* [PATCH] tests/functional: Remove sleep workarounds from sh4 test
@ 2024-11-22 13:08 Cédric Le Goater
2024-11-22 13:49 ` Thomas Huth
0 siblings, 1 reply; 4+ messages in thread
From: Cédric Le Goater @ 2024-11-22 13:08 UTC (permalink / raw)
To: qemu-devel
Cc: Yoshinori Sato, Magnus Damm, Thomas Huth, Alex Bennée,
Cédric Le Goater
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.
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
tests/functional/test_sh4_tuxrun.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tests/functional/test_sh4_tuxrun.py b/tests/functional/test_sh4_tuxrun.py
index 352cb360ef74..dcb49f28b9aa 100755
--- a/tests/functional/test_sh4_tuxrun.py
+++ b/tests/functional/test_sh4_tuxrun.py
@@ -15,7 +15,7 @@
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):
@@ -46,10 +46,8 @@ def test_sh4(self):
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")
--
2.47.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] tests/functional: Remove sleep workarounds from sh4 test
2024-11-22 13:08 [PATCH] tests/functional: Remove sleep workarounds from sh4 test Cédric Le Goater
@ 2024-11-22 13:49 ` Thomas Huth
2024-11-22 13:52 ` Cédric Le Goater
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2024-11-22 13:49 UTC (permalink / raw)
To: Cédric Le Goater, qemu-devel
Cc: Yoshinori Sato, Magnus Damm, Alex Bennée
On 22/11/2024 14.08, Cédric Le Goater wrote:
> 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.
>
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
> ---
> tests/functional/test_sh4_tuxrun.py | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/tests/functional/test_sh4_tuxrun.py b/tests/functional/test_sh4_tuxrun.py
> index 352cb360ef74..dcb49f28b9aa 100755
> --- a/tests/functional/test_sh4_tuxrun.py
> +++ b/tests/functional/test_sh4_tuxrun.py
> @@ -15,7 +15,7 @@
> 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):
> @@ -46,10 +46,8 @@ def test_sh4(self):
> 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")
Could we also remove the @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS')...)
now?
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] tests/functional: Remove sleep workarounds from sh4 test
2024-11-22 13:49 ` Thomas Huth
@ 2024-11-22 13:52 ` Cédric Le Goater
2024-11-22 13:55 ` Thomas Huth
0 siblings, 1 reply; 4+ messages in thread
From: Cédric Le Goater @ 2024-11-22 13:52 UTC (permalink / raw)
To: Thomas Huth, qemu-devel; +Cc: Yoshinori Sato, Magnus Damm, Alex Bennée
On 11/22/24 14:49, Thomas Huth wrote:
> On 22/11/2024 14.08, Cédric Le Goater wrote:
>> 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.
>>
>> Signed-off-by: Cédric Le Goater <clg@redhat.com>
>> ---
>> tests/functional/test_sh4_tuxrun.py | 8 +++-----
>> 1 file changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/tests/functional/test_sh4_tuxrun.py b/tests/functional/test_sh4_tuxrun.py
>> index 352cb360ef74..dcb49f28b9aa 100755
>> --- a/tests/functional/test_sh4_tuxrun.py
>> +++ b/tests/functional/test_sh4_tuxrun.py
>> @@ -15,7 +15,7 @@
>> 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):
>> @@ -46,10 +46,8 @@ def test_sh4(self):
>> 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")
>
> Could we also remove the @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS')...) now?
>
> Thomas
>
I didn't because of this comment :
# Note: some segfaults caused by unaligned userspace access
It does not reproduce on my systems though.
C.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] tests/functional: Remove sleep workarounds from sh4 test
2024-11-22 13:52 ` Cédric Le Goater
@ 2024-11-22 13:55 ` Thomas Huth
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2024-11-22 13:55 UTC (permalink / raw)
To: Cédric Le Goater, qemu-devel
Cc: Yoshinori Sato, Magnus Damm, Alex Bennée
On 22/11/2024 14.52, Cédric Le Goater wrote:
> On 11/22/24 14:49, Thomas Huth wrote:
>> On 22/11/2024 14.08, Cédric Le Goater wrote:
>>> 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.
>>>
>>> Signed-off-by: Cédric Le Goater <clg@redhat.com>
>>> ---
>>> tests/functional/test_sh4_tuxrun.py | 8 +++-----
>>> 1 file changed, 3 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/tests/functional/test_sh4_tuxrun.py b/tests/functional/
>>> test_sh4_tuxrun.py
>>> index 352cb360ef74..dcb49f28b9aa 100755
>>> --- a/tests/functional/test_sh4_tuxrun.py
>>> +++ b/tests/functional/test_sh4_tuxrun.py
>>> @@ -15,7 +15,7 @@
>>> 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):
>>> @@ -46,10 +46,8 @@ def test_sh4(self):
>>> 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")
>>
>> Could we also remove the
>> @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS')...) now?
>>
>> Thomas
>>
>
> I didn't because of this comment :
>
> # Note: some segfaults caused by unaligned userspace access
>
> It does not reproduce on my systems though.
I also cannot reproduce the problem anymore here ... so maybe we should give
it a try and remove the skipUnless now?
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-22 13:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-22 13:08 [PATCH] tests/functional: Remove sleep workarounds from sh4 test Cédric Le Goater
2024-11-22 13:49 ` Thomas Huth
2024-11-22 13:52 ` Cédric Le Goater
2024-11-22 13:55 ` Thomas Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).