[CRIU] [PATCH 0/4] add join-ns option to criu restore

Pavel Emelyanov xemul at virtuozzo.com
Thu Apr 7 06:04:32 PDT 2016


On 04/07/2016 05:22 AM, Dengguangxing wrote:
> 
>>>>
>>>> Why do you exclude all sock tests from --join-ns run?
>>>>
>>> join-ns zdtm run with network namespace, and sock tests would fail because the former
>>> networknamespace is deprecated.
>>
>> But not all of them should. E.g. tests with unix sockets should continue working,
>> tests with tcp listening sockets only should work.
>>
>> Would you check what exact tests fail and why?
>>
>> -- Pavel
>>
> Hi, Pavel:
> 
> these are failing tests:
> 	zdtm/transition/socket-tcp, zdtm/transition/socket-tcp6, zdtm/static/socket-tcp6-local, zdtm/static/socket_udplite
> 	zdtm/static/socket-tcpbuf6, zdtm/static/socket-tcpbuf are failing for the same reason:
> 		"Can't connect inet socket back: Network is unreachable"

Hm... OK, this is possible since we don't have the needed NIC in newns.

> 	zdtm/static/packet_sock
> 		"Error (sockets.c:371): Can't set 263:18 (len 4): Invalid argument" while calling setsockopt() in restore

Ouch.

> 	zdtm/static/socket-tcp
> 		"socket-tcp.c:190: can't write (errno = 104 (Connection reset by peer))"

Yup, no networking inside.

> 	zdtm/static/socket_udp
> 		"FAIL: socket_udp.c:96: Can't recv C (errno = 11 (Resource temporarily unavailable))"

Looks like similar.

> Socket is missing in the new network namespace, and connections break, these failings seem reasonable.
> 
> maybe we can exclude all socket-tcp*, socket_udp* and packet_sock tests, does that make sense?

Yes, this would be better. But would you do it in a nicer way rather than
regexp-ing from the zdtm.py. For each test there can exist a $testname.desc
file near it, and flags field may denote some features.

E.g. test/zdtm/static/bridge.desc
{'flavor': 'ns uns', 'deps': [ '/bin/sh', '/usr/bin/sort', '/bin/grep', '/sbin/ip', '/usr/bin/diff'], 'flags': 'suid'}

So let's introduce yet another flag called 'samens' and mark tests that do
not allow for --join-ns restore with it.

-- Pavel




More information about the CRIU mailing list