Linux Test Project
 help / color / mirror / Atom feed
From: Avinesh Kumar <akumar@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] getrlimit01: use TST_EXP_PASS() macro
Date: Mon, 21 Nov 2022 17:21:28 +0530	[thread overview]
Message-ID: <20221121115128.27847-1-akumar@suse.de> (raw)

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

             reply	other threads:[~2022-11-21 11:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 11:51 Avinesh Kumar [this message]
2022-11-22  3:53 ` [LTP] [PATCH] getrlimit01: use TST_EXP_PASS() macro Li Wang

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=20221121115128.27847-1-akumar@suse.de \
    --to=akumar@suse.de \
    --cc=ltp@lists.linux.it \
    /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