[CRIU] [PATCH] zdtm.sh: mount devpts with newinstance in zdtm containers
Andrey Vagin
avagin at openvz.org
Tue Aug 12 05:58:24 PDT 2014
Otherwise here is a race condition. A first test allocates /dev/pts/X
and it is dumped. Then a second test allocates the same tty /dev/pts/X.
If the first test will be restored in this moment, criu will fail:
(00.041789) 85: Error (tty.c:285): tty: Unable to open /dev/ptmx
with specified index 0
Fixes: bb5f5b19c613 "zdtm: add ability to execute non-namespacess tests concurrently"
Reported-by: Mr Jenkins
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
test/zdtm.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 569ce94..395b256 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -884,6 +884,9 @@ while :; do
mount --make-rprivate / &&
umount -l /proc &&
mount -t proc proc /proc/ &&
+ umount -l /dev/pts &&
+ mount -t devpts zdtm_pts /dev/pts -o newinstance,ptmxmode=666 &&
+ mount --bind /dev/pts/ptmx /dev/ptmx &&
./zdtm.sh $args
)"
exit
--
1.9.3
More information about the CRIU
mailing list