* [LTP] [PATCH] getrlimit01: use TST_EXP_PASS() macro
@ 2022-11-21 11:51 Avinesh Kumar
2022-11-22 3:53 ` Li Wang
0 siblings, 1 reply; 2+ messages in thread
From: Avinesh Kumar @ 2022-11-21 11:51 UTC (permalink / raw)
To: ltp
Signed-off-by: Avinesh Kumar <akumar@suse.de>
---
testcases/kernel/syscalls/getrlimit/getrlimit01.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/testcases/kernel/syscalls/getrlimit/getrlimit01.c b/testcases/kernel/syscalls/getrlimit/getrlimit01.c
index 2a480dfa7..bea37ab1c 100644
--- a/testcases/kernel/syscalls/getrlimit/getrlimit01.c
+++ b/testcases/kernel/syscalls/getrlimit/getrlimit01.c
@@ -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 = {
--
2.38.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] getrlimit01: use TST_EXP_PASS() macro
2022-11-21 11:51 [LTP] [PATCH] getrlimit01: use TST_EXP_PASS() macro Avinesh Kumar
@ 2022-11-22 3:53 ` Li Wang
0 siblings, 0 replies; 2+ messages in thread
From: Li Wang @ 2022-11-22 3:53 UTC (permalink / raw)
To: Avinesh Kumar; +Cc: ltp
[-- Attachment #1.1: Type: text/plain, Size: 1413 bytes --]
On Mon, Nov 21, 2022 at 7:51 PM Avinesh Kumar <akumar@suse.de> wrote:
> Signed-off-by: Avinesh Kumar <akumar@suse.de>
> ---
> testcases/kernel/syscalls/getrlimit/getrlimit01.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/getrlimit/getrlimit01.c
> b/testcases/kernel/syscalls/getrlimit/getrlimit01.c
> index 2a480dfa7..bea37ab1c 100644
> --- a/testcases/kernel/syscalls/getrlimit/getrlimit01.c
> +++ b/testcases/kernel/syscalls/getrlimit/getrlimit01.c
> @@ -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);
>
Merged (with print message refined), thanks!
> }
>
> static struct tst_test test = {
> --
> 2.38.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
>
--
Regards,
Li Wang
[-- Attachment #1.2: Type: text/html, Size: 2566 bytes --]
[-- Attachment #2: Type: text/plain, Size: 60 bytes --]
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-22 3:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-21 11:51 [LTP] [PATCH] getrlimit01: use TST_EXP_PASS() macro Avinesh Kumar
2022-11-22 3:53 ` Li Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox