public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 4/7] epoll_create1: Add docparse formatting and cleanup for epoll_create1_01
Date: Wed, 25 Aug 2021 11:46:06 +0200	[thread overview]
Message-ID: <YSYRXrgx6u+kxnpc@yuki> (raw)
In-Reply-To: <20210817064924.127970-5-xieziyao@huawei.com>

Hi!
Pushed with a few changes, thanks.

The main problem was that the commit added empty epoll_create1_02.c
which did break the compilation and had to be removed.

Apart from that I've changed the tst_brk(TFAIL, ...) to tst_res(TFAIL,
...) since there is no real need for tst_brk() and adjusted the messages
a bit.

diff:

diff --git a/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c b/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
index 39e01eb8b..ed359d434 100644
--- a/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
+++ b/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
@@ -8,7 +8,7 @@
  * [Description]
  *
  * Verify that epoll_create1 sets the close-on-exec flag for the returned
- * file descriptor with the only flag support, EPOLL_CLOEXEC.
+ * file descriptor with EPOLL_CLOEXEC.
  */
 
 #include <sys/epoll.h>
@@ -22,8 +22,8 @@ static struct test_case_t {
 	int exp_flag;
 	const char *desc;
 } tc[] = {
-	{0, 0, "flags=0 didn't set close-on-exec flag"},
-	{EPOLL_CLOEXEC, 1, "flags=EPOLL_CLOEXEC set close-on-exec"}
+	{0, 0, "without EPOLL_CLOEXEC"},
+	{EPOLL_CLOEXEC, 1, "with EPOLL_CLOEXEC"}
 };
 
 static void run(unsigned int n)
@@ -36,8 +36,9 @@ static void run(unsigned int n)
 
 	coe = SAFE_FCNTL(fd, F_GETFD);
 	if ((coe & FD_CLOEXEC) != tc[n].exp_flag)
-		tst_brk(TFAIL, "epoll_create1(...) with %s", tc[n].desc);
-	tst_res(TPASS, "epoll_create1(...) with %s", tc[n].desc);
+		tst_res(TFAIL, "epoll_create1(...) %s", tc[n].desc);
+	else
+		tst_res(TPASS, "epoll_create1(...) %s", tc[n].desc);
 
 	SAFE_CLOSE(fd);
 }

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2021-08-25  9:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17  6:49 [LTP] [PATCH 0/7] epoll: Add more basic test for epoll_{create, create1, ctl} Xie Ziyao
2021-08-17  6:49 ` [LTP] [PATCH 1/7] epoll_ctl: Add docparse formatting and cleanup for epoll_ctl01 Xie Ziyao
2021-08-24 15:23   ` Cyril Hrubis
2021-08-17  6:49 ` [LTP] [PATCH 2/7] epoll_ctl: Add docparse formatting and cleanup for epoll_ctl02 Xie Ziyao
2021-08-24 15:24   ` Cyril Hrubis
2021-08-17  6:49 ` [LTP] [PATCH 3/7] epoll_ctl: Add test for epoll_ctl03 Xie Ziyao
2021-08-24 15:38   ` Cyril Hrubis
2021-08-26  2:02     ` Xie Ziyao
2021-08-17  6:49 ` [LTP] [PATCH 4/7] epoll_create1: Add docparse formatting and cleanup for epoll_create1_01 Xie Ziyao
2021-08-25  9:46   ` Cyril Hrubis [this message]
2021-08-17  6:49 ` [LTP] [PATCH 5/7] epoll_create1: Add test for epoll_create1_02 Xie Ziyao
2021-08-25 11:35   ` Cyril Hrubis
2021-08-17  6:49 ` [LTP] [PATCH 6/7] epoll_create: Add test for epoll_create01 Xie Ziyao
2021-08-25 12:00   ` Cyril Hrubis
2021-08-17  6:49 ` [LTP] [PATCH 7/7] epoll_create: Add test for epoll_create02 Xie Ziyao
2021-08-25 12:01   ` Cyril Hrubis

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=YSYRXrgx6u+kxnpc@yuki \
    --to=chrubis@suse.cz \
    --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