From d12e2364c412caca4c227c656a67b1b1404d6875 Mon Sep 17 00:00:00 2001 From: Pavel Tikhomirov Date: Tue, 26 Jul 2022 13:20:58 +0300 Subject: [PATCH] zdtm: make root mount private in criu mntns If root mount in criu mntns is slave, it would be slave of host mount where criu is stored, so if someone mounts something in subdir of {criu-dir}/test/ on host while tests are running this mount can influence the test as it appears on top of root mount in criu mntns. 1) With mount-compat this mount can get into restored test mntns, which means wrong restore, as this mount was not there on dump. 2) With mount-v2 this mount would just fail container restore, as root container mount is mounted non-recursively to protect from unexpected mounts appear after restore. Signed-off-by: Pavel Tikhomirov --- test/zdtm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/zdtm.py b/test/zdtm.py index d264c4878..aefcb36a4 100755 --- a/test/zdtm.py +++ b/test/zdtm.py @@ -267,7 +267,7 @@ class ns_flavor: def init(self, l_bins, x_bins): subprocess.check_call( - ["mount", "--make-slave", "--bind", ".", self.root]) + ["mount", "--make-private", "--bind", ".", self.root]) self.root_mounted = True if not os.access(self.root + "/.constructed", os.F_OK):