All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [LTP] [PATCH] inotify04: add RHEL5 extra kernel version check
       [not found] <1373509951-10850-1-git-send-email-gaowanlong@cn.fujitsu.com>
@ 2013-07-11 11:31 ` chrubis
       [not found]   ` <51DEABFE.90405@cn.fujitsu.com>
  0 siblings, 1 reply; 3+ messages in thread
From: chrubis @ 2013-07-11 11:31 UTC (permalink / raw)
  To: Wanlong Gao; +Cc: Garrett Cooper, LTP, Mike Frysinger

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
chrubis@suse.cz

------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH] inotify04: add RHEL5 extra kernel version check
       [not found]   ` <51DEABFE.90405@cn.fujitsu.com>
@ 2013-07-11 13:26     ` chrubis
       [not found]       ` <51DEB2EF.60001@cn.fujitsu.com>
  0 siblings, 1 reply; 3+ messages in thread
From: chrubis @ 2013-07-11 13:26 UTC (permalink / raw)
  To: Wanlong Gao; +Cc: Garrett Cooper, LTP, Mike Frysinger

Hi!
> 
> I'm a bit confused, do you mean following like?
> 
> static struct tst_kern_exv kver[] = {
> 	{ "RHEL5", "2.6.18-132" },
> 	{ NULL, NULL },
> };

Exactly, this would allow us to add just another line into the array for
any other distro out there.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH] inotify04: add RHEL5 extra kernel version check
       [not found]       ` <51DEB2EF.60001@cn.fujitsu.com>
@ 2013-07-11 13:31         ` chrubis
  0 siblings, 0 replies; 3+ messages in thread
From: chrubis @ 2013-07-11 13:31 UTC (permalink / raw)
  To: Wanlong Gao; +Cc: Garrett Cooper, LTP, Mike Frysinger

Hi!
> > Exactly, this would allow us to add just another line into the array for
> > any other distro out there.
> 
> OK, that's reasonable.

Sorry for not figuring out that the first time.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-11 13:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1373509951-10850-1-git-send-email-gaowanlong@cn.fujitsu.com>
2013-07-11 11:31 ` [LTP] [PATCH] inotify04: add RHEL5 extra kernel version check chrubis
     [not found]   ` <51DEABFE.90405@cn.fujitsu.com>
2013-07-11 13:26     ` chrubis
     [not found]       ` <51DEB2EF.60001@cn.fujitsu.com>
2013-07-11 13:31         ` chrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.