[CRIU] [PATCH 9/9] test: zdtm -- Add proc-self test
Pavel Emelyanov
xemul at parallels.com
Fri May 17 10:38:33 EDT 2013
On 05/17/2013 06:31 PM, Cyrill Gorcunov wrote:
> On Fri, May 17, 2013 at 06:27:43PM +0400, Pavel Emelyanov wrote:
>>> But we don't support yet same ID restore, so at least minimum check is needed,
>>> if you prefer I can simply drop this test out.
>>
>> No, I prefer if test after restore opens /proc/self/net again and compares
>> it with what is opened.
>
> Hmm. I don't get it. If ns id will change, should we fail then? I guess we might
> do the following then
>
> - test for ns name
> if mismatch -- test error
> - test for ns id
> if mismatch -- print this out
> but still PASS
>
fd_before = open("/proc/self/ns/net"); /* -> net[:12345:] */
dump
restore
/* fd_before -> net[:54321:] */
fd_after = open("/proc/self/ns/net"); /* -> net[:54321:] */
if (memcmp(readlink(fd3), readlink(fd2))
fail("namespace changed");
else
pass();
More information about the CRIU
mailing list