Disk tools and fs tools refactor
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
This commit is contained in:
parent
940990e37a
commit
f7e7d3aa7f
@ -9,7 +9,7 @@ import os
|
||||
import re
|
||||
|
||||
from core.test_run import TestRun
|
||||
from test_tools.fs_utils import check_if_directory_exists, find_all_files
|
||||
from test_tools.fs_tools import check_if_directory_exists, find_all_files
|
||||
from test_tools.linux_packaging import DebSet, RpmSet
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@ from datetime import timedelta
|
||||
from string import Template
|
||||
from textwrap import dedent
|
||||
|
||||
from test_tools.fs_utils import (
|
||||
from test_tools.fs_tools import (
|
||||
check_if_directory_exists,
|
||||
create_directory,
|
||||
write_file,
|
||||
|
@ -8,6 +8,7 @@ from datetime import timedelta
|
||||
from typing import List
|
||||
from enum import Enum
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import SeqCutOffParameters, SeqCutOffPolicy
|
||||
from api.cas.casadm_params import StatsFilter
|
||||
@ -15,7 +16,7 @@ from api.cas.casadm_parser import get_seq_cut_off_parameters, get_core_info_for_
|
||||
from api.cas.statistics import CoreStats, CoreIoClassStats
|
||||
from core.test_run_utils import TestRun
|
||||
from storage_devices.device import Device
|
||||
from test_tools import fs_utils, disk_utils
|
||||
from test_tools import fs_tools, disk_tools
|
||||
from test_tools.os_tools import sync
|
||||
from test_tools.common.wait import wait
|
||||
from type_def.size import Unit, Size
|
||||
@ -50,7 +51,7 @@ class Core(Device):
|
||||
return get_core_info_for_cache_by_path(core_disk_path=self.core_device.path,
|
||||
target_cache_id=self.cache_id)
|
||||
|
||||
def create_filesystem(self, fs_type: disk_utils.Filesystem, force=True, blocksize=None):
|
||||
def create_filesystem(self, fs_type: test_tools.fs_utils.Filesystem, force=True, blocksize=None):
|
||||
super().create_filesystem(fs_type, force, blocksize)
|
||||
self.core_device.filesystem = self.filesystem
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
from api.cas import casadm_parser
|
||||
from api.cas.cache_config import CacheMode
|
||||
from storage_devices.device import Device
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
|
||||
|
||||
opencas_conf_path = "/etc/opencas/opencas.conf"
|
||||
|
@ -14,7 +14,7 @@ from datetime import timedelta
|
||||
from packaging import version
|
||||
|
||||
from core.test_run import TestRun
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
from test_tools.os_tools import get_kernel_version
|
||||
|
||||
default_config_file_path = "/tmp/opencas_ioclass.conf"
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 6970a4310790fc56023661a5c7c1bddca714ceba
|
||||
Subproject commit e656aa1e5fdb2c5b063baf0307c58b50ab1d24c4
|
@ -12,8 +12,8 @@ from core.test_run import TestRun
|
||||
from api.cas import casadm
|
||||
from storage_devices.disk import DiskType, DiskTypeSet
|
||||
from api.cas.cache_config import CacheMode
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from type_def.size import Size, Unit
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import ReadWrite, IoEngine
|
||||
|
@ -17,9 +17,9 @@ from api.cas.cli_messages import (
|
||||
)
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_utils.filesystem.file import File
|
||||
from connection.utils.output import CmdException
|
||||
from type_def.size import Size, Unit
|
||||
|
@ -8,10 +8,11 @@ import random
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeLowerThan, DiskTypeSet
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from connection.utils.output import CmdException
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
@ -46,7 +47,7 @@ def test_remove_core_when_other_mounted_auto_numeration():
|
||||
free_core = cache.add_core(core_device.partitions[0])
|
||||
mounted_cores = []
|
||||
for i, part in enumerate(core_device.partitions[1:]):
|
||||
part.create_filesystem(Filesystem.xfs)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.xfs)
|
||||
mounted_cores.append(cache.add_core(part))
|
||||
mounted_cores[i].mount(
|
||||
mount_point=f"{mount_point}{cache.cache_id}-{mounted_cores[i].core_id}"
|
||||
@ -90,7 +91,7 @@ def test_remove_core_when_other_mounted_custom_numeration():
|
||||
|
||||
mounted_cores = []
|
||||
for i, part in enumerate(core_device.partitions[1:]):
|
||||
part.create_filesystem(Filesystem.xfs)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.xfs)
|
||||
mounted_cores.append(
|
||||
cache.add_core(core_dev=part, core_id=int(f"{random_prefix}{random_interfix}{i}"))
|
||||
)
|
||||
|
@ -10,6 +10,7 @@ from time import sleep
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import (
|
||||
CacheMode,
|
||||
@ -21,7 +22,7 @@ from api.cas.casadm_params import StatsFilter
|
||||
from core.test_run_utils import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskTypeLowerThan, DiskType
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import IoEngine, ReadWrite
|
||||
from test_tools.udev import Udev
|
||||
@ -222,7 +223,7 @@ def test_multistream_seq_cutoff_stress_fs(streams_seq_rand, filesystem, cache_mo
|
||||
with TestRun.step("Create filesystem on core device"):
|
||||
cache_disk = TestRun.disks["cache"]
|
||||
core_disk = TestRun.disks["core"]
|
||||
core_disk.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
|
||||
with TestRun.step("Start cache and add core"):
|
||||
cache = casadm.start_cache(cache_dev=cache_disk, cache_mode=cache_mode, force=True)
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm, casadm_parser, dmesg
|
||||
from api.cas.casadm import standby_init
|
||||
from api.cas.cli import casadm_bin, standby_init_cmd
|
||||
@ -13,7 +14,7 @@ from core.test_run import TestRun
|
||||
from storage_devices.device import Device
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_utils.filesystem.file import File
|
||||
from test_tools.os_tools import sync
|
||||
from connection.utils.output import CmdException
|
||||
@ -557,7 +558,7 @@ def test_standby_init_with_preexisting_filesystem(filesystem):
|
||||
cache_id = 1
|
||||
|
||||
with TestRun.step("Create filesystem on cache device partition"):
|
||||
cache_device.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
|
||||
with TestRun.step("Try initialize cache without force flag"):
|
||||
output = TestRun.executor.run(
|
||||
|
@ -8,11 +8,12 @@ from datetime import timedelta
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm, cli_messages, cli
|
||||
from api.cas.cache_config import CacheMode, CleaningPolicy
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType, DiskTypeLowerThan
|
||||
from test_tools.disk_utils import get_device_filesystem_type, Filesystem
|
||||
from test_tools.fs_tools import Filesystem, get_device_filesystem_type
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import IoEngine, ReadWrite
|
||||
from test_tools.disk_finder import get_system_disks
|
||||
@ -98,7 +99,7 @@ def test_zero_metadata_filesystem(filesystem):
|
||||
cache_dev, core_disk, cache_disk = prepare_devices()
|
||||
|
||||
with TestRun.step("Create filesystem on core device."):
|
||||
core_disk.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
|
||||
with TestRun.step("Start cache and add core."):
|
||||
cache = casadm.start_cache(cache_dev, force=True)
|
||||
|
@ -25,10 +25,10 @@ from storage_devices.raid import Raid
|
||||
from storage_devices.ramdisk import RamDisk
|
||||
from test_tools.os_tools import kill_all_io
|
||||
from test_tools.udev import Udev
|
||||
from test_tools.disk_utils import PartitionTable, create_partition_table
|
||||
from test_tools.disk_tools import PartitionTable, create_partition_table
|
||||
from test_tools.device_mapper import DeviceMapper
|
||||
from test_tools.mdadm import Mdadm
|
||||
from test_tools.fs_utils import remove
|
||||
from test_tools.fs_tools import remove
|
||||
from test_tools import initramfs, git
|
||||
from log.logger import create_log, Log
|
||||
from test_utils.common.singleton import Singleton
|
||||
|
@ -12,8 +12,8 @@ import pytest
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode
|
||||
from core.test_run import TestRun
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import ReadWrite, IoEngine, VerifyMethod
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
|
@ -6,6 +6,7 @@
|
||||
import pytest
|
||||
from collections import namedtuple
|
||||
|
||||
import test_tools.fs_tools
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet
|
||||
from storage_devices.raid import Raid, RaidConfiguration, MetadataVariant, Level
|
||||
@ -13,9 +14,8 @@ from storage_devices.ramdisk import RamDisk
|
||||
from test_utils.drbd import Resource, Node
|
||||
from storage_devices.drbd import Drbd
|
||||
from test_tools.drbdadm import Drbdadm
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_utils import copy
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import copy, Filesystem
|
||||
from test_utils.filesystem.directory import Directory
|
||||
from test_utils.filesystem.file import File
|
||||
from type_def.size import Size, Unit
|
||||
@ -52,7 +52,7 @@ def test_create_example_partitions():
|
||||
test_disk.create_partitions(part_sizes)
|
||||
for i in TestRun.iteration(range(0, 5)):
|
||||
with TestRun.step(f"Create filesystem on partition {i}"):
|
||||
test_disk.partitions[i].create_filesystem(Filesystem.ext3)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext3)
|
||||
|
||||
|
||||
@pytest.mark.require_disk("cache1", DiskTypeSet([DiskType.optane, DiskType.nand]))
|
||||
|
@ -22,11 +22,10 @@ from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet
|
||||
from storage_devices.drbd import Drbd
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_utils.filesystem.file import File
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import ReadWrite
|
||||
from test_tools.fs_utils import create_directory
|
||||
from test_tools.fs_tools import create_directory, Filesystem
|
||||
from test_utils.drbd import Resource, Node
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
|
@ -21,15 +21,14 @@ from storage_devices.disk import DiskType, DiskTypeSet
|
||||
from storage_devices.drbd import Drbd
|
||||
from storage_devices.raid import Raid, RaidConfiguration, MetadataVariant, Level
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import ReadWrite
|
||||
from test_tools.fs_utils import readlink
|
||||
from test_tools.fs_tools import readlink, Filesystem
|
||||
from test_utils.drbd import Resource, Node
|
||||
from test_tools.os_tools import sync
|
||||
from test_tools.udev import Udev
|
||||
from type_def.size import Size, Unit
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
|
||||
|
||||
cache_id = 5
|
||||
|
@ -6,14 +6,15 @@
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm, casadm_parser, cli
|
||||
from api.cas.cache_config import CacheMode, CleaningPolicy, CacheModeTrait
|
||||
from api.cas.casadm_parser import wait_for_flushing
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.os_tools import DropCachesMode, sync, drop_caches
|
||||
from test_tools.udev import Udev
|
||||
from type_def.size import Size, Unit
|
||||
@ -54,7 +55,7 @@ def test_interrupt_core_flush(cache_mode, filesystem):
|
||||
cache.set_cleaning_policy(CleaningPolicy.nop)
|
||||
|
||||
with TestRun.step(f"Add core device with {filesystem} filesystem and mount it."):
|
||||
core_part.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core = cache.add_core(core_part)
|
||||
core.mount(mount_point)
|
||||
|
||||
@ -138,7 +139,7 @@ def test_interrupt_cache_flush(cache_mode, filesystem):
|
||||
cache.set_cleaning_policy(CleaningPolicy.nop)
|
||||
|
||||
with TestRun.step(f"Add core device with {filesystem} filesystem and mount it."):
|
||||
core_part.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core = cache.add_core(core_part)
|
||||
core.mount(mount_point)
|
||||
|
||||
@ -225,7 +226,7 @@ def test_interrupt_core_remove(cache_mode, filesystem):
|
||||
cache.set_cleaning_policy(CleaningPolicy.nop)
|
||||
|
||||
with TestRun.step(f"Add core device with {filesystem} filesystem and mount it"):
|
||||
core_part.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core = cache.add_core(core_part)
|
||||
core.mount(mount_point)
|
||||
|
||||
@ -442,7 +443,7 @@ def test_interrupt_cache_stop(cache_mode, filesystem):
|
||||
cache.set_cleaning_policy(CleaningPolicy.nop)
|
||||
|
||||
with TestRun.step(f"Add core device with {filesystem} filesystem and mount it."):
|
||||
core_part.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core = cache.add_core(core_part)
|
||||
core.mount(mount_point)
|
||||
|
||||
|
@ -11,7 +11,7 @@ from api.cas.cache_config import CacheMode, CleaningPolicy, CacheModeTrait
|
||||
from tests.lazy_writes.recovery.recovery_tests_methods import copy_file, compare_files
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
mount_point = "/mnt/cas"
|
||||
|
@ -6,11 +6,12 @@
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm, casadm_parser, cli, cli_messages
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils, disk_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools, disk_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_utils.filesystem.file import File
|
||||
from test_utils.filesystem.symlink import Symlink
|
||||
from type_def.size import Size, Unit
|
||||
@ -41,7 +42,7 @@ def test_load_cache_with_mounted_core():
|
||||
cache = casadm.start_cache(cache_part, force=True)
|
||||
|
||||
with TestRun.step("Add core device with xfs filesystem to cache and mount it."):
|
||||
core_part.create_filesystem(Filesystem.xfs)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.xfs)
|
||||
core = cache.add_core(core_part)
|
||||
core.mount(mount_point)
|
||||
|
||||
@ -116,7 +117,7 @@ def test_stop_cache_with_mounted_partition():
|
||||
|
||||
with TestRun.step("Create xfs filesystems on one exported object partition "
|
||||
"and on the non-partitioned exported object."):
|
||||
fs_part.create_filesystem(Filesystem.xfs)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.xfs)
|
||||
core2.create_filesystem(Filesystem.xfs)
|
||||
|
||||
with TestRun.step("Mount created filesystems."):
|
||||
@ -180,7 +181,7 @@ def test_stop_cache_with_mounted_partition_no_mtab():
|
||||
cache = casadm.start_cache(cache_part, force=True)
|
||||
|
||||
with TestRun.step("Add core device with xfs filesystem and mount it."):
|
||||
core_part.create_filesystem(Filesystem.xfs)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.xfs)
|
||||
core = cache.add_core(core_part)
|
||||
core.mount(mount_point)
|
||||
|
||||
|
@ -15,7 +15,7 @@ from type_def.size import Size, Unit
|
||||
from api.cas.cache_config import CacheLineSize
|
||||
from api.cas.cache import CacheStatus
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.fs_utils import check_if_symlink_exists
|
||||
from test_tools.fs_tools import check_if_symlink_exists
|
||||
from test_tools.os_tools import sync
|
||||
|
||||
|
||||
|
@ -5,11 +5,12 @@
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas.core import CoreStatus
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType, DiskTypeLowerThan
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from connection.utils.output import CmdException
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
@ -89,7 +90,7 @@ def test_core_pool_exclusive_open():
|
||||
core_disk = TestRun.disks["core"]
|
||||
core_disk.create_partitions([Size(1, Unit.GibiByte)])
|
||||
core_dev = core_disk.partitions[0]
|
||||
core_dev.create_filesystem(Filesystem.ext4)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext4)
|
||||
cache_id = 1
|
||||
core_id = 1
|
||||
|
||||
@ -126,7 +127,7 @@ def test_core_pool_exclusive_open():
|
||||
with TestRun.step("Check if it is impossible to make filesystem on the core device "
|
||||
"from core pool."):
|
||||
try:
|
||||
core_dev.create_filesystem(Filesystem.ext4, force=False)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext4, force=False)
|
||||
TestRun.fail("Successfully created filesystem on core from core pool, "
|
||||
"this is unexpected behaviour.")
|
||||
except Exception:
|
||||
|
@ -25,7 +25,7 @@ from api.cas.statistics import CacheStats
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType, DiskTypeLowerThan
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import IoEngine, ReadWrite
|
||||
from test_utils.filesystem.file import File
|
||||
|
@ -12,7 +12,7 @@ from api.cas.cache_config import CacheMode
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType, DiskTypeLowerThan
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_utils.filesystem.file import File
|
||||
from test_tools.os_tools import drop_caches, DropCachesMode, sync
|
||||
from type_def.size import Size, Unit
|
||||
|
@ -13,7 +13,7 @@ from api.cas.cache_config import CacheMode
|
||||
from api.cas.init_config import InitConfig
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskTypeLowerThan, DiskTypeSet, DiskType
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import ReadWrite, IoEngine
|
||||
from test_tools.os_tools import sync, drop_caches
|
||||
|
@ -14,8 +14,7 @@ from api.cas.cli_messages import check_stderr_msg, stop_cache_errors
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskTypeLowerThan, DiskTypeSet, DiskType
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_utils import check_if_file_exists
|
||||
from test_tools.fs_tools import check_if_file_exists, Filesystem
|
||||
from test_utils.filesystem.file import File
|
||||
from test_tools.os_tools import sync
|
||||
from type_def.size import Size, Unit
|
||||
|
@ -14,7 +14,7 @@ from api.cas.init_config import InitConfig
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_utils.filesystem.file import File
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools import fstab
|
||||
from test_tools.dd import Dd
|
||||
from type_def.size import Unit, Size
|
||||
|
@ -7,11 +7,12 @@ from datetime import timedelta
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import IoEngine, CpusAllowedPolicy, ReadWrite
|
||||
from test_tools.os_tools import get_dut_cpu_physical_cores
|
||||
@ -47,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}'")
|
||||
core_dev.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core = cache.add_core(core_dev)
|
||||
core.mount(mount_point)
|
||||
|
||||
|
@ -8,15 +8,17 @@ 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_utils
|
||||
from test_tools import fs_tools
|
||||
from test_tools.blktrace import BlkTrace, BlkTraceMask, RwbsKind
|
||||
from test_tools.disk_utils import Filesystem, check_if_device_supports_trim
|
||||
from test_tools.disk_tools import check_if_device_supports_trim
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import ReadWrite, IoEngine
|
||||
from type_def.size import Size, Unit
|
||||
@ -228,7 +230,7 @@ def test_trim_device_discard_support(
|
||||
cache = casadm.start_cache(cache_dev, cache_mode, force=True)
|
||||
cache.set_cleaning_policy(cleaning_policy)
|
||||
|
||||
core_dev.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core = cache.add_core(core_dev)
|
||||
|
||||
with TestRun.step("Mount filesystem with discard option."):
|
||||
|
@ -10,7 +10,7 @@ from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode, CacheLineSize
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@ from api.cas.casadm_params import OutputFormat
|
||||
from api.cas.ioclass_config import IoClass
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
ioclass_config_path = "/tmp/opencas_ioclass.conf"
|
||||
|
@ -9,12 +9,13 @@ from datetime import datetime
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import ioclass_config, casadm
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_utils.filesystem.directory import Directory
|
||||
from test_utils.filesystem.file import File
|
||||
from test_tools.os_tools import drop_caches, DropCachesMode, sync
|
||||
@ -46,7 +47,7 @@ def test_ioclass_directory_depth(filesystem):
|
||||
with TestRun.step(
|
||||
f"Prepare {filesystem.name} filesystem and mount {core.path} " f"at {mountpoint}."
|
||||
):
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
|
||||
@ -178,7 +179,7 @@ def test_ioclass_directory_file_operations(filesystem):
|
||||
with TestRun.step(
|
||||
f"Prepare {filesystem.name} filesystem " f"and mounting {core.path} at {mountpoint}."
|
||||
):
|
||||
core.create_filesystem(fs_type=filesystem)
|
||||
test_tools.fs_utils.create_filesystem(fs_type=filesystem)
|
||||
core.mount(mount_point=mountpoint)
|
||||
sync()
|
||||
|
||||
@ -346,7 +347,7 @@ def test_ioclass_directory_dir_operations(filesystem):
|
||||
with TestRun.step(
|
||||
f"Prepare {filesystem.name} filesystem " f"and mount {core.path} at {mountpoint}."
|
||||
):
|
||||
core.create_filesystem(fs_type=filesystem)
|
||||
test_tools.fs_utils.create_filesystem(fs_type=filesystem)
|
||||
core.mount(mount_point=mountpoint)
|
||||
sync()
|
||||
|
||||
|
@ -8,9 +8,10 @@ from math import isclose
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from .io_class_common import *
|
||||
|
||||
|
||||
@ -37,7 +38,7 @@ def test_io_class_eviction_priority():
|
||||
|
||||
with TestRun.step(f"Preparing filesystem and mounting {core.path} at {mountpoint}"):
|
||||
filesystem = Filesystem.xfs
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
|
||||
|
@ -7,11 +7,12 @@ import random
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import ioclass_config, casadm
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_utils.filesystem.file import File
|
||||
from test_tools.os_tools import sync, DropCachesMode, drop_caches
|
||||
from type_def.size import Size, Unit
|
||||
@ -56,7 +57,7 @@ def test_ioclass_file_extension():
|
||||
casadm.load_io_classes(cache_id=cache.cache_id, file=ioclass_config_path)
|
||||
|
||||
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}."):
|
||||
core.create_filesystem(Filesystem.ext3)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext3)
|
||||
core.mount(mountpoint)
|
||||
|
||||
with TestRun.step("Flush cache."):
|
||||
@ -123,7 +124,7 @@ def test_ioclass_file_name_prefix():
|
||||
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||
previous_occupancy = cache.get_occupancy()
|
||||
|
||||
core.create_filesystem(Filesystem.ext3)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext3)
|
||||
core.mount(mountpoint)
|
||||
|
||||
current_occupancy = cache.get_occupancy()
|
||||
@ -209,7 +210,7 @@ def test_ioclass_file_extension_preexisting_filesystem():
|
||||
|
||||
with TestRun.step(f"Prepare files on raw block device."):
|
||||
casadm.remove_core(cache.cache_id, core_id=core.core_id)
|
||||
core.core_device.create_filesystem(Filesystem.ext3)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext3)
|
||||
core.core_device.mount(mountpoint)
|
||||
|
||||
for ext in extensions:
|
||||
@ -291,7 +292,7 @@ def test_ioclass_file_offset():
|
||||
casadm.load_io_classes(cache_id=cache.cache_id, file=ioclass_config_path)
|
||||
|
||||
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}."):
|
||||
core.create_filesystem(Filesystem.ext3)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext3)
|
||||
core.mount(mountpoint)
|
||||
|
||||
with TestRun.step("Flush cache."):
|
||||
@ -383,7 +384,7 @@ def test_ioclass_file_size(filesystem):
|
||||
with TestRun.step(
|
||||
f"Prepare {filesystem.name} filesystem and mount {core.path} " f"at {mountpoint}."
|
||||
):
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
|
||||
|
@ -6,14 +6,15 @@
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm, ioclass_config
|
||||
from api.cas.cache_config import CacheMode
|
||||
from api.cas.ioclass_config import IoClass
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from storage_devices.lvm import Lvm, LvmConfiguration
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import ReadWrite, IoEngine
|
||||
from type_def.size import Size, Unit
|
||||
@ -58,7 +59,7 @@ def test_io_class_lvm_on_cas():
|
||||
lvm = lvms[0]
|
||||
|
||||
with TestRun.step("Create filesystem for LVM and mount it."):
|
||||
lvm.create_filesystem(Filesystem.ext4)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext4)
|
||||
lvm.mount(mount_point)
|
||||
|
||||
with TestRun.step("Prepare and load IO class config."):
|
||||
|
@ -9,13 +9,14 @@ from math import isclose
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import ioclass_config, casadm
|
||||
from api.cas.cache_config import CacheMode, CacheLineSize
|
||||
from api.cas.ioclass_config import IoClass, default_config_file_path
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.os_tools import sync
|
||||
from test_tools.udev import Udev
|
||||
from type_def.size import Unit, Size
|
||||
@ -56,7 +57,7 @@ def test_io_class_occupancy_directory_write(io_size_multiplication, cache_mode):
|
||||
|
||||
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||
filesystem = Filesystem.xfs
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
|
||||
@ -186,7 +187,7 @@ def test_io_class_occupancy_directory_read(io_size_multiplication):
|
||||
|
||||
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||
filesystem = Filesystem.xfs
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
|
||||
@ -316,7 +317,7 @@ def test_ioclass_occupancy_sum_cache():
|
||||
|
||||
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||
filesystem = Filesystem.xfs
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
|
||||
|
@ -8,13 +8,14 @@ from math import isclose
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import ioclass_config, casadm
|
||||
from api.cas.cache_config import CacheMode, CacheLineSize
|
||||
from api.cas.ioclass_config import IoClass, default_config_file_path
|
||||
from storage_devices.device import Device
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.os_tools import sync
|
||||
from test_tools.udev import Udev
|
||||
from tests.io_class.io_class_common import (
|
||||
@ -53,7 +54,7 @@ def test_ioclass_occupancy_load():
|
||||
|
||||
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||
filesystem = Filesystem.xfs
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
|
||||
|
@ -8,13 +8,14 @@ from math import isclose
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import ioclass_config, casadm
|
||||
from api.cas.cache_config import CacheMode, CacheLineSize
|
||||
from api.cas.ioclass_config import IoClass, default_config_file_path
|
||||
from core.test_run_utils import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.os_tools import sync
|
||||
from test_tools.udev import Udev
|
||||
from type_def.size import Unit
|
||||
@ -55,7 +56,7 @@ def test_ioclass_repart(io_class_size_multiplication):
|
||||
|
||||
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||
filesystem = Filesystem.xfs
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
|
||||
|
@ -6,13 +6,14 @@
|
||||
import pytest
|
||||
from recordclass import recordclass
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import ioclass_config, casadm
|
||||
from api.cas.cache_config import CacheMode, CacheLineSize
|
||||
from api.cas.ioclass_config import IoClass, default_config_file_path
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.os_tools import sync
|
||||
from test_tools.udev import Udev
|
||||
from type_def.size import Unit
|
||||
@ -47,7 +48,7 @@ def test_ioclass_resize(cache_line_size, new_occupancy):
|
||||
|
||||
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||
filesystem = Filesystem.xfs
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
|
||||
|
@ -7,11 +7,11 @@ import pytest
|
||||
from collections import namedtuple
|
||||
from math import isclose
|
||||
|
||||
|
||||
import test_tools.fs_tools
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from api.cas.ioclass_config import IoClass, default_config_file_path
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from core.test_run import TestRun
|
||||
from type_def.size import Size, Unit
|
||||
from .io_class_common import (
|
||||
@ -44,7 +44,7 @@ def test_io_class_pinning_eviction():
|
||||
cache_line_count = cache.get_statistics().config_stats.cache_size
|
||||
|
||||
with TestRun.step("Mount filesystem"):
|
||||
core.create_filesystem(Filesystem.xfs)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.xfs)
|
||||
core.mount(mountpoint)
|
||||
|
||||
with TestRun.step("Prepare test dirs"):
|
||||
@ -141,7 +141,7 @@ def test_pinned_ioclasses_eviction():
|
||||
cache_line_count = cache.get_statistics().config_stats.cache_size
|
||||
|
||||
with TestRun.step("Mount filesystem"):
|
||||
core.create_filesystem(Filesystem.xfs)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.xfs)
|
||||
core.mount(mountpoint)
|
||||
|
||||
with TestRun.step("Prepare test dirs"):
|
||||
|
@ -9,7 +9,7 @@ from api.cas import ioclass_config, cli_messages
|
||||
from api.cas.ioclass_config import IoClass
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
from connection.utils.output import CmdException
|
||||
from type_def.size import Unit, Size
|
||||
from tests.io_class.io_class_common import prepare, ioclass_config_path
|
||||
|
@ -8,12 +8,13 @@ from collections import namedtuple
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import ioclass_config, casadm
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.os_tools import drop_caches, DropCachesMode, sync
|
||||
from test_tools.udev import Udev
|
||||
from type_def.size import Unit, Size
|
||||
@ -42,7 +43,7 @@ def test_ioclass_usage_sum():
|
||||
|
||||
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||
filesystem = Filesystem.xfs
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import os
|
||||
import pytest
|
||||
from datetime import timedelta
|
||||
|
||||
import test_tools.fs_tools
|
||||
import test_tools.runlevel
|
||||
from api.cas import ioclass_config, casadm_parser
|
||||
from api.cas.cache_config import CacheMode
|
||||
@ -15,8 +16,8 @@ from api.cas.init_config import InitConfig
|
||||
from api.cas.ioclass_config import IoClass
|
||||
from core.test_run_utils import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import IoEngine, ReadWrite
|
||||
from test_tools.os_tools import sync, drop_caches
|
||||
@ -51,7 +52,7 @@ def test_io_class_service_load(runlevel):
|
||||
run_io_dir_read(core.path)
|
||||
|
||||
with TestRun.step("Create ext4 filesystem on CAS device and mount it."):
|
||||
core.create_filesystem(Filesystem.ext4)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext4)
|
||||
core.mount(mountpoint)
|
||||
|
||||
with TestRun.step(
|
||||
|
@ -13,8 +13,8 @@ from api.cas.cache_config import CacheMode, CleaningPolicy, SeqCutOffPolicy
|
||||
from api.cas.ioclass_config import IoClass
|
||||
from core.test_run_utils import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import IoEngine, ReadWrite
|
||||
from test_tools.os_tools import sync, drop_caches
|
||||
|
@ -9,13 +9,14 @@ from itertools import permutations
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import ioclass_config, casadm
|
||||
from api.cas.ioclass_config import IoClass
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import ReadWrite, IoEngine
|
||||
from test_utils.filesystem.file import File
|
||||
@ -232,7 +233,7 @@ def test_ioclass_direct(filesystem):
|
||||
f"Preparing {filesystem.name} filesystem and mounting {core.path} at"
|
||||
f" {mountpoint}"
|
||||
)
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
else:
|
||||
@ -328,7 +329,7 @@ def test_ioclass_metadata(filesystem):
|
||||
with TestRun.step(
|
||||
f"Prepare {filesystem.name} filesystem and mount {core.path} " f"at {mountpoint}."
|
||||
):
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
|
||||
@ -474,7 +475,7 @@ def test_ioclass_id_as_condition():
|
||||
with TestRun.step(
|
||||
f"Prepare {filesystem.name} filesystem " f"and mount {core.path} at {mountpoint}."
|
||||
):
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
fs_utils.create_directory(base_dir_path)
|
||||
sync()
|
||||
@ -615,7 +616,7 @@ def test_ioclass_conditions_or():
|
||||
with TestRun.step(
|
||||
f"Prepare {filesystem.name} filesystem " f"and mount {core.path} at {mountpoint}."
|
||||
):
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
for i in range(1, 6):
|
||||
fs_utils.create_directory(f"{mountpoint}/dir{i}")
|
||||
@ -682,7 +683,7 @@ def test_ioclass_conditions_and():
|
||||
TestRun.LOGGER.info(
|
||||
f"Preparing {filesystem.name} filesystem " f"and mounting {core.path} at {mountpoint}"
|
||||
)
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
sync()
|
||||
|
||||
@ -743,7 +744,7 @@ def test_ioclass_effective_ioclass():
|
||||
with TestRun.LOGGER.step(
|
||||
f"Preparing {filesystem.name} filesystem " f"and mounting {core.path} at {mountpoint}"
|
||||
):
|
||||
core.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
core.mount(mountpoint)
|
||||
fs_utils.create_directory(test_dir)
|
||||
sync()
|
||||
|
@ -7,7 +7,7 @@ from datetime import timedelta
|
||||
|
||||
import test_tools.common.wait
|
||||
from core.test_run import TestRun
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
from test_tools.dd import Dd
|
||||
from test_utils.filesystem.file import File
|
||||
from type_def.size import Size, Unit
|
||||
|
@ -7,12 +7,13 @@ import os
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode, CacheModeTrait, CacheLineSize, CleaningPolicy, \
|
||||
FlushParametersAcp
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType, DiskTypeLowerThan
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import IoEngine, ReadWrite
|
||||
from test_utils.filesystem.file import File
|
||||
@ -57,7 +58,7 @@ def test_recovery_all_options(cache_mode, cache_line_size, cleaning_policy, file
|
||||
file_md5 = test_file.md5sum()
|
||||
|
||||
with TestRun.step(f"Make {filesystem} on core device."):
|
||||
core_device.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
|
||||
with TestRun.step("Mount core device."):
|
||||
core_device.mount(mount_point)
|
||||
|
@ -7,12 +7,12 @@ import os
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm, cli
|
||||
from api.cas.cache_config import CacheMode, CacheModeTrait, CleaningPolicy, SeqCutOffPolicy
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType, DiskTypeLowerThan
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_utils import readlink
|
||||
from test_tools.fs_tools import readlink, Filesystem
|
||||
from test_tools.os_tools import DropCachesMode, sync, drop_caches
|
||||
from test_tools.udev import Udev
|
||||
from connection.utils.output import CmdException
|
||||
@ -126,7 +126,7 @@ def test_recovery_flush_reset_fs(cache_mode, fs):
|
||||
core_device = core_disk.partitions[0]
|
||||
|
||||
with TestRun.step(f"Create {fs} filesystem on core."):
|
||||
core_device.create_filesystem(fs)
|
||||
test_tools.fs_utils.create_filesystem(fs)
|
||||
|
||||
with TestRun.step("Create test files."):
|
||||
source_file, target_file = create_test_files(test_file_size)
|
||||
|
@ -8,11 +8,12 @@ import os
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm, cli_messages
|
||||
from api.cas.cache_config import CacheMode, CacheModeTrait, CacheLineSize
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType, DiskTypeLowerThan
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from connection.utils.output import CmdException
|
||||
from type_def.size import Size, Unit
|
||||
from tests.lazy_writes.recovery.recovery_tests_methods import create_test_files, copy_file, \
|
||||
@ -53,7 +54,7 @@ def test_recovery_unplug_cache_fs(cache_mode, cls, filesystem, direct):
|
||||
source_file_md5 = source_file.md5sum()
|
||||
|
||||
with TestRun.step("Create filesystem on core device."):
|
||||
core_device.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
|
||||
with TestRun.step("Start cache and add core."):
|
||||
cache = casadm.start_cache(cache_device, cache_mode, cls)
|
||||
|
@ -7,16 +7,16 @@
|
||||
import pytest
|
||||
from datetime import timedelta
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode, CacheModeTrait, CleaningPolicy, SeqCutOffPolicy
|
||||
from api.cas.cli import stop_cmd
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.device import Device
|
||||
from storage_devices.disk import DiskType, DiskTypeLowerThan, DiskTypeSet
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import IoEngine, ReadWrite
|
||||
from test_tools.fs_utils import remove
|
||||
from test_tools.fs_tools import remove, Filesystem
|
||||
from test_utils.filesystem.file import File
|
||||
from test_tools.os_tools import sync
|
||||
from test_tools.udev import Udev
|
||||
@ -56,7 +56,7 @@ def test_flush_over_640_gibibytes_with_fs(cache_mode, fs):
|
||||
cache = casadm.start_cache(cache_part, cache_mode)
|
||||
|
||||
with TestRun.step(f"Add core with {fs.name} filesystem to cache and mount it."):
|
||||
core_dev.create_filesystem(fs)
|
||||
test_tools.fs_utils.create_filesystem(fs)
|
||||
core = cache.add_core(core_dev)
|
||||
core.mount(mnt_point)
|
||||
|
||||
@ -66,7 +66,7 @@ def test_flush_over_640_gibibytes_with_fs(cache_mode, fs):
|
||||
|
||||
with TestRun.step("Create a test file on a separate disk"):
|
||||
src_dir_path = "/mnt/flush_640G_test"
|
||||
separate_dev.create_filesystem(fs)
|
||||
test_tools.fs_utils.create_filesystem(fs)
|
||||
separate_dev.mount(src_dir_path)
|
||||
|
||||
test_file_main = File.create_file(f"{src_dir_path}/test_file_main")
|
||||
|
@ -5,14 +5,14 @@
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode, CleaningPolicy, CacheModeTrait, SeqCutOffPolicy
|
||||
from storage_devices.device import Device
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from core.test_run import TestRun
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_utils import create_random_test_file, remove
|
||||
from test_tools.fs_tools import create_random_test_file, remove, Filesystem
|
||||
from test_tools.iostat import IOstatBasic
|
||||
from test_utils.filesystem.file import File
|
||||
from test_tools.os_tools import sync
|
||||
@ -180,7 +180,7 @@ def test_clean_remove_core_with_fs(cache_mode, fs):
|
||||
cache = casadm.start_cache(cache_part, cache_mode)
|
||||
|
||||
with TestRun.step(f"Add core with {fs.name} filesystem to cache and mount it."):
|
||||
core_part.create_filesystem(fs)
|
||||
test_tools.fs_utils.create_filesystem(fs)
|
||||
core = cache.add_core(core_part)
|
||||
core.mount(mnt_point)
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
import pytest
|
||||
from time import sleep
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import (CacheMode,
|
||||
CacheModeTrait,
|
||||
@ -14,8 +15,7 @@ from api.cas.cache_config import (CacheMode,
|
||||
Time)
|
||||
from storage_devices.disk import DiskType, DiskTypeSet
|
||||
from core.test_run import TestRun
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_utils import create_random_test_file
|
||||
from test_tools.fs_tools import create_random_test_file, Filesystem
|
||||
from test_tools.os_tools import sync
|
||||
from test_tools.scsi_debug import Logs, syslog_path
|
||||
from type_def.size import Size, Unit
|
||||
@ -47,7 +47,7 @@ def test_flush_signal_core(cache_mode):
|
||||
|
||||
with TestRun.step("Start cache and add SCSI device with xfs filesystem as core."):
|
||||
cache = casadm.start_cache(cache_part, cache_mode)
|
||||
core_dev.create_filesystem(Filesystem.xfs)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.xfs)
|
||||
core = cache.add_core(core_dev)
|
||||
|
||||
with TestRun.step("Mount exported object."):
|
||||
@ -145,7 +145,7 @@ def test_flush_signal_cache(cache_mode):
|
||||
|
||||
with TestRun.step("Start SCSI device as cache and add core with xfs filesystem."):
|
||||
cache = casadm.start_cache(cache_dev, cache_mode)
|
||||
core_part.create_filesystem(Filesystem.xfs)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.xfs)
|
||||
core = cache.add_core(core_part)
|
||||
|
||||
with TestRun.step("Mount exported object."):
|
||||
|
@ -13,7 +13,7 @@ from api.cas.cache_config import CacheLineSize
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.device import Device
|
||||
from storage_devices.disk import DiskTypeSet, DiskType
|
||||
from test_tools import disk_utils
|
||||
from test_tools import disk_tools
|
||||
from connection.utils.output import CmdException
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
|
@ -15,7 +15,7 @@ from api.cas.installer import (
|
||||
rsync_opencas_sources,
|
||||
)
|
||||
from core.test_run import TestRun
|
||||
from test_tools.fs_utils import FilesPermissions, find_all_items
|
||||
from test_tools.fs_tools import FilesPermissions, find_all_items
|
||||
|
||||
|
||||
repo_files_perms_exceptions = {
|
||||
|
@ -6,6 +6,7 @@
|
||||
import pytest
|
||||
from time import sleep
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import (
|
||||
CacheMode,
|
||||
@ -14,10 +15,9 @@ from api.cas.cache_config import (
|
||||
)
|
||||
from storage_devices.disk import DiskType, DiskTypeSet
|
||||
from core.test_run import TestRun
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.os_tools import sync
|
||||
from test_tools.scsi_debug import Logs, syslog_path
|
||||
from test_tools.fs_utils import create_random_test_file
|
||||
from test_tools.fs_tools import create_random_test_file, Filesystem
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
mount_point = "/mnt/cas"
|
||||
@ -45,7 +45,7 @@ def test_flush_signal_propagation_cache():
|
||||
|
||||
with TestRun.step("Start cache on SCSI device and add core with xfs filesystem"):
|
||||
cache = casadm.start_cache(cache_dev, CacheMode.WT)
|
||||
core_dev.create_filesystem(Filesystem.xfs)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.xfs)
|
||||
core = cache.add_core(core_dev)
|
||||
|
||||
with TestRun.step("Turn off cleaning policy and sequential cutoff"):
|
||||
@ -91,7 +91,7 @@ def test_flush_signal_propagation_core():
|
||||
|
||||
with TestRun.step("Start cache and add SCSI device with xfs filesystem as core."):
|
||||
cache = casadm.start_cache(cache_dev, CacheMode.WT)
|
||||
core_dev.create_filesystem(Filesystem.xfs)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.xfs)
|
||||
core = cache.add_core(core_dev)
|
||||
|
||||
with TestRun.step("Turn off cleaning policy and sequential cutoff"):
|
||||
|
@ -11,7 +11,7 @@ import pytest
|
||||
|
||||
from api.cas.installer import clean_opencas_repo, rsync_opencas_sources
|
||||
from core.test_run import TestRun
|
||||
from test_tools.fs_utils import (
|
||||
from test_tools.fs_tools import (
|
||||
check_if_regular_file_exists,
|
||||
check_if_symlink_exists,
|
||||
readlink,
|
||||
|
@ -9,8 +9,7 @@ from api.cas.cache_config import CacheMode, CleaningPolicy, SeqCutOffPolicy
|
||||
from api.cas.progress_bar import check_progress_bar
|
||||
from core.test_run_utils import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_utils import create_random_test_file
|
||||
from test_tools.fs_tools import create_random_test_file, Filesystem
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
|
||||
|
@ -9,8 +9,7 @@ from api.cas.cache_config import CacheMode, CleaningPolicy, SeqCutOffPolicy
|
||||
from api.cas.progress_bar import check_progress_bar
|
||||
from core.test_run_utils import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_utils import create_random_test_file
|
||||
from test_tools.fs_tools import create_random_test_file, Filesystem
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
|
||||
|
@ -9,8 +9,7 @@ from api.cas.cache_config import CacheMode, CleaningPolicy, SeqCutOffPolicy
|
||||
from api.cas.progress_bar import check_progress_bar
|
||||
from core.test_run_utils import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_utils import create_random_test_file
|
||||
from test_tools.fs_tools import create_random_test_file, Filesystem
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
|
||||
|
@ -11,10 +11,11 @@ from typing import List
|
||||
|
||||
import yaml
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode, CacheLineSize, KernelParameters, CleaningPolicy
|
||||
from core.test_run import TestRun
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
|
||||
@ -66,7 +67,7 @@ def prepare_cas_instance(
|
||||
cache.set_cleaning_policy(cleaning_policy)
|
||||
|
||||
if mount_point:
|
||||
core_device.create_filesystem(Filesystem.ext4)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext4)
|
||||
core = cache.add_core(core_device)
|
||||
core.mount(mount_point)
|
||||
else:
|
||||
|
@ -9,7 +9,7 @@ import re
|
||||
import pytest
|
||||
|
||||
from core.test_run import TestRun
|
||||
from test_tools.fs_utils import Permissions, PermissionsUsers, PermissionSign
|
||||
from test_tools.fs_tools import Permissions, PermissionsUsers, PermissionSign
|
||||
from test_utils.filesystem.fs_item import FsItem
|
||||
|
||||
|
||||
|
@ -6,14 +6,15 @@
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm, cli
|
||||
from api.cas.cache_config import CacheMode
|
||||
from api.cas.casadm_params import OutputFormat
|
||||
from api.cas.init_config import InitConfig
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.os_tools import create_user, check_if_user_exists
|
||||
from connection.utils.output import CmdException
|
||||
from type_def.size import Size, Unit
|
||||
@ -51,7 +52,7 @@ def test_user_cli():
|
||||
cache = casadm.start_cache(cache_dev, force=True)
|
||||
|
||||
with TestRun.step("Add core to cache and mount it."):
|
||||
core_part1.create_filesystem(Filesystem.ext3)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext3)
|
||||
core = cache.add_core(core_part1)
|
||||
core.mount(mount_point)
|
||||
|
||||
@ -403,7 +404,7 @@ def test_user_service():
|
||||
cache = casadm.start_cache(cache_dev, force=True)
|
||||
|
||||
with TestRun.step("Add core to cache and mount it."):
|
||||
core_dev.create_filesystem(Filesystem.ext3)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext3)
|
||||
core = cache.add_core(core_dev)
|
||||
core.mount(mount_point)
|
||||
|
||||
|
@ -7,12 +7,13 @@ import random
|
||||
import re
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas.cache_config import CacheMode, CacheLineSize, CacheModeTrait
|
||||
from api.cas.casadm import OutputFormat, print_statistics, start_cache
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools.dd import Dd
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
iterations = 64
|
||||
@ -45,7 +46,7 @@ def test_output_consistency(cache_line_size, cache_mode, test_object):
|
||||
|
||||
with TestRun.step("Start cache and add core with a filesystem."):
|
||||
cache = start_cache(cache_part, cache_mode, cache_line_size, force=True)
|
||||
core_part.create_filesystem(Filesystem.xfs)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.xfs)
|
||||
exp_obj = cache.add_core(core_part)
|
||||
|
||||
with TestRun.step("Select object to test."):
|
||||
|
@ -6,6 +6,7 @@ import random
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas import ioclass_config
|
||||
from api.cas.cache_config import CleaningPolicy, CacheMode, CacheLineSize
|
||||
@ -24,7 +25,7 @@ from api.cas.statistics import (
|
||||
)
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_utils.filesystem.file import File
|
||||
from test_tools.os_tools import sync
|
||||
from test_tools.udev import Udev
|
||||
@ -310,7 +311,7 @@ def prepare(random_cls, cache_count=1, cores_per_cache=1):
|
||||
cache_devices = cache_device.partitions
|
||||
core_devices = core_device.partitions
|
||||
for core_device in core_devices:
|
||||
core_device.create_filesystem(Filesystem.ext4)
|
||||
test_tools.fs_utils.create_filesystem(Filesystem.ext4)
|
||||
|
||||
Udev.disable()
|
||||
caches, cores = [], []
|
||||
|
@ -15,7 +15,7 @@ from api.cas.cache_config import CacheMode
|
||||
from api.cas.ioclass_config import IoClass
|
||||
from core.test_run_utils import TestRun
|
||||
from storage_devices.disk import DiskTypeSet, DiskType, DiskTypeLowerThan
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import IoEngine
|
||||
from connection.utils.asynchronous import start_async_func
|
||||
|
@ -7,6 +7,7 @@ import posixpath
|
||||
import random
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import (
|
||||
CacheMode,
|
||||
@ -14,7 +15,7 @@ from api.cas.cache_config import (
|
||||
)
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from core.test_run import TestRun
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from type_def.size import Size, Unit
|
||||
from test_tools.udev import Udev
|
||||
from test_tools.fio.fio import Fio
|
||||
@ -104,7 +105,7 @@ def test_change_cleaning_policy_during_io_fs(filesystem):
|
||||
cache = casadm.start_cache(cache_dev.partitions[0], CacheMode.WB, force=True)
|
||||
|
||||
with TestRun.step(f"Create filesystem on core device"):
|
||||
core_dev.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
|
||||
with TestRun.step(f"Add core to the cache"):
|
||||
core = cache.add_core(core_dev)
|
||||
|
@ -11,8 +11,8 @@ from api.cas.cache_config import CacheMode
|
||||
from api.cas.init_config import InitConfig
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from core.test_run import TestRun
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
iterations_per_config = 50
|
||||
|
@ -5,9 +5,9 @@
|
||||
#
|
||||
|
||||
from api.cas.init_config import InitConfig, opencas_conf_path
|
||||
from test_tools import fs_utils
|
||||
from test_tools import fs_tools
|
||||
from core.test_run import TestRun
|
||||
from test_tools.disk_utils import get_block_device_names_list
|
||||
from test_tools.disk_tools import get_block_device_names_list
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
test_file_size = Size(500, Unit.KiloByte)
|
||||
|
@ -9,7 +9,7 @@ from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from core.test_run import TestRun
|
||||
from api.cas.cache import CacheMode, casadm
|
||||
from type_def.size import Size, Unit
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from .common import create_files_with_md5sums, compare_md5sums
|
||||
|
||||
mount_point = "/mnt/test"
|
||||
|
@ -11,8 +11,8 @@ from .common import compare_md5sums, create_files_with_md5sums
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from storage_devices.raid import Raid, RaidConfiguration, MetadataVariant, Level
|
||||
from test_tools import fs_utils
|
||||
from test_tools.disk_utils import Filesystem
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
mount_point = "/mnt/test"
|
||||
|
@ -5,13 +5,15 @@
|
||||
|
||||
import pytest
|
||||
|
||||
import test_tools.fs_tools
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.partition import Partition
|
||||
from test_tools import fs_utils, disk_utils
|
||||
from test_tools.disk_utils import PartitionTable, Filesystem
|
||||
from test_tools import fs_tools, disk_tools
|
||||
from test_tools.disk_tools import PartitionTable
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from type_def.size import Size, Unit
|
||||
|
||||
mount_point = "/mnt/cas"
|
||||
@ -43,7 +45,7 @@ def test_cas_preserves_partitions(partition_table, filesystem, cache_mode):
|
||||
|
||||
with TestRun.step("Create filesystem on core devices."):
|
||||
for i in range(cores_number):
|
||||
core_dev.partitions[i].create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
|
||||
with TestRun.step("Mount core devices and create test files."):
|
||||
files = []
|
||||
@ -124,7 +126,7 @@ def test_partition_create_cas(partition_table, filesystem, cache_mode):
|
||||
|
||||
with TestRun.step("Create filesystem on core devices."):
|
||||
for part in core.partitions:
|
||||
part.create_filesystem(filesystem)
|
||||
test_tools.fs_utils.create_filesystem(filesystem)
|
||||
|
||||
with TestRun.step("Mount core devices and create test files."):
|
||||
files = []
|
||||
|
Loading…
Reference in New Issue
Block a user