Hi!
> @@ -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", "132" },
> +     { 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(2, 6, 18, kvers) >= 0) {
>               event_set[tst_count].mask = IN_ATTRIB;
>               strcpy(event_set[tst_count].name, "");
>               tst_count++;

It looks like I've misunderstand the initial definition of the problem,
sorry.

Now it is pretty clear that the tst_kern_exv should have included the
whole kernel version as when we would like to the add another special
case based on different kerenel version the change would be more
complicated than adding a line to the tst_kern_exv array.

The approach I would like to have is to have one tst_kvercmp2() with
kernel version for vanilla kernels and pointer to a structure describing
special cases. Do you agree to change the code this way?

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
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