Commit e47c3684 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

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

The s_dev as well as mnt_id may change during container
migration, so exclude them from the comparision.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent f1015e4c
...@@ -118,10 +118,14 @@ static void copy_fhandle(char *tok, struct fanotify_mark_inode *inode) ...@@ -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) 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) || if ((old->glob.faflags != new->glob.faflags) ||
(old->glob.evflags != new->glob.evflags) || (old->glob.evflags != new->glob.evflags) ||
(old->inode.i_ino != new->inode.i_ino) || (old->inode.i_ino != new->inode.i_ino) ||
(old->inode.s_dev != new->inode.s_dev) ||
(old->inode.mflags != new->inode.mflags) || (old->inode.mflags != new->inode.mflags) ||
(old->inode.mask != new->inode.mask) || (old->inode.mask != new->inode.mask) ||
(old->inode.ignored_mask != new->inode.ignored_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) ...@@ -131,7 +135,6 @@ static int cmp_fanotify_obj(struct fanotify_obj *old, struct fanotify_obj *new)
sizeof(new->inode.fhandle))) sizeof(new->inode.fhandle)))
return -2; return -2;
/* mnt_id may change, exclude it */
if ((old->mount.mflags != new->mount.mflags) || if ((old->mount.mflags != new->mount.mflags) ||
(old->mount.mask != new->mount.mask) || (old->mount.mask != new->mount.mask) ||
(old->mount.ignored_mask != new->mount.ignored_mask)) (old->mount.ignored_mask != new->mount.ignored_mask))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment