test: static, fanotify00 -- Don't compare @s_dev in test

Submitted by Cyrill Gorcunov on May 30, 2016, 8:11 a.m.

Details

Message ID 1464595918-26575-1-git-send-email-gorcunov@virtuozzo.com
State Accepted
Series "test: static, fanotify00 -- Don't compare @s_dev in test"
Commit 1085fd7cb4f7fb806e6bfcd0e929249be8efa5d7
Headers show

Commit Message

Cyrill Gorcunov May 30, 2016, 8:11 a.m.
The s_dev as well as mnt_id may change during container
migration, so exclude them from the comparision.

Signed-off-by: Cyrill Gorcunov <gorcunov@virtuozzo.com>
---
 test/zdtm/static/fanotify00.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/test/zdtm/static/fanotify00.c b/test/zdtm/static/fanotify00.c
index 37c9cb4..1172145 100644
--- a/test/zdtm/static/fanotify00.c
+++ b/test/zdtm/static/fanotify00.c
@@ -118,10 +118,14 @@  static void copy_fhandle(char *tok, struct fanotify_mark_inode *inode)
 
 static int cmp_fanotify_obj(struct fanotify_obj *old, struct fanotify_obj *new)
 {
+	/*
+	 * mnt_id and s_dev may change during container migration,
+	 * moreover the backend (say PLOOP) may be re-mounted during
+	 * c/r, so exclude them.
+	 */
 	if ((old->glob.faflags != new->glob.faflags)			||
 	    (old->glob.evflags != new->glob.evflags)			||
 	    (old->inode.i_ino != new->inode.i_ino)			||
-	    (old->inode.s_dev != new->inode.s_dev)			||
 	    (old->inode.mflags != new->inode.mflags)			||
 	    (old->inode.mask != new->inode.mask)			||
 	    (old->inode.ignored_mask != new->inode.ignored_mask))
@@ -131,7 +135,6 @@  static int cmp_fanotify_obj(struct fanotify_obj *old, struct fanotify_obj *new)
 		   sizeof(new->inode.fhandle)))
 		return -2;
 
-	/* mnt_id may change, exclude it */
 	if ((old->mount.mflags != new->mount.mflags)			||
 	    (old->mount.mask != new->mount.mask)			||
 	    (old->mount.ignored_mask != new->mount.ignored_mask))

Comments

Pavel Emelianov June 9, 2016, 12:45 p.m.
Applied