* Re: [LTP] [PATCH V2 1/2] lib: let tst_kvercmp2() contains major kernel version
[not found] <1373966367-18078-1-git-send-email-gaowanlong@cn.fujitsu.com>
@ 2013-07-16 11:43 ` chrubis
[not found] ` <51E540CC.3070406@cn.fujitsu.com>
0 siblings, 1 reply; 3+ messages in thread
From: chrubis @ 2013-07-16 11:43 UTC (permalink / raw)
To: Wanlong Gao; +Cc: LTP
Hi!
> +int tst_kvercmp2(struct tst_kern_exv *vers);
I would prefer if the tst_kvercmp2() would contain version numbers for
vanilla kernel too so that we can do just:
static struct tst_kern_exv kvers[] = {
{ "RHEL5", "2.6.18-132" },
{ NULL, NULL },
};
if (tst_kvercmp2(2, 6, 25, kvers) >= 0)
...
But that is minor.
And what about we add an TINFO message about which distro was detected?
Something like:
if (!strcmp(vers[i].dist_name, cur_dist_name)) {
tst_resm(TINFO, "Detected %s using kernel version %s",
vers[i].dist_name, vers[i].extra_ver);
...
The rest of the code looks good.
--
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 V2 1/2] lib: let tst_kvercmp2() contains major kernel version
[not found] ` <51E540CC.3070406@cn.fujitsu.com>
@ 2013-07-16 13:24 ` chrubis
[not found] ` <51E554C8.4070307@cn.fujitsu.com>
0 siblings, 1 reply; 3+ messages in thread
From: chrubis @ 2013-07-16 13:24 UTC (permalink / raw)
To: Wanlong Gao; +Cc: LTP
Hi!
> Assume that we want version ">=2.6.25", but only ">2.6.18-131", contain
> them together will make no sense. I suppose only use tst_kvercmp2()
> "<0" and ">0", no use "=0", just remain return value "0" to indicate
> that the extra kernel vendor is not match with current kernel.
> What do you think?
Given that the kernel versions increase monotonically one can always
change that to:
> 2.6.24 && > 2.6.18-131
or (what I did in the example)
>= 2.6.25 && >= 2.6.18-132
Or am I missing something?
--
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 V2 1/2] lib: let tst_kvercmp2() contains major kernel version
[not found] ` <51E554C8.4070307@cn.fujitsu.com>
@ 2013-07-16 15:52 ` chrubis
0 siblings, 0 replies; 3+ messages in thread
From: chrubis @ 2013-07-16 15:52 UTC (permalink / raw)
To: Wanlong Gao; +Cc: LTP
Hi!
> >> 2.6.24 && > 2.6.18-131
> >
> > or (what I did in the example)
> >
> >> = 2.6.25 && >= 2.6.18-132
> >
> > Or am I missing something?
>
> Oops, I understand what you mean.
> If current kernel match our vendor info, the extra version
> will take effect, if not, go to compare the vanilla version, right?
Exactly.
--
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-16 15:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1373966367-18078-1-git-send-email-gaowanlong@cn.fujitsu.com>
2013-07-16 11:43 ` [LTP] [PATCH V2 1/2] lib: let tst_kvercmp2() contains major kernel version chrubis
[not found] ` <51E540CC.3070406@cn.fujitsu.com>
2013-07-16 13:24 ` chrubis
[not found] ` <51E554C8.4070307@cn.fujitsu.com>
2013-07-16 15:52 ` chrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox