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
from test_utils.size import Unit, Size

start_size = int(Size(512, Unit.Byte))
step = int(Size(512, Unit.Byte))
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"))
def test_data_integrity_12h(cache_mode):
    """
    title: Data integrity test in passed cache mode with duration time equal to 12h
        description: Create 1 cache with size between 40MB and 50MB and 1 core with size 150MB
        pass_criteria:
            - System does not crash.
            - All operations complete successfully.
            - Data consistency is being preserved.
    """
    with TestRun.step(f"Prepare cache instance in {cache_mode} cache mode"):
        cache, core = prepare(cache_mode)

    with TestRun.step("Fill cache"):
        fill_cache(core.path)
예제 #2
0
start_size = Size(512, Unit.Byte).get_value()
stop_size = Size(128, Unit.KibiByte).get_value()
file_min_size = Size(4, Unit.KibiByte).get_value()
file_max_size = Size(2, Unit.GibiByte).get_value()
runtime = datetime.timedelta(days=5)


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"))
@pytest.mark.require_disk("core3", DiskTypeLowerThan("cache"))
@pytest.mark.require_disk("core4", DiskTypeLowerThan("cache"))
@pytest.mark.parametrize("filesystems", [shuffled_fs_list(4)])
def test_data_integrity_5d_dss(filesystems):
    """
        title: |
          Data integrity test on three cas instances with different
          file systems with duration time equal to 5 days
        description: |
          Create 3 cache instances on caches equal to 50GB and cores equal to 150GB
          with different file systems, and run workload with data verification.
        pass_criteria:
            - System does not crash.
            - All operations complete successfully.