getrlimit01: use TST_EXP_PASS() macro
PATCH 1/1 getrlimit01: use TST_EXP_PASS() macro
Signed-off-by Avinesh Kumar <[email protected]>
--- testcases/kernel/syscalls/getrlimit/getrlimit01.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)
testcases/kernel/syscalls/getrlimit/getrlimit01.c +3 -11
@@ -47,17 +47,9 @@ static void verify_getrlimit(unsigned int i)struct rlimit rlim;struct tcase *tc = &tcases[i]; -TEST (getrlimit (tc->res, &rlim)); - -if (TST_RET ==-1 ) { -tst_res (TFAIL |TTERRNO , -"getrlimit() test %s failed" , - tc->res_str); - }else { -tst_res (TPASS , -"getrlimit() test %s success" , - tc->res_str); - } +TST_EXP_PASS (getrlimit (tc->res, &rlim), +"getrlimit() test for resource type %s:" , + tc->res_str); }static struct tst_test test = {
Signature · 5 lines
2.38.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 19 lines · Avinesh Kumar
Signed-off-by Avinesh Kumar <[email protected]>--- testcases/kernel/syscalls/getrlimit/getrlimit01.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)testcases/kernel/syscalls/getrlimit/getrlimit01.c +0
-5@@ -47,17 +47,9 @@ static void verify_getrlimit(unsigned int i)struct rlimit rlim;struct tcase *tc = &tcases[i]; -TEST (getrlimit (tc->res, &rlim)); - -if (TST_RET ==-1 ) { - tst_res(TFAIL | TTERRNO, - "getrlimit() test %s failed",
testcases/kernel/syscalls/getrlimit/getrlimit01.c static void verify_getrlimit(unsigned int i) · line 53
Quoted 10 lines
testcases/kernel/syscalls/getrlimit/getrlimit01.c +3
-6- tc->res_str); - }else { -tst_res (TPASS , -"getrlimit() test %s success" , - tc->res_str); - } +TST_EXP_PASS (getrlimit (tc->res, &rlim), +"getrlimit() test for resource type %s:" , + tc->res_str);
Merged (with print message refined), thanks!
Quoted 11 lines
testcases/kernel/syscalls/getrlimit/getrlimit01.c +0
-0}static struct
tst_testtest = {
--
2.38.1--
Mailing list info: https://lists.linux.it/listinfo/ltp
Signature · 2 lines
Regards, Li Wang
Signature · 2 lines
-- Mailing list info: https://lists.linux.it/listinfo/ltp