Small fixes in security tests

Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
This commit is contained in:
Katarzyna Treder
2024-10-07 13:21:44 +02:00
parent e7f14f7d00
commit 20ee2fda1f
16 changed files with 78 additions and 13 deletions

View File

@@ -19,6 +19,7 @@ from api.cas.cli import start_cmd
from core.test_run import TestRun
from storage_devices.disk import DiskType, DiskTypeSet
from test_tools.peach_fuzzer.peach_fuzzer import PeachFuzzer
from test_utils.os_utils import Udev
from test_utils.size import Unit, Size
from tests.security.fuzzy.kernel.common.common import (
get_fuzz_config,
@@ -49,6 +50,9 @@ def test_fuzzy_start_cache_flags(cache_mode, cache_line_size, unaligned_io, use_
cache_disk = TestRun.disks["cache"]
cache_disk.create_partitions([Size(400, Unit.MebiByte)])
with TestRun.step("Disable udev"):
Udev.disable()
with TestRun.step("Start and stop cache"):
# Reload kernel modules
cache = casadm.start_cache(
@@ -93,7 +97,7 @@ def test_fuzzy_start_cache_flags(cache_mode, cache_line_size, unaligned_io, use_
any_alphanumeric_pattern = r"\w+"
base_cmd = re.sub(
pattern=f"{incompatible_param} {any_alphanumeric_pattern}",
sub="",
repl="",
string=base_cmd,
)
base_cmd = f"{base_cmd.strip()} {param}"