Open
Conversation
Signed-off-by: Kamil Gierszewski <kamilx.gierszewski@intel.com>
470ba1c to
8cafdf4
Compare
robertbaldyga
requested changes
Oct 17, 2022
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) |
Member
There was a problem hiding this comment.
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 |
Member
There was a problem hiding this comment.
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"): |
Member
There was a problem hiding this comment.
s/missed/misses (cache miss is a noun)
| fio.run() | ||
|
|
||
| with TestRun.step("Add 4 cores and mount partitions"): | ||
| Udev.disable() |
Member
There was a problem hiding this comment.
Disabling udev is a legitimate step on its own. No need to hide it under core addition.
Deixx
reviewed
Aug 30, 2024
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.