[CRIU] [PATCH] zdtm: chech that a mark is restored on a correct mount point

Andrey Vagin avagin at openvz.org
Mon Aug 25 08:45:49 PDT 2014


We try to remove mark on the correct mount point and
if the mark is restored on a wrong mount point, we will get ENOENT.

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 test/zdtm/live/static/fanotify00.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/test/zdtm/live/static/fanotify00.c b/test/zdtm/live/static/fanotify00.c
index f013851..2cd0db2 100644
--- a/test/zdtm/live/static/fanotify00.c
+++ b/test/zdtm/live/static/fanotify00.c
@@ -281,6 +281,13 @@ int main (int argc, char *argv[])
 		exit(1);
 	}
 
+	if (fanotify_mark(fa_fd, FAN_MARK_REMOVE | FAN_MARK_MOUNT,
+			  FAN_ONDIR | FAN_OPEN | FAN_CLOSE,
+			  AT_FDCWD, "/")) {
+		err("fanotify_mark failed\n");
+		exit(1);
+	}
+
 	pass();
 
 	return 0;
-- 
1.9.3



More information about the CRIU mailing list