From: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
To: shuang.qiu@oracle.com
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] syscalls/clone08: Skip test_clone_stopped after kernel 2.6.25
Date: Tue, 29 Apr 2014 17:04:44 +0800 [thread overview]
Message-ID: <535F6B2C.10008@cn.fujitsu.com> (raw)
In-Reply-To: <1398761066-3840-1-git-send-email-shuang.qiu@oracle.com>
Hi,
On 04/29/2014 04:44 PM, shuang.qiu@oracle.com wrote:
> From: Shuang Qiu <shuang.qiu@oracle.com>
>
> According to CLONE manual page "From Linux 2.6.25 this flag is
> deprecated.You probably never wanted to use it, you certainly shouldn’t
> be using it, and soon it will go away",skip test_clone_stopped
> after kernel 2.6.25.
>
> Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>
> ---
> testcases/kernel/syscalls/clone/clone08.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/clone/clone08.c b/testcases/kernel/syscalls/clone/clone08.c
> index 14ebf60..610986d 100644
> --- a/testcases/kernel/syscalls/clone/clone08.c
> +++ b/testcases/kernel/syscalls/clone/clone08.c
> @@ -84,15 +84,24 @@ int main(int ac, char **av)
> {
> char *msg;
> int i, lc;
> + int clone_stopped = 0;
>
> msg = parse_opts(ac, av, NULL, NULL);
> if (msg != NULL)
> tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
>
> setup();
> +
> +#ifdef CLONE_STOPPED
> + if (tst_kvercmp(2, 6, 25) > 0)
> + clone_stopped =1;
> +#endif
> +
> for (lc = 0; TEST_LOOPING(lc); lc++) {
> tst_count = 0;
> for (i = 0; i < TST_TOTAL; i++) {
> + if (clone_stopped == 1 && i ==3)
> + continue;
> tst_resm(TINFO, "running %s", test_cases[i].name);
> test_cases[i].testfunc(i);
> }
I think you should do the kernel version comparison in test_clone_stopped(), and if
kernel is after 2.6.25, you may print a TCONF with tst_resm() and return.
Here you use "i == 3", but if other elements are added in struct test_case arry,
the index for test_clone_stopped may change.
Regards,
Xiaoguang Wang
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos. Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2014-04-29 9:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 8:44 [LTP] [PATCH] syscalls/clone08: Skip test_clone_stopped after kernel 2.6.25 shuang.qiu
2014-04-29 9:04 ` Xiaoguang Wang [this message]
2014-04-29 10:51 ` Shuang Qiu
2014-04-29 9:25 ` Jan Stancek
2014-04-29 10:54 ` Shuang Qiu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=535F6B2C.10008@cn.fujitsu.com \
--to=wangxg.fnst@cn.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=shuang.qiu@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox