[CRIU] [PATCH] zdtm: fanotify00 -- Use exit instead of fail until test_daemon call

Cyrill Gorcunov gorcunov at openvz.org
Tue Jan 15 10:05:50 EST 2013


As Andrew pointed the logically it's more correct to use
err() instead of fail() if test_daemon() has not been
used.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
CC: Andrey Vagin <avagin at openvz.org>
---
 test/zdtm/live/static/fanotify00.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/zdtm/live/static/fanotify00.c b/test/zdtm/live/static/fanotify00.c
index caeb0cb..0b79fe7 100644
--- a/test/zdtm/live/static/fanotify00.c
+++ b/test/zdtm/live/static/fanotify00.c
@@ -53,27 +53,27 @@ int main (int argc, char *argv[])
 			      FAN_CLASS_NOTIF | FAN_UNLIMITED_QUEUE,
 			      0);
 	if (fa_fd < 0) {
-		fail("fanotify_init failed\n");
+		err("fanotify_init failed\n");
 		exit(1);
 	}
 
 	del_after = open(fanotify_path, O_CREAT | O_TRUNC);
 	if (del_after < 0) {
-		fail("open failed\n");
+		err("open failed\n");
 		exit(1);
 	}
 
 	if (fanotify_mark(fa_fd, FAN_MARK_ADD,
 			  FAN_MODIFY | FAN_ACCESS | FAN_OPEN | FAN_CLOSE,
 			  AT_FDCWD, fanotify_path)) {
-		fail("fanotify_mark failed\n");
+		err("fanotify_mark failed\n");
 		exit(1);
 	}
 
 	if (fanotify_mark(fa_fd, FAN_MARK_ADD | FAN_MARK_MOUNT,
 			  FAN_ONDIR | FAN_OPEN | FAN_CLOSE,
 			  AT_FDCWD, "/")) {
-		fail("fanotify_mark failed\n");
+		err("fanotify_mark failed\n");
 		exit(1);
 	}
 
@@ -81,7 +81,7 @@ int main (int argc, char *argv[])
 			  FAN_MARK_IGNORED_MASK | FAN_MARK_IGNORED_SURV_MODIFY,
 			  FAN_MODIFY | FAN_ACCESS,
 			  AT_FDCWD, "/")) {
-		fail("fanotify_mark failed\n");
+		err("fanotify_mark failed\n");
 		exit(1);
 	}
 
-- 
1.8.0.2



More information about the CRIU mailing list