diff --git a/test/functional/tests/cli/test_zero_metadata_command.py b/test/functional/tests/cli/test_zero_metadata_command.py index f3fbf04..0fed8af 100644 --- a/test/functional/tests/cli/test_zero_metadata_command.py +++ b/test/functional/tests/cli/test_zero_metadata_command.py @@ -1,5 +1,6 @@ # # Copyright(c) 2021 Intel Corporation +# Copyright(c) 2024 Huawei Technologies Co., Ltd. # SPDX-License-Identifier: BSD-3-Clause # import time @@ -221,7 +222,7 @@ def test_zero_metadata_dirty_shutdown(): TestRun.LOGGER.info("This could ended with error (expected)") with TestRun.step("Plug cache device."): - cache_disk.plug() + cache_disk.plug_all() time.sleep(1) with TestRun.step("Start cache (expect to fail)."): diff --git a/test/functional/tests/data_integrity/test_data_integrity_unplug.py b/test/functional/tests/data_integrity/test_data_integrity_unplug.py index 74d7f39..3e6ba6c 100644 --- a/test/functional/tests/data_integrity/test_data_integrity_unplug.py +++ b/test/functional/tests/data_integrity/test_data_integrity_unplug.py @@ -1,5 +1,6 @@ # # Copyright(c) 2022 Intel Corporation +# Copyright(c) 2024 Huawei Technologies Co., Ltd. # SPDX-License-Identifier: BSD-3-Clause # @@ -130,7 +131,7 @@ async def test_data_integrity_unplug(cache_mode): raise with TestRun.step("Plug back the cache device"): - cache_dev.plug() + cache_dev.plug_all() with TestRun.step("Load cache"): cache = casadm.load_cache(cache_dev) diff --git a/test/functional/tests/fault_injection/test_fault_injection_many_to_one.py b/test/functional/tests/fault_injection/test_fault_injection_many_to_one.py index 930575e..0518355 100644 --- a/test/functional/tests/fault_injection/test_fault_injection_many_to_one.py +++ b/test/functional/tests/fault_injection/test_fault_injection_many_to_one.py @@ -1,5 +1,6 @@ # # Copyright(c) 2020-2022 Intel Corporation +# Copyright(c) 2024 Huawei Technologies Co., Ltd. # SPDX-License-Identifier: BSD-3-Clause # @@ -227,7 +228,7 @@ def test_one_core_fail(cache_mode): casadm.stop_all_caches() with TestRun.step("Plug back the first core."): - core_dev1.plug() + core_dev1.plug_all() @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @@ -311,7 +312,7 @@ def test_one_core_fail_dirty(): casadm.stop_all_caches() with TestRun.step("Plug back the first core."): - core_dev1.plug() + core_dev1.plug_all() def dd_builder(cache_mode: CacheMode, dev: Core, size: Size): diff --git a/test/functional/tests/fault_injection/test_soft_hot_plug_device.py b/test/functional/tests/fault_injection/test_soft_hot_plug_device.py index 1acaf69..31b0c01 100644 --- a/test/functional/tests/fault_injection/test_soft_hot_plug_device.py +++ b/test/functional/tests/fault_injection/test_soft_hot_plug_device.py @@ -1,5 +1,6 @@ # # Copyright(c) 2019-2022 Intel Corporation +# Copyright(c) 2024 Huawei Technologies Co., Ltd. # SPDX-License-Identifier: BSD-3-Clause # @@ -92,10 +93,10 @@ def test_soft_hot_unplug_cache(cache_mode): casadm.stop_all_caches() with TestRun.step("Plug back cache device"): - cache_dev.plug() + cache_dev.plug_all() -@pytest.mark.parametrizex("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", [CacheMode.WO, CacheMode.WB]) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core1", DiskTypeLowerThan("cache")) @pytest.mark.require_disk("core2", DiskTypeLowerThan("cache")) @@ -197,7 +198,7 @@ def test_soft_hot_unplug_core(cache_mode): casadm.stop_all_caches() with TestRun.step("Plug back core device"): - core_dev_unplugged.plug() + core_dev_unplugged.plug_all() def fio_prepare(core): diff --git a/test/functional/tests/incremental_load/test_udev.py b/test/functional/tests/incremental_load/test_udev.py index 9b49ddb..a08d713 100644 --- a/test/functional/tests/incremental_load/test_udev.py +++ b/test/functional/tests/incremental_load/test_udev.py @@ -1,5 +1,6 @@ # # Copyright(c) 2020-2021 Intel Corporation +# Copyright(c) 2024 Huawei Technologies Co., Ltd. # SPDX-License-Identifier: BSD-3-Clause # @@ -58,7 +59,7 @@ def test_udev_core_partition(): core_disk.unplug() with TestRun.step("Plug missing core disk."): - core_disk.plug() + core_disk.plug_all() time.sleep(1) with TestRun.step("List cache devices and check that created partitions are present " @@ -102,7 +103,7 @@ def test_udev_core(): core_disk.unplug() with TestRun.step("Plug core disk."): - core_disk.plug() + core_disk.plug_all() time.sleep(1) with TestRun.step("Check if core device is listed in core pool."): @@ -112,7 +113,7 @@ def test_udev_core(): cache_disk.unplug() with TestRun.step("Plug cache disk."): - cache_disk.plug() + cache_disk.plug_all() with TestRun.step("Check if core device is active and not in the core pool."): check_if_dev_in_core_pool(core_dev, False) @@ -199,7 +200,7 @@ def test_udev_cache_load(cache_mode): cache_disk.unplug() with TestRun.step("Plug cache disk."): - cache_disk.plug() + cache_disk.plug_all() time.sleep(1) with TestRun.step("List caches and check if cache is loaded."): @@ -263,7 +264,7 @@ def test_neg_udev_cache_load(): with TestRun.step("Unplug and plug cache disk."): cache_disk.unplug() - cache_disk.plug() + cache_disk.plug_all() time.sleep(1) with TestRun.step("Check if CAS is loaded correctly."): @@ -292,7 +293,7 @@ def test_neg_udev_cache_load(): with TestRun.step("Unplug and plug core disk."): core_disk.unplug() - core_disk.plug() + core_disk.plug_all() time.sleep(1) with TestRun.step("Check if two cores assigned to not loaded cache are inserted to core pool."): diff --git a/test/functional/tests/lazy_writes/recovery/test_recovery_unplug.py b/test/functional/tests/lazy_writes/recovery/test_recovery_unplug.py index e212b91..f776066 100644 --- a/test/functional/tests/lazy_writes/recovery/test_recovery_unplug.py +++ b/test/functional/tests/lazy_writes/recovery/test_recovery_unplug.py @@ -1,5 +1,6 @@ # # Copyright(c) 2019-2021 Intel Corporation +# Copyright(c) 2024 Huawei Technologies Co., Ltd. # SPDX-License-Identifier: BSD-3-Clause # @@ -89,7 +90,7 @@ def test_recovery_unplug_cache_fs(cache_mode, cls, filesystem, direct): with TestRun.step("Plug missing cache device."): TestRun.LOGGER.info(str(casadm.list_caches(by_id_path=False))) - cache_disk.plug() + cache_disk.plug_all() with TestRun.step("Load cache."): cache = casadm.load_cache(cache_device) @@ -174,7 +175,7 @@ def test_recovery_unplug_cache_raw(cache_mode, cls): with TestRun.step("Plug missing cache device."): TestRun.LOGGER.info(str(casadm.list_caches(by_id_path=False))) - cache_disk.plug() + cache_disk.plug_all() with TestRun.step("Load cache."): cache = casadm.load_cache(cache_device) diff --git a/test/functional/tests/security/fuzzy/kernel/fuzzy_stop_remove/test_fuzzy_remove_inactive_cache_id.py b/test/functional/tests/security/fuzzy/kernel/fuzzy_stop_remove/test_fuzzy_remove_inactive_cache_id.py index a4b2218..28ae919 100644 --- a/test/functional/tests/security/fuzzy/kernel/fuzzy_stop_remove/test_fuzzy_remove_inactive_cache_id.py +++ b/test/functional/tests/security/fuzzy/kernel/fuzzy_stop_remove/test_fuzzy_remove_inactive_cache_id.py @@ -1,5 +1,6 @@ # # Copyright(c) 2024 Huawei Technologies Co., Ltd. +# Copyright(c) 2024 Huawei Technologies Co., Ltd. # SPDX-License-Identifier: BSD-3-Clause # @@ -86,7 +87,7 @@ def test_fuzzy_remove_inactive_cache_id( ) if output.exit_code == 0: with TestRun.step("Reload cache with inactive core"): - core_disk.plug() + core_disk.plug_all() cache.add_core(core_dev=core_disk) InitConfig.create_init_config_from_running_configuration() cache.stop(no_data_flush=True) diff --git a/test/functional/tests/security/fuzzy/kernel/fuzzy_stop_remove/test_fuzzy_remove_inactive_core_id.py b/test/functional/tests/security/fuzzy/kernel/fuzzy_stop_remove/test_fuzzy_remove_inactive_core_id.py index f35abdd..9865024 100644 --- a/test/functional/tests/security/fuzzy/kernel/fuzzy_stop_remove/test_fuzzy_remove_inactive_core_id.py +++ b/test/functional/tests/security/fuzzy/kernel/fuzzy_stop_remove/test_fuzzy_remove_inactive_core_id.py @@ -86,7 +86,7 @@ def test_fuzzy_remove_inactive_core_id( ) if output.exit_code == 0: with TestRun.step("Reload cache with inactive core"): - core_disk.plug() + core_disk.plug_all() cache.add_core(core_dev=core_disk) InitConfig.create_init_config_from_running_configuration() cache.stop(no_data_flush=True)