[CRIU] [PATCH 1/2] zdtm: check a case when a task is in sub-mntns, its child is in root mtnns

Andrey Vagin avagin at openvz.org
Fri Nov 27 05:00:02 PST 2015


From: Andrew Vagin <avagin at virtuozzo.com>

Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 test/zdtm/live/static/tempfs_subns.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/test/zdtm/live/static/tempfs_subns.c b/test/zdtm/live/static/tempfs_subns.c
index 178400d..99169be 100644
--- a/test/zdtm/live/static/tempfs_subns.c
+++ b/test/zdtm/live/static/tempfs_subns.c
@@ -52,6 +52,13 @@ int main(int argc, char **argv)
 				sleep(1);
 			return 1;
 		}
+		pid = fork();
+		if (pid == 0) {
+			prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
+			while (1)
+				sleep(1);
+			return 1;
+		}
 		if (unshare(CLONE_NEWNS)) {
 			pr_perror("unshare");
 			return 1;
-- 
2.4.3



More information about the CRIU mailing list