mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-22 01:31:34 +00:00
The latter option should hide, the official API is the --external. This patch tests the option, thus completing the deprecation. The legacy -x|--ext-unix-sk test is still in zdtm/static/socket-ext. travis-ci: success for unix: Test the --external instead of --ext-unix-sk Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
15 lines
364 B
Python
Executable file
15 lines
364 B
Python
Executable file
import socket
|
|
import os
|
|
|
|
def create_fds():
|
|
(sk1, sk2) = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)
|
|
return (sk1.makefile("w"), sk2.makefile("r"))
|
|
|
|
def __sock_ino(sockf):
|
|
return os.fstat(sockf.fileno()).st_ino
|
|
|
|
def filename(sockf):
|
|
return 'socket:[%d]' % __sock_ino(sockf)
|
|
|
|
def dump_opts(sockf):
|
|
return ['--external', 'unix[%d]' % __sock_ino(sockf)]
|