diff options
author | Christian Breunig <christian@breunig.cc> | 2023-05-10 21:11:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-10 21:11:20 +0200 |
commit | b469ed55403b25738949216f6f07ae9e70595db1 (patch) | |
tree | fa0b81909dfa7fd9b983b5a356b06f2cd613b626 /smoketest/scripts/system/test_kernel_options.py | |
parent | 70e476760a9c5b42a5d3f8647e3b4ac361472871 (diff) | |
parent | 3c2a206e733cd86f3b6a9c58b74e20c679170424 (diff) | |
download | vyos-1x-b469ed55403b25738949216f6f07ae9e70595db1.tar.gz vyos-1x-b469ed55403b25738949216f6f07ae9e70595db1.zip |
Merge pull request #1992 from sever-sever/T5217
T5217: Add smoketest for CONFIG_NFT_SYNPROXY kernel option
Diffstat (limited to 'smoketest/scripts/system/test_kernel_options.py')
-rwxr-xr-x | smoketest/scripts/system/test_kernel_options.py | 13 |
1 files changed, 13 insertions, 0 deletions
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', |