-
Notifications
You must be signed in to change notification settings - Fork 605
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
criu-ns: Add tests for criu-ns script #2114
Conversation
You can enable your test to run in CI like this:
|
Understood, thanks @Snorch |
@warusadura do you have any specific questions about pty? |
@mihalicyn thanks for asking. Yes, |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## criu-dev #2114 +/- ##
============================================
+ Coverage 70.38% 70.43% +0.05%
============================================
Files 133 133
Lines 34008 34008
============================================
+ Hits 23936 23955 +19
+ Misses 10072 10053 -19 ☔ View full report in Codecov by Sentry. |
8f45a00
to
77a33f2
Compare
@mihalicyn apologies if this question was too broad to answer. Most of the doubts I had about I just pushed some new changes. The Also, the |
Also, the CI is complaining a |
I think you can do it the same way as Andrei did https://github.com/checkpoint-restore/criu/blame/criu-dev/test/others/shell-job/run.py#L24 As you can see that test spawns a new process which sleeps forever until file with the name
As I can see from the log you still have external pts:
Self-check question:
How many processes you have after this piece of code got executed (suppose that before you had only calling process, i.e. 1)? Why? You have: calling process, then forked process, then child of forked process created with Now compare this with Andrei's code:
As you can see we have a few calls to |
@mihalicyn Thanks for the detailed response. Understood! Progress update: during the without Also, the CI is complaining a FileNotFoundError. Is the missing file, criu binary executable? How do I avoid this? |
Theoretically, we shouldn't face such issue, because if Let's check what's happening on restore:
This happens because you haven't closed
You can reproduce the issue locally using
You can adjust |
I have some ideas about the "not found" error in criu-ns, we can add to criu-ns script:
and override criu binary to self-compiled version in test. |
0753706
to
a62bac7
Compare
The CI is working \o/ |
You should always fix/explain ci fails, now you have 6: Fedora ASAN Test - likely unrelared
Fedora Rawhide Test - likely unrelated
CentOS 7 based test - obviousely yours to fix
CentOS Stream 8 based test/CentOS Stream 9 based test - obviousely yours to fix (there should be no external or detached mounts in your test)
Vagrant Fedora based test (no VDSO) - likely unrelated
|
|
Will do, thanks @Snorch |
--criu-binary argument provides a way to supply the CRIU binary location to run_criu(). Related to: checkpoint-restore#1909 Signed-off-by: Dhanuka Warusadura <csx@tuta.io>
These changes remove and update the changes introduced in 7177938 in favor of the Python version in CI. os.waitstatus_to_exitcode() function appeared in Python 3.9 Related to: checkpoint-restore#1909 Signed-off-by: Dhanuka Warusadura <csx@tuta.io>
4545696
to
d673805
Compare
CentOS 7 based test
We get this error on second dump where criu-ns script tries to get right pid of task in pidns. This functionality can't work without With something like:
Except that it looks ready to merge for me. |
These changes add test implementations for criu-ns script. Fixes: checkpoint-restore#1909 Signed-off-by: Dhanuka Warusadura <csx@tuta.io>
These changes fix the `ImportError: No module named pathlib` error when executing criu-ns tests located at criu/test/others/criu-ns Signed-off-by: Dhanuka Warusadura <csx@tuta.io>
CentOS 7 CI environment uses Python 2. To execute criu-ns script in CentOS 7 changing the current shebang line to python is required. This reverse the changes made in a15a63f Signed-off-by: Dhanuka Warusadura <csx@tuta.io>
understood, thanks @Snorch |
These changes add test implementations for criu-ns script.
Fixes: #1909