-
Notifications
You must be signed in to change notification settings - Fork 170
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
Automate virtlogd maxclients related cases #5656
Automate virtlogd maxclients related cases #5656
Conversation
DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file) DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file) DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file) Command 'virsh list' finished with 0 after 0.032307155s DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file) cleaning libvirtd logs... DATA (filename=stdout.expected) => NOT FOUND (data sources: variant, test, file) Command 'virsh list' finished with 0 after 0.031746877s DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file) DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file) Command 'virsh list' finished with 0 after 0.047711199s |
6d2780a
to
a8fafea
Compare
""" | ||
virtlogd_config.max_clients = params.get("low_max_clients") | ||
cmd = ("systemctl status virtlogd | grep 'Active: active'") | ||
ret = process.run(cmd, ignore_status=True, shell=True, verbose=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.
ignore_status=True, shell=True
are using 9 times , could we set virsh_dargs = {"ignore_status": True, "shell": True} in global
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.
Define one global variable: debug_param = {'ignore_status': True, 'shell':True, 'verbose':True}, and replace them with this variable
elif expected_result == "valid_max_clients": | ||
check_valid_max_clients() | ||
elif expected_result == "valid_boundary_max_clients": | ||
check_valid_boundary_max_clients() | ||
elif expected_result == "nclients_occupied_released": | ||
check_nclients_occupied_released() | ||
elif expected_result == "invalid_boundary_max_clients": | ||
check_invalid_boundary_max_clients() | ||
elif expected_result == "guest_runnning_after_virtlogd_crash": | ||
check_guest_runnning_after_virtlogd_crash() | ||
elif expected_result == "reload_new_config": | ||
check_reload_new_config(virtlogd_config) | ||
elif expected_result == "log_filters_not_same_with_loglevel": | ||
check_log_filters_not_same_with_loglevel() | ||
elif expected_result == "reload_max_size_config": | ||
check_reload_max_size_config() | ||
elif expected_result == "set_max_size_config": | ||
check_set_max_size_config() | ||
elif expected_result == "set_max_backups": | ||
check_set_max_backups() | ||
elif expected_result == "reload_max_backups": | ||
check_reload_max_backups() |
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.
How about merge these lines?such as
if case in ["invalid_virtlogd_conf", "valid_max_clients",
"valid_boundary_max_clients", "nclients_occupied_released",
"invalid_boundary_max_clients", "reload_new_config",
"log_filters_not_same_with_loglevel", "reload_max_size_config",
"set_max_size_config",
"set_max_backups", "reload_max_backups"]:
check_test = eval("check_%s" % case)
check_test()
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.
updated
a8fafea
to
e80acb4
Compare
xx-59118,xx-86131,xx-86144,xx-86515 Signed-off-by: chunfuwen <[email protected]>
e80acb4
to
9a9e306
Compare
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.
LGTM
Automate virtlogd maxclients related cases
xx-59118,xx-86131,xx-86144,xx-86515