-
Notifications
You must be signed in to change notification settings - Fork 46
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
Improve the management of workdir cleanup for debugging purposes #221
Conversation
hector-cao
commented
Sep 13, 2024
- In case of test failure, we would like that the workdir of qemu is not cleaned up so that we can do some debugging.
- Improve the management of environment variable TDXTEST_DEBUG that forbids the clean up of these workdirs at any case
979d42a
to
2bfc941
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.
Hi Hector, overall looks good. Added a comment. One other comment, another option when terminating Qemu is to add the kill() signal after trying to terminate properly. (in stop())
""" | ||
if report.failed: | ||
# enable debug flag to avoid cleanup to happen | ||
Qemu.QemuMachine.set_debug(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.
why do we want to avoid cleanup when a test fails? Don't we want the next text to start cleanly? I understand if we running individually and we can set "debug", but not generally
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.
each qemu has its own working folder (/tmp/tdxtest-xxxxx/) that is not shared with other tests qemu instances
dcc4cde
to
687c7d7
Compare
977defe
to
ec38679
Compare
- In case of test failure, we would like that the workdir of qemu is not cleaned up so that we can do some debugging. - Improve the management of environment variable TDXTEST_DEBUG that forbids the clean up of these workdirs at any case
ec38679
to
f4a1ab7
Compare
I decided to split this MR into 2, the current one is now only about workdir clean up and debug flag, the second one (#227) will be on the kvm unload issue |
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