Skip to content

Conversation

@Kgierszx
Copy link
Contributor

No description provided.

Signed-off-by: Kamil Gierszewski <[email protected]>
Comment on lines +36 to +56
with TestRun.step("Create 4 partition for core devices"):
cache_dev = TestRun.disks['cache']
cache_dev.create_partitions([Size(1, Unit.GibiByte)])
cache_part = cache_dev.partitions[0]
core_dev = TestRun.disks['core']
core_dev.create_partitions(number_of_cores * [Size(50, Unit.GibiByte)])
core_part = core_dev.partitions

with TestRun.step("Start CAS with configuration, add 4 cores and create fs (ext3, ext4, "
"xfs) for 3 core devices"):
cache = casadm.start_cache(cache_part, force=True)
core_partitions = []
mount_point_dict = dict()
for index, filesystem in enumerate(Filesystem):
core_partitions.append(cache.add_core(core_part[index]))
core_partitions[index].create_filesystem(filesystem)
mount_point = f"/mnt/CasMetadataInvalidate/{index}"
core_partitions[index].mount(mount_point)
mount_point_dict[mount_point] = core_partitions[index]
unmounted_device = core_part[-1]
unmounted_core = cache.add_core(unmounted_device)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding core per each filesystem please add single core and parametrize test with filesystem.

Comment on lines +111 to +133
def __create_fio_jobs(write_policy, fio_write, pattern, mount_point_dict, unmounted_device_path,
verify_only=False):
fio = (Fio().create_command()
.io_engine(IoEngine.libaio)
.block_size(Size(1, Unit.Blocks4096), Size(1, Unit.Blocks512))
.size(Size(200, Unit.MebiByte))
.direct(False)
.read_write(fio_write)
.verify(VerifyMethod.pattern)
.verify_pattern(pattern)
.do_verify(write_policy == CacheMode.WA)
.allow_mounted_write()
.rand_seed(TestRun.random_seed)
)

if verify_only:
fio.verify_only()

for index, (mount_point, device) in enumerate(mount_point_dict.items()):
fio.add_job(f"job_{index}").directory(mount_point).target(f"fio_test_file_{index}")
fio.add_job().target(unmounted_device_path)

return fio
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of separating it out to the function you can create one Fio object and then just alter chosen parameters before running it. Alternatively we can think about something like Prototype design pattern.

unmounted_core.path, verify_only=True)
fio.run()

with TestRun.step("Check in statistics, that all reads are missed"):
Copy link
Member

@robertbaldyga robertbaldyga Oct 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/missed/misses (cache miss is a noun)

fio.run()

with TestRun.step("Add 4 cores and mount partitions"):
Udev.disable()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling udev is a legitimate step on its own. No need to hide it under core addition.

Comment on lines +31 to +34
title: "Verification if metadata is invalidated after removing core device", "Verification if
Open CAS do not keep any information from previous removed core device and do not use them
for new core", pass_criteria: - CAS device do not keep any information from previous removed
core device and do not use them for new core
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a mess ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants