-
Notifications
You must be signed in to change notification settings - Fork 96
tests: Tests refactor #1653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
tests: Tests refactor #1653
Conversation
89ba2c6 to
dbf1a66
Compare
| cache.reset_counters() | ||
|
|
||
| with TestRun.step(f"Fill exported object with dirty data"): | ||
| with TestRun.step(f"Prepare I/O to fill exported object with dirty data"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary f-string
how is I/O prepared here? (preparing config for I/O tool is not a real test step)
| dirty_4k = cache.get_statistics().usage_stats.dirty.get_value(Unit.Blocks4096) | ||
| fio.verification_with_pattern("0xdeadbeef") | ||
|
|
||
| with TestRun.step("Run fio"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see this step before writing my comment for the previous file ;)
| with TestRun.step("Prepare I/O to separate disk test file"): | ||
| fio = ( | ||
| Fio() | ||
| .create_command() | ||
| .io_engine(IoEngine.libaio) | ||
| .read_write(ReadWrite.write) | ||
| .block_size(bs) | ||
| .block_size(Size(2, Unit.MebiByte)) | ||
| .direct() | ||
| .io_depth(256) | ||
| .target(core) | ||
| .size(file_size) | ||
| ) | ||
| fio.default_run_time = timedelta(hours=4) # timeout for non-time-based fio | ||
|
|
||
| with TestRun.step("Run I/O"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one step
| core_disk = TestRun.disks["core"] | ||
|
|
||
| cache_disk.create_partitions([Size(100, Unit.MebiByte)]) | ||
| core_disk.create_partitions([Size(5, Unit.GibiByte)] * 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 is a small number of partitions in a test the randomises the order of adding them
|
|
||
| for _ in TestRun.iteration(range(0, iterations_number)): | ||
| with TestRun.step("Detach all core devices"): | ||
| for core in cores: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think detach order should be also randomized
| """ | ||
| title: Test for triple level cache. | ||
| description: | | ||
| Test if cache can be used as core of other cache up to three levels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is incorrect - cache can never be used as a core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll move this to another PR
| with TestRun.step("Create file on exported object"): | ||
| md5_sums = create_files_with_md5sums(mount_point, 100) | ||
|
|
||
| with TestRun.step("Check md5 sums between original file and exported object"): | ||
| compare_md5sums(md5_sums, mount_point, copy_to_tmp=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confusing steps - if you create the file on the exported object, then if is the original file, so the last step implies comparing the test file to itself ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll move this to another PR
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
…hronous read of the device Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
dbd184f to
237e25d
Compare
No description provided.