Skip to contentSkip to conversation

fanotify06 always failed on RHEL7

LTP Li Wang 2 participants 3 messages Jan 20, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Li Wang

author
#1 lore raw

Hi Jack & all,

fanotify06 always failed on RHEL7-GA as below. When I make some change of the codes flow, Test Pass All. Could you take a look at my unsure patch?

<<<test_start>>>
tag=fanotify06 stime=1421726003
cmdline="fanotify06"
contacts=""
analysis=exit
<<<test_output>>>

fanotify06    1  TPASS  :  group 0 get event: mask 2 pid=14922 fd=15
fanotify06    2  TPASS  :  group 1 get event: mask 2 pid=14922 fd=15
fanotify06    3  TPASS  :  group 2 get event: mask 2 pid=14922 fd=15
fanotify06    4  TFAIL  :  fanotify06.c:217: group 3 got event
fanotify06    5  TFAIL  :  fanotify06.c:217: group 4 got event
fanotify06    6  TFAIL  :  fanotify06.c:217: group 5 got event
fanotify06    7  TPASS  :  group 6 got no event
fanotify06    8  TPASS  :  group 7 got no event
fanotify06    9  TPASS  :  group 8 got no event

---------

testcases/kernel/syscalls/fanotify/fanotify06.c +4 -3
index 8dcd68a..63519f6 100644
@@ -93,7 +93,8 @@ static void create_fanotify_groups(void)
                                                 "fanotify_init failed");
                                }
                        }
-                       /* Add mount mark for each group */
+                       /* Add mount mark for group with lower priority */
+                       if (p == 0) {
                        ret = fanotify_mark(fd_notify[p][i],
                                            FAN_MARK_ADD | FAN_MARK_MOUNT,
                                            FAN_MODIFY,
@@ -104,9 +105,9 @@ static void create_fanotify_groups(void)
                                         "FAN_MARK_MOUNT, FAN_MODIFY, AT_FDCWD,"
                                         " '.') failed", fd_notify[p][i]);
                        }
+                       continue;
+                       }
                        /* Add ignore mark for groups with higher priority */
-                       if (p == 0)
-                               continue;
                        ret = fanotify_mark(fd_notify[p][i],
                                            FAN_MARK_ADD |
                                            FAN_MARK_IGNORED_MASK |
Signature · 15 lines
Regards, 
Li Wang 
Email: [email protected] 


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#2 lore raw
Quoted 11 lines · Li Wang

Hi Jack & all,

fanotify06 always failed on RHEL7-GA as below. When I make some change of the codes flow, Test Pass All. Could you take a look at my unsure patch?

<<<test_start>>>
tag=fanotify06 stime=1421726003
cmdline="fanotify06"
contacts=""
analysis=exit
<<<test_output>>>

Quoted 9 lines
fanotify06    1  TPASS  :  group 0 get event: mask 2 pid=14922 fd=15
fanotify06    2  TPASS  :  group 1 get event: mask 2 pid=14922 fd=15
fanotify06    3  TPASS  :  group 2 get event: mask 2 pid=14922 fd=15
fanotify06    4  TFAIL  :  fanotify06.c:217: group 3 got event
fanotify06    5  TFAIL  :  fanotify06.c:217: group 4 got event
fanotify06    6  TFAIL  :  fanotify06.c:217: group 5 got event
fanotify06    7  TPASS  :  group 6 got no event
fanotify06    8  TPASS  :  group 7 got no event
fanotify06    9  TPASS  :  group 8 got no event

Well, likely the reason is that you don't have commit
8edc6e1688fc8f02c8c1f53a2ec4928cb1055f4d in your kernel. The test is correct as is.

Honza

Quoted 35 lines

---------

testcases/kernel/syscalls/fanotify/fanotify06.c +4 -3
index 8dcd68a..63519f6 100644
@@ -93,7 +93,8 @@ static void create_fanotify_groups(void)
                                                 "fanotify_init failed");
                                }
                        }
-                       /* Add mount mark for each group */
+                       /* Add mount mark for group with lower priority */
+                       if (p == 0) {
                        ret = fanotify_mark(fd_notify[p][i],
                                            FAN_MARK_ADD | FAN_MARK_MOUNT,
                                            FAN_MODIFY,
@@ -104,9 +105,9 @@ static void create_fanotify_groups(void)
                                         "FAN_MARK_MOUNT, FAN_MODIFY, AT_FDCWD,"
                                         " '.') failed", fd_notify[p][i]);
                        }
+                       continue;
+                       }
                        /* Add ignore mark for groups with higher priority */
-                       if (p == 0)
-                               continue;
                        ret = fanotify_mark(fd_notify[p][i],
                                            FAN_MARK_ADD |
                                            FAN_MARK_IGNORED_MASK |
Signature · 4 lines
-- 
Regards, 
Li Wang 
Email: [email protected] 
Signature · 13 lines
Jan Kara <[email protected]>
SUSE Labs, CR

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
author
#3 lore raw

----- Original Message -----

Quoted 22 lines · Li Wang
Quoted 12 lines

Hi Jack & all,

fanotify06 always failed on RHEL7-GA as below. When I make some change of the codes flow, Test Pass All.
Could you take a look at my unsure patch?

<<<test_start>>>
tag=fanotify06 stime=1421726003
cmdline="fanotify06"
contacts=""
analysis=exit
<<<test_output>>>

Quoted 9 lines
fanotify06    1  TPASS  :  group 0 get event: mask 2 pid=14922 fd=15
fanotify06    2  TPASS  :  group 1 get event: mask 2 pid=14922 fd=15
fanotify06    3  TPASS  :  group 2 get event: mask 2 pid=14922 fd=15
fanotify06    4  TFAIL  :  fanotify06.c:217: group 3 got event
fanotify06    5  TFAIL  :  fanotify06.c:217: group 4 got event
fanotify06    6  TFAIL  :  fanotify06.c:217: group 5 got event
fanotify06    7  TPASS  :  group 6 got no event
fanotify06    8  TPASS  :  group 7 got no event
fanotify06    9  TPASS  :  group 8 got no event
Quoted 3 lines

Well, likely the reason is that you don't have commit
8edc6e1688fc8f02c8c1f53a2ec4928cb1055f4d in your kernel. The test is correct as is.

Great! Thank you for your response promptly.

Li Wang

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list