2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-05 00:35:23 +00:00

test/inhfd: fix lint warnings

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
Andrey Vagin
2018-09-20 22:22:34 +00:00
committed by Andrei Vagin
parent d13ff7e32a
commit a96d229876
4 changed files with 26 additions and 9 deletions

View File

@@ -1,15 +1,19 @@
import socket
import os
def create_fds():
(sk1, sk2) = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)
return (sk1.makefile("wb"), sk2.makefile("rb"))
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)]