From 3c2a206e733cd86f3b6a9c58b74e20c679170424 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Wed, 10 May 2023 13:35:08 +0000 Subject: T5217: Add smoketest for CONFIG_NFT_SYNPROXY kernel option --- smoketest/scripts/system/test_kernel_options.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'smoketest/scripts/system/test_kernel_options.py') diff --git a/smoketest/scripts/system/test_kernel_options.py b/smoketest/scripts/system/test_kernel_options.py index 94be0483a..fe2a1c48a 100755 --- a/smoketest/scripts/system/test_kernel_options.py +++ b/smoketest/scripts/system/test_kernel_options.py @@ -63,6 +63,19 @@ class TestKernelModules(unittest.TestCase): self.assertIn(option, config_data, f"Option {option} is not present in /proc/config.gz") + def test_synproxy_enabled(self): + options_to_check = [ + 'CONFIG_NFT_SYNPROXY', + 'CONFIG_IP_NF_TARGET_SYNPROXY' + ] + if not os.path.isfile(CONFIG): + call('sudo modprobe configs') + with gzip.open(CONFIG, 'rt') as f: + config_data = f.read() + for option in options_to_check: + tmp = re.findall(f'{option}=(y|m)', config_data) + self.assertTrue(tmp) + def test_qemu_support(self): # The bond/lacp interface must be enabled in the OS Kernel for option in ['CONFIG_VIRTIO_BLK', 'CONFIG_SCSI_VIRTIO', -- cgit v1.2.3