From 832dee956043be7f1e1d9f06f57f80b6d4db22ab Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Fri, 19 Jul 2024 13:49:32 +0200 Subject: smoketest: T6597: add "commit" debug information (cherry picked from commit f6485f7df8713298d81ec0d45c548417db111523) --- smoketest/scripts/cli/base_vyostest_shim.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'smoketest/scripts') diff --git a/smoketest/scripts/cli/base_vyostest_shim.py b/smoketest/scripts/cli/base_vyostest_shim.py index efaa74fe0..112c58c09 100644 --- a/smoketest/scripts/cli/base_vyostest_shim.py +++ b/smoketest/scripts/cli/base_vyostest_shim.py @@ -75,6 +75,8 @@ class VyOSUnitTestSHIM: self._session.delete(config) def cli_commit(self): + if self.debug: + print('commit') self._session.commit() # during a commit there is a process opening commit_lock, and run() returns 0 while run(f'sudo lsof -nP {commit_lock}') == 0: -- cgit v1.2.3 From c2cc60cab8f3dd9e11419849ae76b7e33d6948b6 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Fri, 19 Jul 2024 13:50:24 +0200 Subject: smoketest: T6406: use check_kmod() helper over native call() (cherry picked from commit 8bf6687b5276589e64988c3c54dbf61a628ee2a0) --- smoketest/scripts/system/test_kernel_options.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'smoketest/scripts') diff --git a/smoketest/scripts/system/test_kernel_options.py b/smoketest/scripts/system/test_kernel_options.py index 4666e98e7..700e4cec7 100755 --- a/smoketest/scripts/system/test_kernel_options.py +++ b/smoketest/scripts/system/test_kernel_options.py @@ -19,8 +19,9 @@ import os import platform import unittest -kernel = platform.release() +from vyos.utils.kernel import check_kmod +kernel = platform.release() class TestKernelModules(unittest.TestCase): """ VyOS makes use of a lot of Kernel drivers, modules and features. The required modules which are essential for VyOS should be tested that they are @@ -35,9 +36,8 @@ class TestKernelModules(unittest.TestCase): super(TestKernelModules, cls).setUpClass() CONFIG = '/proc/config.gz' - if not os.path.isfile(CONFIG): - call('sudo modprobe configs') + check_kmod('configs') with gzip.open(CONFIG, 'rt') as f: cls._config_data = f.read() -- cgit v1.2.3