Small fixes in security tests
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
This commit is contained in:
@@ -18,6 +18,7 @@ from api.cas.cli import remove_core_cmd
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools.peach_fuzzer.peach_fuzzer import PeachFuzzer
|
||||
from test_utils.os_utils import Udev
|
||||
from tests.security.fuzzy.kernel.common.common import (
|
||||
prepare_cas_instance,
|
||||
get_fuzz_config,
|
||||
@@ -56,6 +57,9 @@ def test_fuzzy_remove_core_cache_id(
|
||||
cleaning_policy=cleaning_policy,
|
||||
)
|
||||
|
||||
with TestRun.step("Disable udev"):
|
||||
Udev.disable()
|
||||
|
||||
with TestRun.step("Prepare PeachFuzzer"):
|
||||
valid_values = [str(core.cache_id).encode("ascii")]
|
||||
PeachFuzzer.generate_config(get_fuzz_config("cache_id.yml"))
|
||||
|
@@ -18,6 +18,7 @@ from api.cas.cli import remove_core_cmd
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools.peach_fuzzer.peach_fuzzer import PeachFuzzer
|
||||
from test_utils.os_utils import Udev
|
||||
from tests.security.fuzzy.kernel.common.common import (
|
||||
prepare_cas_instance,
|
||||
get_fuzz_config,
|
||||
@@ -56,6 +57,9 @@ def test_fuzzy_remove_core_core_id(
|
||||
cleaning_policy=cleaning_policy,
|
||||
)
|
||||
|
||||
with TestRun.step("Disable udev"):
|
||||
Udev.disable()
|
||||
|
||||
with TestRun.step("Prepare PeachFuzzer"):
|
||||
valid_values = [str(core.core_id).encode("ascii")]
|
||||
PeachFuzzer.generate_config(get_fuzz_config("core_id.yml"))
|
||||
|
@@ -17,6 +17,7 @@ from api.cas.cli import remove_core_cmd
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools.peach_fuzzer.peach_fuzzer import PeachFuzzer
|
||||
from test_utils.os_utils import Udev
|
||||
from tests.security.fuzzy.kernel.common.common import (
|
||||
prepare_cas_instance,
|
||||
get_fuzz_config,
|
||||
@@ -55,6 +56,9 @@ def test_fuzzy_remove_core_flag(
|
||||
cleaning_policy=cleaning_policy,
|
||||
)
|
||||
|
||||
with TestRun.step("Disable udev"):
|
||||
Udev.disable()
|
||||
|
||||
with TestRun.step("Prepare PeachFuzzer"):
|
||||
valid_values = ["", "-f", "--force"]
|
||||
valid_values = [v.encode("ascii") for v in valid_values]
|
||||
|
@@ -20,6 +20,7 @@ from api.cas.init_config import InitConfig
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools.peach_fuzzer.peach_fuzzer import PeachFuzzer
|
||||
from test_utils.os_utils import Udev
|
||||
from tests.security.fuzzy.kernel.common.common import (
|
||||
prepare_cas_instance,
|
||||
get_fuzz_config,
|
||||
@@ -58,6 +59,9 @@ def test_fuzzy_remove_inactive_cache_id(
|
||||
cleaning_policy=cleaning_policy,
|
||||
)
|
||||
|
||||
with TestRun.step("Disable udev"):
|
||||
Udev.disable()
|
||||
|
||||
with TestRun.step("Create init config from running configuration."):
|
||||
InitConfig.create_init_config_from_running_configuration()
|
||||
|
||||
@@ -93,3 +97,6 @@ def test_fuzzy_remove_inactive_cache_id(
|
||||
cache.stop(no_data_flush=True)
|
||||
core_disk.unplug()
|
||||
casadm.load_cache(device=cache_disk.partitions[0])
|
||||
|
||||
with TestRun.step("Plug core device"):
|
||||
core_disk.plug_all()
|
||||
|
@@ -19,6 +19,7 @@ from api.cas.init_config import InitConfig
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools.peach_fuzzer.peach_fuzzer import PeachFuzzer
|
||||
from test_utils.os_utils import Udev
|
||||
from tests.security.fuzzy.kernel.common.common import (
|
||||
prepare_cas_instance,
|
||||
get_fuzz_config,
|
||||
@@ -57,6 +58,9 @@ def test_fuzzy_remove_inactive_core_id(
|
||||
cleaning_policy=cleaning_policy,
|
||||
)
|
||||
|
||||
with TestRun.step("Disable udev"):
|
||||
Udev.disable()
|
||||
|
||||
with TestRun.step("Create init config from running configuration."):
|
||||
InitConfig.create_init_config_from_running_configuration()
|
||||
|
||||
@@ -92,3 +96,6 @@ def test_fuzzy_remove_inactive_core_id(
|
||||
cache.stop(no_data_flush=True)
|
||||
core_disk.unplug()
|
||||
casadm.load_cache(device=cache_disk.partitions[0])
|
||||
|
||||
with TestRun.step("Plug core device"):
|
||||
core_disk.plug_all()
|
||||
|
@@ -18,6 +18,7 @@ from api.cas.cli import stop_cmd
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools.peach_fuzzer.peach_fuzzer import PeachFuzzer
|
||||
from test_utils.os_utils import Udev
|
||||
from tests.security.fuzzy.kernel.common.common import (
|
||||
prepare_cas_instance,
|
||||
get_fuzz_config,
|
||||
@@ -56,6 +57,9 @@ def test_fuzzy_stop_cache_cache_id(
|
||||
cleaning_policy=cleaning_policy,
|
||||
)
|
||||
|
||||
with TestRun.step("Disable udev"):
|
||||
Udev.disable()
|
||||
|
||||
with TestRun.step("Prepare PeachFuzzer"):
|
||||
valid_values = [str(core.cache_id).encode("ascii")]
|
||||
PeachFuzzer.generate_config(get_fuzz_config("cache_id.yml"))
|
||||
|
@@ -18,6 +18,7 @@ from api.cas.cli import stop_cmd
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools.peach_fuzzer.peach_fuzzer import PeachFuzzer
|
||||
from test_utils.os_utils import Udev
|
||||
from tests.security.fuzzy.kernel.common.common import (
|
||||
prepare_cas_instance,
|
||||
get_fuzz_config,
|
||||
@@ -56,6 +57,9 @@ def test_fuzzy_stop_cache_flag(
|
||||
cleaning_policy=cleaning_policy,
|
||||
)
|
||||
|
||||
with TestRun.step("Disable udev"):
|
||||
Udev.disable()
|
||||
|
||||
with TestRun.step("Prepare PeachFuzzer"):
|
||||
valid_values = ["", "-n", "--no-data-flush"]
|
||||
valid_values = [v.encode("ascii") for v in valid_values]
|
||||
|
Reference in New Issue
Block a user