-
Notifications
You must be signed in to change notification settings - Fork 82
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
Kamilg/speed up tf #1576
base: master
Are you sure you want to change the base?
Kamilg/speed up tf #1576
Conversation
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>
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>
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 this file belongs to some other PR ;)
raise Exception(f"Test requires {required_duts} DUTs, only {len(duts)} DUT configs " | ||
f"provided") | ||
raise Exception( | ||
f"Test requires {required_duts} DUTs, only {len(duts)} DUT configs " f"provided" |
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 string
raise Exception(f"{ex}\n" | ||
f"You need to specify DUT config. See the example_dut_config.py file") | ||
raise Exception( | ||
f"{ex}\n" f"You need to specify DUT config. See the example_dut_config.py file" |
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 string
raise Exception(f"Exception occurred during test setup:\n" | ||
f"{str(ex)}\n{traceback.format_exc()}") | ||
raise Exception( | ||
f"Exception occurred during test setup:\n" f"{str(ex)}\n{traceback.format_exc()}" |
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 string
raid.umount_all_partitions() | ||
raid.remove_partitions() |
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.
Raid.remove_partitions() starts by calling self.unmount_all_partitions() - also it's unmount now, not umount
raids = Raid.discover() | ||
for raid in raids: | ||
# stop only those RAIDs, which are comprised of test disks | ||
test_run_disk_ids = {dev.device_id for dev in TestRun.disks.values()} |
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.
move before for loop
if filter(lambda dev: dev.device_id in test_run_disk_ids, raid.array_devices): | ||
raid.umount_all_partitions() | ||
raid.remove_partitions() | ||
raid.stop() |
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.
reintroduced problem with raids, raid.unmount() is needed before stop
you basically reverted my recent fix for raid :/
max_io_size_path = posixpath.join( | ||
disk_utils.get_sysfs_path(core_device.device_id), "queue/max_sectors_kb" | ||
) | ||
default_max_io_size = fs_utils.read_file(max_io_size_path) |
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 recommend get_sysfs_property("max_sectors_kb")
path = posixpath.join(disk_utils.get_sysfs_path(dev_id), 'queue', c) | ||
command = f"cat {path}" | ||
output = TestRun.executor.run(command) | ||
if output.exit_code == 0: |
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.
get_sysfs_property
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.
Rename PR for obvious reason
No description provided.