Fix imports
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#
|
||||
# Copyright(c) 2020-2021 Intel Corporation
|
||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from datetime import timedelta
|
||||
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode
|
||||
from core.test_run import TestRun
|
||||
@@ -48,7 +48,7 @@ def test_io_engines(cache_mode, filesystem, io_engine):
|
||||
cache = casadm.start_cache(cache_dev, cache_mode, force=True)
|
||||
|
||||
TestRun.LOGGER.info(f"Create filesystem '{filesystem}' on '{core_dev.path}'")
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core_dev.create_filesystem(filesystem)
|
||||
core = cache.add_core(core_dev)
|
||||
core.mount(mount_point)
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Copyright(c) 2019-2022 Intel Corporation
|
||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
from datetime import timedelta
|
||||
|
@@ -1,11 +1,13 @@
|
||||
#
|
||||
# Copyright(c) 2020-2022 Intel Corporation
|
||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
import os
|
||||
|
||||
import os
|
||||
import pytest
|
||||
import uuid
|
||||
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode, CacheLineSize, CacheModeTrait
|
||||
from core.test_run import TestRun
|
||||
|
@@ -3,22 +3,20 @@
|
||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
import posixpath
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from test_tools.os_tools import sync, drop_caches
|
||||
from test_tools.udev import Udev
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode, CacheModeTrait, CleaningPolicy, SeqCutOffPolicy
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet
|
||||
from test_tools import fs_tools
|
||||
from test_tools.blktrace import BlkTrace, BlkTraceMask, RwbsKind
|
||||
from test_tools.disk_tools import check_if_device_supports_trim
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fs_tools import Filesystem, create_random_test_file
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import ReadWrite, IoEngine
|
||||
from type_def.size import Size, Unit
|
||||
@@ -230,14 +228,14 @@ def test_trim_device_discard_support(
|
||||
cache = casadm.start_cache(cache_dev, cache_mode, force=True)
|
||||
cache.set_cleaning_policy(cleaning_policy)
|
||||
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core_dev.create_filesystem(filesystem)
|
||||
core = cache.add_core(core_dev)
|
||||
|
||||
with TestRun.step("Mount filesystem with discard option."):
|
||||
core.mount(mount_point, ["discard"])
|
||||
|
||||
with TestRun.step("Create random file."):
|
||||
test_file = fs_utils.create_random_test_file(
|
||||
test_file = create_random_test_file(
|
||||
posixpath.join(mount_point, "test_file"), core_dev.size * 0.2
|
||||
)
|
||||
occupancy_before = core.get_occupancy()
|
||||
|
@@ -1,11 +1,14 @@
|
||||
#
|
||||
# Copyright(c) 2020-2022 Intel Corporation
|
||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
import os
|
||||
from datetime import timedelta
|
||||
import pytest
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode, CacheLineSize
|
||||
from core.test_run import TestRun
|
||||
|
Reference in New Issue
Block a user