From 3c16a4290652fb51a20175a69b6a4cc36e7e76c9 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 13 Dec 2020 21:41:14 +0100 Subject: smoketest: login: adjust to Kernel 5.0 config options --- smoketest/scripts/cli/test_system_login.py | 13 ++++++++----- 1 file 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): -- cgit v1.2.3