From: Shuang Q. <shu...@or...> - 2014-04-29 10:51:38
|
On 04/29/2014 05:04 PM, Xiaoguang Wang wrote: > Hi, > > On 04/29/2014 04:44 PM, shu...@or... wrote: >> From: Shuang Qiu <shu...@or...> >> >> 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 <shu...@or...> >> --- >> 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. Yes,that is a better fix,will update. Thanks Shuang > > Regards, > Xiaoguang Wang > |