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
Distinguish criu fail from criu crash in ZDTM #2140
Distinguish criu fail from criu crash in ZDTM #2140
Conversation
cf67d21
to
f27c51d
Compare
@sankalp-12 I think you are close to the final, but please read through the https://github.com/checkpoint-restore/criu/blob/criu-dev/CONTRIBUTING.md and try to fix your commit according to it:
|
f27c51d
to
94708f9
Compare
test/zdtm.py
Outdated
@@ -1032,6 +1036,11 @@ def run(action, | |||
|
|||
return ret | |||
|
|||
@staticmethod | |||
def signal_exit(ret): | |||
# TODO |
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.
TODO should contain a comment. Why can't we implement this method for the rpc?
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.
@avagin AFAIU, return ret < 0
can't be used here as the run()
static-method of the criu_rpc
class sets ret
as negative even in the case of non-signal exits, as given in the CRIUExceptionExternal
class in the test/pycriu/criu.py
file. This would lead to false positives.
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 don't suggest to check whether ret is negative or not. criu_rpc is under our control and we can fix it too.
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.
@avagin An instance of the CRIUExceptionExternal
class always has an errno attribute which is the error code returned by the process using the errno
module in Python. One of these error codes is EINTR: Interrupted system call
which is raised when a system call is interrupted by a signal. AFAIU, this should work, I would be glad to hear any better solutions or alternatives :)
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.
Have you tested your change? If the answer is yes, pls describe the process.
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.
No, I haven't been able to successfully run the zdtm
tests.
…riu_config classes. The 'signal_exit()' is implemented to check whether a process exited due to a signal. Signed-off-by: Sankalp Acharya <sankalpacharya1211@gmail.com>
88598b5
to
049c0af
Compare
This PR distinguishes
criu dump
crash fromcriu dump
fail in thezdtm.py
script. Now, zdtm reportscriu dump
crash as a test failure.Fixes the issue #350.