2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-03 07:45:17 +00:00

zdtm: create a few external descriptros

Currently, we create only one external resource to check how it is
handled by criu. It is better to create more than one.

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:35 +00:00
committed by Andrei Vagin
parent a96d229876
commit 89c5fc9b06
5 changed files with 84 additions and 38 deletions

View File

@@ -4,7 +4,9 @@ import os
def create_fds():
(sk1, sk2) = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)
return (sk1.makefile("wb"), sk2.makefile("rb"))
(sk3, sk4) = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)
return [(sk1.makefile("wb"), sk2.makefile("rb")),
(sk3.makefile("wb"), sk4.makefile("rb"))]
def __sock_ino(sockf):