From 67f71cb8a44595f9eb045ed096d99da9dce003ae Mon Sep 17 00:00:00 2001 From: Conor Schaefer Date: Wed, 26 Aug 2020 08:39:47 -0700 Subject: [PATCH] Adds config test for required kernel modules The u2mfn kernel module, built by dkms, is required for graphical support in VMs. Let's ensure that the kernel object is present for the active kernel, otherwise graphical displays will be garbled. --- tests/test_vms_exist.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_vms_exist.py b/tests/test_vms_exist.py index 7aade408..4e4f1cc2 100644 --- a/tests/test_vms_exist.py +++ b/tests/test_vms_exist.py @@ -36,6 +36,12 @@ def _check_kernel(self, vm): assert kernel_version.endswith("-grsec-workstation") assert kernel_version == EXPECTED_KERNEL_VERSION + u2mfn_filepath = "/usr/lib/modules/{}/updates/dkms/u2mfn.ko".format(EXPECTED_KERNEL_VERSION) + # cmd will raise exception if file not found + stdout, stderr = vm.run("sudo test -f {}".format(u2mfn_filepath)) + assert stdout == b"" + assert stderr == b"" + def _check_service_running(self, vm, service): """ Ensures a given service is running inside a given VM.