[CRIU] [PATCH 2/2] zdtm: check shared mounts more carefully

Andrey Vagin avagin at openvz.org
Fri Dec 18 00:44:31 PST 2015


From: Andrew Vagin <avagin at virtuozzo.com>

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

diff --git a/test/zdtm/live/static/mntns_shared_bind.c b/test/zdtm/live/static/mntns_shared_bind.c
index d90f969..f11b2df 100644
--- a/test/zdtm/live/static/mntns_shared_bind.c
+++ b/test/zdtm/live/static/mntns_shared_bind.c
@@ -79,12 +79,13 @@ int main(int argc, char **argv)
 
 		task_waiter_complete(&t, 1);
 		task_waiter_wait4(&t, 2);
-
-
-		if (umount(bpath)) {
+		if (umount(spath)) {
+			task_waiter_complete(&t, 2);
 			fail("umount");
 			return 1;
 		}
+		task_waiter_complete(&t, 3);
+		task_waiter_wait4(&t, 4);
 
 		return 0;
 	}
@@ -100,11 +101,16 @@ int main(int argc, char **argv)
 	test_daemon();
 	test_waitsig();
 
-	if (umount(spath)) {
+	task_waiter_complete(&t, 2);
+	task_waiter_wait4(&t, 3);
+
+	if (umount(bpath)) {
+		task_waiter_complete(&t, 2);
 		fail("umount");
 		return 1;
 	}
-	task_waiter_complete(&t, 2);
+
+	task_waiter_complete(&t, 4);
 
 	if (waitpid(pid, &status, 0) != pid) {
 		pr_perror("waitpid %d", pid);
-- 
2.4.3



More information about the CRIU mailing list