Since kernel 2.6.18-132.el5, inotify start to send IN_ATTRIB event
on link count changes, so we check that kernel version on RHEL5.

Signed-off-by: Wanlong Gao <[email protected]>
---
 testcases/kernel/syscalls/inotify/inotify04.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/inotify/inotify04.c 
b/testcases/kernel/syscalls/inotify/inotify04.c
index df91acb..ce46818 100644
--- a/testcases/kernel/syscalls/inotify/inotify04.c
+++ b/testcases/kernel/syscalls/inotify/inotify04.c
@@ -79,6 +79,11 @@ char event_buf[EVENT_BUF_LEN];
 
 int fd_notify, reap_wd_file, reap_wd_dir, wd_dir, wd_file;
 
+static struct tst_kern_exv kvers[] = {
+       { "RHEL5", "2.6.18-131" },
+       { NULL, NULL },
+};
+
 static void cleanup(void)
 {
 
@@ -172,7 +177,7 @@ int main(int argc, char **argv)
         * This isn't well documented in inotify(7), but it's intuitive if you
         * understand how Unix works.
         */
-       if (0 <= tst_kvercmp(2, 6, 25)) {
+       if (tst_kvercmp(2, 6, 25) >= 0 || tst_kvercmp2(kvers) > 0) {
                event_set[tst_count].mask = IN_ATTRIB;
                strcpy(event_set[tst_count].name, "");
                tst_count++;
-- 
1.8.3.2.634.g7a3187e


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to