On 06/24/2013 06:20 PM, Jan Stancek wrote: > > > > > ----- Original Message ----- >> From: "Wanlong Gao" <[email protected]> >> To: "LTP" <[email protected]> >> Cc: "Cyril Hrubis" <[email protected]>, "Caspar Zhang" >> <[email protected]>, "Garrett Cooper" <[email protected]>, >> "Mike Frysinger" <[email protected]>, [email protected], "Wanlong Gao" >> <[email protected]> >> Sent: Monday, 24 June, 2013 11:53:04 AM >> Subject: [PATCH] getrusage03: disable the test when kernel before 2.6.32 >> >> Kernel commit 1f10206c is first introduced in 2.6.32, this >> ru_maxrss behaviors will not be supported before kernel 2.6.32, >> so disable the test when kernel version is before 2.6.32. >> >> Signed-off-by: Wanlong Gao <[email protected]> >> --- >> testcases/kernel/syscalls/getrusage/getrusage03.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/testcases/kernel/syscalls/getrusage/getrusage03.c >> b/testcases/kernel/syscalls/getrusage/getrusage03.c >> index 202356c..2670316 100644 >> --- a/testcases/kernel/syscalls/getrusage/getrusage03.c >> +++ b/testcases/kernel/syscalls/getrusage/getrusage03.c >> @@ -71,6 +71,13 @@ int main(int argc, char *argv[]) >> int lc; >> char *msg; >> >> + /* Disable test if the version of the kernel is less than 2.6.32 */ >> + if ((tst_kvercmp(2, 6, 32)) < 0) { >> + tst_resm(TWARN, "This ru_maxrss behaviors is not supported"); >> + tst_resm(TWARN, "before kernel 2.6.32"); >> + exit(0); >> + } > > Hi, > > I'd go with TCONF rather than TWARN: > tst_brkm(TCONF, NULL, ..) > > TWARN suggests something went wrong, where TCONF is more about that test > isn't appropriate. > (doc/man3/tst_res.3)
Yeah, done in V2. Thanks, Wanlong Gao > > Regards, > Jan > >> + >> msg = parse_opts(argc, argv, NULL, NULL); >> if (msg != NULL) >> tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg); >> -- >> 1.8.3.1.448.gfb7dfaa >> >> > ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
