aboutsummaryrefslogtreecommitdiff
path: root/tests/acceptance/virtiofs_submounts.py
diff options
context:
space:
mode:
authorCleber Rosa <crosa@redhat.com>2021-02-03 12:23:51 -0500
committerCleber Rosa <crosa@redhat.com>2021-02-15 22:23:40 -0500
commitefe30d5011b7a667e3edac22ffd5318bc55c14b2 (patch)
treefe7b22474cfcca5fba367f867af6d47bfb778081 /tests/acceptance/virtiofs_submounts.py
parent6dd7457916e17f7674e96d02b66a376b0f923fcc (diff)
Acceptance Tests: introduce method for requiring an accelerator
Some tests explicitly require a QEMU accelerator to be available. Given that this depends on some runtime aspects not known before the test is started, such as the currently set QEMU binary, it's left to be checked also at runtime. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20210203172357.1422425-17-crosa@redhat.com> Reviewed-by: Beraldo Leal <bleal@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com>
Diffstat (limited to 'tests/acceptance/virtiofs_submounts.py')
-rw-r--r--tests/acceptance/virtiofs_submounts.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virtiofs_submounts.py
index fc2b4fd666..46fa65392a 100644
--- a/tests/acceptance/virtiofs_submounts.py
+++ b/tests/acceptance/virtiofs_submounts.py
@@ -9,8 +9,6 @@ from avocado_qemu import LinuxTest, BUILD_DIR
from avocado_qemu import wait_for_console_pattern
from avocado.utils import ssh
-from qemu.accel import kvm_available
-
def run_cmd(args):
subp = subprocess.Popen(args,
@@ -260,8 +258,7 @@ class VirtiofsSubmountsTest(LinuxTest):
self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22',
'-device', 'virtio-net,netdev=vnet')
- if not kvm_available(self.arch, self.qemu_bin):
- self.cancel(KVM_NOT_AVAILABLE)
+ self.require_accelerator("kvm")
self.vm.add_args('-accel', 'kvm')
def tearDown(self):