Merge pull request #482 from Ostrokrzew/os_dependent

Add 'os_dependent' marker to tests with TF update
This commit is contained in:
Robert Baldyga 2020-08-26 11:02:02 +02:00 committed by GitHub
commit 89992e6ef8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 30 additions and 0 deletions

View File

@ -23,6 +23,7 @@ stop_size = int(Size(128, Unit.KibiByte))
runtime = datetime.timedelta(hours=12) / (stop_size / 512)
@pytest.mark.os_dependent
@pytest.mark.parametrize("cache_mode", [CacheMode.WT, CacheMode.WB])
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))

View File

@ -33,6 +33,7 @@ def shuffled_fs_list(n):
return random.sample(list(itertools.islice(itertools.cycle(Filesystem), n)), n)
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core1", DiskTypeLowerThan("cache"))
@pytest.mark.require_disk("core2", DiskTypeLowerThan("cache"))
@ -121,6 +122,7 @@ def test_data_integrity_5d_dss(filesystems):
f"Cache mode: {mode} Filesystem: {fs}")
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core1", DiskTypeLowerThan("cache"))
@pytest.mark.require_disk("core2", DiskTypeLowerThan("cache"))

View File

@ -14,6 +14,7 @@ from storage_devices.disk import DiskTypeSet, DiskTypeLowerThan, DiskType
from test_utils.size import Size, Unit
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
def test_udev_core_partition():
@ -54,6 +55,7 @@ def test_udev_core_partition():
check_if_dev_in_core_pool(dev)
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeSet([DiskType.hdd, DiskType.hdd4k, DiskType.sata]))
def test_udev_core():
@ -97,6 +99,7 @@ def test_udev_core():
TestRun.fail(f"Core status is {core.get_status()} instead of active.")
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.parametrizex("cache_mode", CacheMode)
def test_udev_cache_load(cache_mode):
@ -140,6 +143,7 @@ def test_udev_cache_load(cache_mode):
TestRun.LOGGER.info("Cache is correctly loaded.")
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeSet([DiskType.sata, DiskType.hdd]))
def test_neg_udev_cache_load():

View File

@ -22,6 +22,7 @@ from test_utils.size import Size, Unit
mount_point = "/mnt/test"
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@pytest.mark.parametrizex("runlevel", [Runlevel.runlevel5, Runlevel.runlevel3])

View File

@ -3,12 +3,15 @@
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
import pytest
from api.cas import cas_module, casctl
from api.cas.cas_module import CasModule
from core.test_run import TestRun
from test_utils import os_utils
@pytest.mark.os_dependent
def test_init_status():
"""
title: CAS management device status

View File

@ -22,6 +22,7 @@ mountpoint = "/mnt"
filepath = f"{mountpoint}/file"
@pytest.mark.os_dependent
@pytest.mark.remote_only
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))

View File

@ -18,6 +18,7 @@ from test_utils.os_utils import drop_caches, DropCachesMode, sync, Udev
from .io_class_common import *
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@pytest.mark.parametrizex("filesystem", Filesystem)
@ -109,6 +110,7 @@ def test_ioclass_directory_depth(filesystem):
f"Expected: {base_occupancy + test_file_2.size}, actual: {new_occupancy}"
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@pytest.mark.parametrizex("filesystem", Filesystem)
@ -281,6 +283,7 @@ def test_ioclass_directory_dir_operations(filesystem):
directory=dir_1, with_delay=True)
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@pytest.mark.parametrizex("filesystem", Filesystem)

View File

@ -303,6 +303,7 @@ def test_ioclass_file_offset():
TestRun.LOGGER.error(f"Inappropriately cached offset: {file_offset}")
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@pytest.mark.parametrizex("filesystem", Filesystem)

View File

@ -159,6 +159,7 @@ def test_ioclass_request_size():
TestRun.fail("Dirty data present!")
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@pytest.mark.parametrizex("filesystem", list(Filesystem) + [False])
@ -244,6 +245,7 @@ def test_ioclass_direct(filesystem):
f"Expected: {base_occupancy + io_size}, actual: {new_occupancy}")
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@pytest.mark.parametrizex("filesystem", Filesystem)
@ -334,6 +336,7 @@ def test_ioclass_metadata(filesystem):
TestRun.fail("No requests to metadata while deleting directory with files!")
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@pytest.mark.parametrizex("filesystem", Filesystem)
@ -473,6 +476,7 @@ def test_ioclass_id_as_condition(filesystem):
f"Expected: {base_occupancy + ioclass_file_size}, actual: {new_occupancy}")
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@pytest.mark.parametrizex("filesystem", Filesystem)
@ -521,6 +525,7 @@ def test_ioclass_conditions_or(filesystem):
f"Expected: {base_occupancy + file_size}, actual: {new_occupancy}")
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@pytest.mark.parametrizex("filesystem", Filesystem)
@ -570,6 +575,7 @@ def test_ioclass_conditions_and(filesystem):
f"Expected: {base_occupancy}, actual: {new_occupancy}")
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@pytest.mark.parametrizex("filesystem", Filesystem)

View File

@ -24,6 +24,7 @@ mount_point = "/mnt/cas"
syslog_path = "/var/log/messages"
@pytest.mark.os_dependent
@pytest.mark.require_plugin("scsi_debug_fua_signals", dev_size_mb="4096", opts="1")
@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites))
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@ -121,6 +122,7 @@ def test_flush_signal_core(cache_mode):
cache.stop()
@pytest.mark.os_dependent
@pytest.mark.require_plugin("scsi_debug_fua_signals", dev_size_mb="2048", opts="1")
@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites))
@pytest.mark.require_disk("core", DiskTypeSet([DiskType.hdd, DiskType.hdd4k, DiskType.sata]))
@ -218,6 +220,7 @@ def test_flush_signal_cache(cache_mode):
cache.stop()
@pytest.mark.os_dependent
@pytest.mark.require_plugin("scsi_debug_fua_signals", dev_size_mb="2048", opts="1")
@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites))
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))

View File

@ -15,6 +15,7 @@ from test_utils.output import CmdException
from test_utils.size import Size, Unit
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@pytest.mark.require_plugin("scsi_debug")

View File

@ -149,6 +149,7 @@ def test_kedr_start_cache(module, unload_modules, install_kedr):
Kedr.stop()
@pytest.mark.os_dependent
@pytest.mark.parametrize("module", cas_module.CasModule)
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
@ -213,6 +214,7 @@ def test_kedr_basic_io_raw(module, unload_modules, install_kedr):
Kedr.stop()
@pytest.mark.os_dependent
@pytest.mark.parametrize("module", cas_module.CasModule)
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))

View File

@ -19,6 +19,7 @@ cores_number = 2
iterations_per_config = 5
@pytest.mark.os_dependent
@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites))
@pytest.mark.parametrizex("cleaning_policy", CleaningPolicy)
@pytest.mark.parametrizex("cache_line_size", CacheLineSize)

View File

@ -16,6 +16,7 @@ from test_tools.fio.fio_param import ReadWrite, IoEngine
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
@pytest.mark.os_dependent
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
def test_trim_start_discard():
"""