[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 02/11] tests/acceptance/virtiofs_submounts.py: evaluate string
From: |
Cleber Rosa |
Subject: |
[PATCH v3 02/11] tests/acceptance/virtiofs_submounts.py: evaluate string not length |
Date: |
Mon, 12 Apr 2021 00:46:35 -0400 |
If the vmlinuz variable is set to anything that evaluates to True,
then the respective arguments should be set. If the variable contains
an empty string, than it will evaluate to False, and the extra
arguments will not be set.
This keeps the same logic, but improves readability a bit.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
---
tests/acceptance/virtiofs_submounts.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/acceptance/virtiofs_submounts.py
b/tests/acceptance/virtiofs_submounts.py
index 5b74ce2929b..ca64b76301f 100644
--- a/tests/acceptance/virtiofs_submounts.py
+++ b/tests/acceptance/virtiofs_submounts.py
@@ -251,7 +251,7 @@ def setUp(self):
super(VirtiofsSubmountsTest, self).setUp(pubkey)
- if len(vmlinuz) > 0:
+ if vmlinuz:
self.vm.add_args('-kernel', vmlinuz,
'-append', 'console=ttyS0 root=/dev/sda1')
--
2.30.2
- [PATCH v3 00/11] Acceptance Test: introduce base class for Linux based tests, Cleber Rosa, 2021/04/12
- [PATCH v3 01/11] tests/acceptance/virtiofs_submounts.py: add missing accel tag, Cleber Rosa, 2021/04/12
- [PATCH v3 02/11] tests/acceptance/virtiofs_submounts.py: evaluate string not length,
Cleber Rosa <=
- [PATCH v3 03/11] Python: add utility function for retrieving port redirection, Cleber Rosa, 2021/04/12
- [PATCH v3 04/11] Acceptance Tests: move useful ssh methods to base class, Cleber Rosa, 2021/04/12
- [PATCH v3 05/11] Acceptance Tests: add port redirection for ssh by default, Cleber Rosa, 2021/04/12
- [PATCH v3 06/11] Acceptance Tests: make username/password configurable, Cleber Rosa, 2021/04/12
- [PATCH v3 07/11] Acceptance Tests: set up SSH connection by default after boot for LinuxTest, Cleber Rosa, 2021/04/12
- [PATCH v3 08/11] tests/acceptance/virtiofs_submounts.py: remove launch_vm(), Cleber Rosa, 2021/04/12
- [PATCH v3 09/11] Acceptance Tests: add basic documentation on LinuxTest base class, Cleber Rosa, 2021/04/12
- [PATCH v3 10/11] Acceptance Tests: introduce CPU hotplug test, Cleber Rosa, 2021/04/12