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

Distinguish criu fail from criu crash in ZDTM #2140

Conversation

sankalp-12
Copy link
Contributor

This PR distinguishes criu dump crash from criu dump fail in the zdtm.py script. Now, zdtm reports criu dump crash as a test failure.
Fixes the issue #350.

@mihalicyn
Copy link
Member

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

  • commit message header like zdtm: ...
  • Signed-off-by tag with real name

test/zdtm.py Outdated
@@ -1032,6 +1036,11 @@ def run(action,

return ret

@staticmethod
def signal_exit(ret):
# TODO
Copy link
Member

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?

Copy link
Contributor Author

@sankalp-12 sankalp-12 Apr 5, 2023

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.

Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

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>
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.

None yet

3 participants