summaryrefslogtreecommitdiff
path: root/smoketest/scripts/system
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-19 13:50:24 +0200
committerChristian Breunig <christian@breunig.cc>2024-07-22 21:57:10 +0200
commit6db6f2451ac8cbd26a90f5da1609b4563ca607a2 (patch)
treefc5b1c23d8bdd9c33f910936b1dfed537bda0765 /smoketest/scripts/system
parentb0d836a686a306710b08dbe6f4d2be77ea08c759 (diff)
downloadvyos-1x-6db6f2451ac8cbd26a90f5da1609b4563ca607a2.tar.gz
vyos-1x-6db6f2451ac8cbd26a90f5da1609b4563ca607a2.zip
smoketest: T6406: use check_kmod() helper over native call()
(cherry picked from commit 8bf6687b5276589e64988c3c54dbf61a628ee2a0)
Diffstat (limited to 'smoketest/scripts/system')
-rwxr-xr-xsmoketest/scripts/system/test_kernel_options.py6
1 files changed, 3 insertions, 3 deletions
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()