zdtm: handle inherit_fd-s in the rpc mode

Submitted by Andrei Vagin on Aug. 8, 2018, 5:43 a.m.

Details

Message ID 20180808054316.1556-1-avagin@virtuozzo.com
State New
Series "zdtm: handle inherit_fd-s in the rpc mode"
Headers show

Commit Message

Andrei Vagin Aug. 8, 2018, 5:43 a.m.
./test//zdtm.py --set inhfd run --all --rpc

Cc: Adrian Reber <areber@redhat.com> 
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
---
 test/zdtm.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

Patch hide | download patch | download mbox

diff --git a/test/zdtm.py b/test/zdtm.py
index c795490ae..d3b73c4df 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -814,6 +814,16 @@  class criu_rpc:
 			if arg == '--tcp-established':
 				criu.opts.tcp_established = True
 				continue
+			if arg == '--restore-sibling':
+				criu.opts.rst_sibling = True
+				continue
+			if arg == "--inherit-fd":
+				inhfd = criu.opts.inherit_fd.add()
+				key = args.pop(0)
+				fd, key = key.split(":", 1)
+				inhfd.fd = int(fd[3:-1])
+				inhfd.key = key
+				continue
 
 			raise test_fail_exc('RPC for %s required' % arg)