Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

Kamoppl
Copy link

@Kamoppl Kamoppl commented Oct 30, 2024

No description provided.

Kamil Gierszewski added 7 commits October 30, 2024 01:00
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>
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

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()}"
Copy link
Contributor

Choose a reason for hiding this comment

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

one string

Comment on lines +175 to +176
raid.umount_all_partitions()
raid.remove_partitions()
Copy link
Contributor

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()}
Copy link
Contributor

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()
Copy link
Contributor

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 :/

Comment on lines +36 to 39
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)
Copy link
Contributor

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")

Comment on lines +152 to 155
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:
Copy link
Contributor

Choose a reason for hiding this comment

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

get_sysfs_property

Copy link
Contributor

@Deixx Deixx left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants