diff mbox series

[2/5] test_systemd_selinux.py: use timeout argument for emulator.login

Message ID 20231105215221.1602465-2-adam.duskett@amarulasolutions.com
State Accepted
Headers show
Series [1/5] support/testing/infra/emulator.py: add a timeout argument for the login method | expand

Commit Message

Adam Duskett Nov. 5, 2023, 9:52 p.m. UTC
self.emulator.timeout_multiplier *= 10 is equivilent to 60 * 10 or 600.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
 support/testing/tests/init/test_systemd_selinux.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Thomas Petazzoni Nov. 6, 2023, 7:45 p.m. UTC | #1
On Sun,  5 Nov 2023 14:52:18 -0700
Adam Duskett <adam.duskett@amarulasolutions.com> wrote:

> self.emulator.timeout_multiplier *= 10 is equivilent to 60 * 10 or 600.
> 
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
> ---
>  support/testing/tests/init/test_systemd_selinux.py | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/support/testing/tests/init/test_systemd_selinux.py b/support/testing/tests/init/test_systemd_selinux.py
> index fab23e3330..d463f91669 100644
> --- a/support/testing/tests/init/test_systemd_selinux.py
> +++ b/support/testing/tests/init/test_systemd_selinux.py
> @@ -21,9 +21,8 @@ class TestSELinuxSystemd(infra.basetest.BRTest):
>          """
>  
>      def wait_boot(self):
> -        # The complete boot with systemd takes more time than what the default multipler permits
> -        self.emulator.timeout_multiplier *= 10
> -        self.emulator.login()
> +        # The complete boot with systemd takes more time than what the default multiplier permits

I think the wording of the comment no longer made sense, since we're no
longer tweaking the multiplier. So I've reworded the comment a bit
(likewise for PATCH 3/5).

Thanks!

Thomas
Peter Korsgaard Nov. 10, 2023, 11:51 a.m. UTC | #2
>>>>> "Adam" == Adam Duskett <adam.duskett@amarulasolutions.com> writes:

 > self.emulator.timeout_multiplier *= 10 is equivilent to 60 * 10 or 600.
 > Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>

Committed to 2023.02.x and 2023.08.x, thanks.
diff mbox series

Patch

diff --git a/support/testing/tests/init/test_systemd_selinux.py b/support/testing/tests/init/test_systemd_selinux.py
index fab23e3330..d463f91669 100644
--- a/support/testing/tests/init/test_systemd_selinux.py
+++ b/support/testing/tests/init/test_systemd_selinux.py
@@ -21,9 +21,8 @@  class TestSELinuxSystemd(infra.basetest.BRTest):
         """
 
     def wait_boot(self):
-        # The complete boot with systemd takes more time than what the default multipler permits
-        self.emulator.timeout_multiplier *= 10
-        self.emulator.login()
+        # The complete boot with systemd takes more time than what the default multiplier permits
+        self.emulator.login(timeout=600)
 
     def run_tests(self, fstype):
         kernel = os.path.join(self.builddir, "images", "bzImage")