[CRIU] [PATCH] add join-ns opt to criu restore
Pavel Emelyanov
xemul at virtuozzo.com
Fri Mar 25 03:15:11 PDT 2016
On 03/25/2016 12:52 PM, Dengguangxing wrote:
> Hi, Pavel
>
> Thanks for your reviewing.
>
> I will refactor this patch, divide it into several patches and resend them later.
>
>> Note, that once the patch gets merged we'll need the zdtm.py extention
>> to test this functionaluty. Only after this (and after tests pass) I'll
>> be able to move this patch from criu-dev branch into master and release.
>>
>
> where can I get the zdtm guidance? I don't know how to write a test case for
> this new-added opts. An existing similiar test-case will help :)
Sure: https://criu.org/ZDTM_Test_Suite
I think what you need to do it add yet another variation to the zdtm.py script that
would run all the tests as described, but the restore would happen with --join-ns
option you introduce.
>>> + pr_perror("Can't get ns file %s stat", buf);
>>> + goto err_self;
>>> + }
>>> +
>>> + if (st.st_ino != self_st.st_ino) {
>>
>> Is this check _really_ required? Kernel would behave OK and won't
>> move the process if namespaces already match.
> yes, this is necessary. because calling set_ns() to the same user-ns
> twice will return an error, so we will check it here.
OK. Please, write code comment here describing this behavior.
-- Pavel
More information about the CRIU
mailing list