diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-12-18 18:21:06 +0000 |
|---|---|---|
| committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-12-19 13:36:38 +0200 |
| commit | a1d043d86dd288c26ff9bd1dda030cf783e9937f (patch) | |
| tree | c49d8e7d48f717af842ac0089a8f8e5a8382af0a | |
| parent | 617c99b89aa2b9df985f573159d78212983a5451 (diff) | |
| download | vyos-1x-a1d043d86dd288c26ff9bd1dda030cf783e9937f.tar.gz vyos-1x-a1d043d86dd288c26ff9bd1dda030cf783e9937f.zip | |
T8108: Add smoketest for Kernel kexec and arm64 options
Check the Kernel `kexec` and additional arm64 modules
| -rwxr-xr-x | smoketest/scripts/system/test_kernel_options.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/smoketest/scripts/system/test_kernel_options.py b/smoketest/scripts/system/test_kernel_options.py index 8fc129117..39e4da6fe 100755 --- a/smoketest/scripts/system/test_kernel_options.py +++ b/smoketest/scripts/system/test_kernel_options.py @@ -21,6 +21,8 @@ import unittest from vyos.utils.kernel import check_kmod +ARCH = platform.machine() +IS_ARM64 = ARCH in ('aarch64', 'arm64') kernel = platform.release() class TestKernelModules(unittest.TestCase): """ VyOS makes use of a lot of Kernel drivers, modules and features. The @@ -166,5 +168,29 @@ class TestKernelModules(unittest.TestCase): tmp = re.findall(f'{option}=y', self._config_data) self.assertTrue(tmp) + def test_kexec(self): + for option in ['CONFIG_KEXEC', 'CONFIG_KEXEC_FILE', 'CONFIG_KEXEC_SIG']: + tmp = re.findall(f'{option}=y', self._config_data) + self.assertTrue(tmp) + + def test_arm64(self): + # Only required on arm64 platforms + if not IS_ARM64: + self.skipTest('Not an arm64 platform') + + # Marvell CN9130: CONFIG_MVPP2 + required_options = [ + 'CONFIG_MVPP2', + 'CONFIG_USB_XHCI_PLATFORM', + ] + + for option in required_options: + with self.subTest(option=option): + tmp = re.findall(f'{option}=(y|m)', self._config_data) + self.assertTrue( + tmp, msg=f'{option} must be enabled (=y or =m) on arm64' + ) + + if __name__ == '__main__': unittest.main(verbosity=2) |
