-
Notifications
You must be signed in to change notification settings - Fork 172
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
snp_basic_config: Add snp basic config test case #4224
base: master
Are you sure you want to change the base?
Conversation
73ba367
to
c184836
Compare
@XueqiangWei @zhencliu @JinLiul Could you please help to review this? |
Signed-off-by: Zixi Chen <[email protected]>
@zixi-chen Commit signature has been enabled, please repush the pullreq with -S. Thanks. |
Done, thanks. |
Signed-off-by: Zixi Chen <[email protected]>
Update a retry function to fetch certs from the server. |
f = open(snp_module_path, "r") | ||
output = f.read().strip() | ||
f.close() |
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.
with open(xxx) as f:
output = f.read().strip()
if params.get("singlesocket_host_check") == "yes": | ||
s, o = process.getstatusoutput(params.get("singlesocket_check_cmd"), shell=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.
remove singlesocket_host_check param in cfg, just check if singlesocket_check_cmd is defined,e.g.
singlesocket_check_cmd = params.get("singlesocket_check_cmd")
if singlesocket_check_cmd:
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.
you may use process.system to return the status only if you dont need the output, or you may print out the output in the following fail()
test.cancel("Host cpu has more than 1 socket, skip the case.") | ||
|
||
vm_name = params["main_vm"] | ||
env_process.preprocess_vm(test, params, env, vm_name) |
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.
remove this line should work fine imo
status, output = session.cmd_status_output(guest_cmd, timeout=360) | ||
if status: | ||
test.fail("Guest script error") |
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.
use cmd_status if you don't want an output, or print out the output in the fail()
kill_vm = yes | ||
login_timeout = 240 | ||
start_vm = no | ||
image_snapshot = yes |
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 guess you want a snapshot here in order to keep the original image(image1) clean after your testing without any cleanup works, right? Have you checked if it works as expected?
ID: 2863