summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-12-13 21:41:14 +0100
committerChristian Poessinger <christian@poessinger.com>2020-12-13 21:41:39 +0100
commit3c16a4290652fb51a20175a69b6a4cc36e7e76c9 (patch)
tree5fdcf5a14435da3e7dfc5c5023abbe63ff7fde88 /smoketest/scripts/cli
parent505c5efaf1e852a3e90276baacdb235c4c3e41b2 (diff)
downloadvyos-1x-3c16a4290652fb51a20175a69b6a4cc36e7e76c9.tar.gz
vyos-1x-3c16a4290652fb51a20175a69b6a4cc36e7e76c9.zip
smoketest: login: adjust to Kernel 5.0 config options
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_system_login.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/smoketest/scripts/cli/test_system_login.py b/smoketest/scripts/cli/test_system_login.py
index 48ae78ccf..d3324b8aa 100755
--- a/smoketest/scripts/cli/test_system_login.py
+++ b/smoketest/scripts/cli/test_system_login.py
@@ -19,6 +19,7 @@ import re
import platform
import unittest
+from distutils.version import LooseVersion
from platform import release as kernel_version
from subprocess import Popen, PIPE
@@ -72,11 +73,13 @@ class TestSystemLogin(unittest.TestCase):
kernel = platform.release()
kernel_config = read_file(f'/boot/config-{kernel}')
- # T2886 - RADIUS authentication - check for statically compiled
- # options (=y)
- for option in ['CONFIG_AUDIT', 'CONFIG_HAVE_ARCH_AUDITSYSCALL',
- 'CONFIG_AUDITSYSCALL', 'CONFIG_AUDIT_WATCH',
- 'CONFIG_AUDIT_TREE', 'CONFIG_AUDIT_ARCH']:
+ # T2886 - RADIUS authentication - check for statically compiled options
+ options = ['CONFIG_AUDIT', 'CONFIG_AUDITSYSCALL', 'CONFIG_AUDIT_ARCH']
+ if LooseVersion(kernel_version()) < LooseVersion('5.0'):
+ options.append('CONFIG_AUDIT_WATCH')
+ options.append('CONFIG_AUDIT_TREE')
+
+ for option in options:
self.assertIn(f'{option}=y', kernel_config)
def test_radius_config(self):