[CRIU] [PATCH 4/5] zdtm: add a new test to check inherited tty-s
Andrey Vagin
avagin at openvz.org
Fri Dec 25 06:49:36 PST 2015
From: Andrew Vagin <avagin at virtuozzo.com>
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
test/inhfd/tty.py | 13 +++++++++++++
test/inhfd/tty.py.desc | 1 +
2 files changed, 14 insertions(+)
create mode 100755 test/inhfd/tty.py
create mode 100644 test/inhfd/tty.py.desc
diff --git a/test/inhfd/tty.py b/test/inhfd/tty.py
new file mode 100755
index 0000000..73f11d2
--- /dev/null
+++ b/test/inhfd/tty.py
@@ -0,0 +1,13 @@
+import os, pty
+
+def create_fds():
+ (fd1, fd2) = pty.openpty()
+ return (os.fdopen(fd2, "w"), os.fdopen(fd1, "r"))
+
+def filename(pipef):
+ st = os.fstat(pipef.fileno())
+ return 'tty[%x:%x]' % (st.st_rdev, st.st_dev)
+
+def dump_opts(sockf):
+ st = os.fstat(sockf.fileno())
+ return ["--external", 'tty[%x:%x]' % (st.st_rdev, st.st_dev)]
diff --git a/test/inhfd/tty.py.desc b/test/inhfd/tty.py.desc
new file mode 100644
index 0000000..10666c8
--- /dev/null
+++ b/test/inhfd/tty.py.desc
@@ -0,0 +1 @@
+{ 'flavor': 'h' }
--
2.4.3
More information about the CRIU
mailing list