All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/4] epoll_wait: Add test for epoll_wait04 and cleanup
@ 2021-08-09  8:38 Xie Ziyao
  2021-08-09  8:39 ` [LTP] [PATCH 1/4] epoll_wait: Add docparse formatting and cleanup for epoll_wait01 Xie Ziyao
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Xie Ziyao @ 2021-08-09  8:38 UTC (permalink / raw)
  To: ltp

Xie Ziyao (4):
  epoll_wait: Add docparse formatting and cleanup for epoll_wait01
  epoll_wait: Add docparse formatting and fix warnings from
    checkpatch.pl
  epoll_wait: Convert epoll_wait03 to the new API
  epoll_wait: Add test for epoll_wait04

 runtest/syscalls                              |   1 +
 .../kernel/syscalls/epoll_wait/.gitignore     |   7 +-
 .../kernel/syscalls/epoll_wait/epoll_wait01.c |  29 ++--
 .../kernel/syscalls/epoll_wait/epoll_wait02.c |  13 +-
 .../kernel/syscalls/epoll_wait/epoll_wait03.c | 157 +++++-------------
 .../kernel/syscalls/epoll_wait/epoll_wait04.c |  71 ++++++++
 6 files changed, 140 insertions(+), 138 deletions(-)
 create mode 100644 testcases/kernel/syscalls/epoll_wait/epoll_wait04.c

--
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [LTP] [PATCH 1/4] epoll_wait: Add docparse formatting and cleanup for epoll_wait01
  2021-08-09  8:38 [LTP] [PATCH 0/4] epoll_wait: Add test for epoll_wait04 and cleanup Xie Ziyao
@ 2021-08-09  8:39 ` Xie Ziyao
  2021-08-09  8:39 ` [LTP] [PATCH 2/4] epoll_wait: Add docparse formatting and fix warnings from checkpatch.pl Xie Ziyao
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Xie Ziyao @ 2021-08-09  8:39 UTC (permalink / raw)
  To: ltp

1. Add docparse formatting.
2. Make use of ARRAY_SIZE().

Signed-off-by: Xie Ziyao <xieziyao@huawei.com>
---
 .../kernel/syscalls/epoll_wait/epoll_wait01.c | 29 ++++++++-----------
 1 file changed, 12 insertions(+), 17 deletions(-)

diff --git a/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c b/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
index ad9126aaf..1807bec8a 100644
--- a/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
+++ b/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
@@ -4,11 +4,12 @@
  * Author: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
  */

-/*
- * Description:
- *  Basic test for epoll_wait(2).
- *  Check that epoll_wait(2) works for EPOLLOUT and EPOLLIN events
- *  on a epoll instance and that struct epoll_event is set correctly.
+/*\
+ * [Description]
+ *
+ * Basic test for epoll_wait. Check that epoll_wait works for EPOLLOUT and
+ * EPOLLIN events on an epoll instance and that struct epoll_event is set
+ * correctly.
  */

 #include <sys/epoll.h>
@@ -226,24 +227,18 @@ static void cleanup(void)
 	}
 }

+static void (*testcase_list[])(void) = {
+	verify_epollout, verify_epollin, verify_epollio
+};
+
 static void do_test(unsigned int n)
 {
-	switch (n) {
-	case 0:
-		verify_epollout();
-	break;
-	case 1:
-		verify_epollin();
-	break;
-	case 2:
-		verify_epollio();
-	break;
-	}
+	testcase_list[n]();
 }

 static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.test = do_test,
-	.tcnt = 3,
+	.tcnt = ARRAY_SIZE(testcase_list),
 };
--
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [LTP] [PATCH 2/4] epoll_wait: Add docparse formatting and fix warnings from checkpatch.pl
  2021-08-09  8:38 [LTP] [PATCH 0/4] epoll_wait: Add test for epoll_wait04 and cleanup Xie Ziyao
  2021-08-09  8:39 ` [LTP] [PATCH 1/4] epoll_wait: Add docparse formatting and cleanup for epoll_wait01 Xie Ziyao
@ 2021-08-09  8:39 ` Xie Ziyao
  2021-08-09  8:39 ` [LTP] [PATCH 3/4] epoll_wait: Convert epoll_wait03 to the new API Xie Ziyao
  2021-08-09  8:39 ` [LTP] [PATCH 4/4] epoll_wait: Add test for epoll_wait04 Xie Ziyao
  3 siblings, 0 replies; 7+ messages in thread
From: Xie Ziyao @ 2021-08-09  8:39 UTC (permalink / raw)
  To: ltp

Add docparse formatting and fix warnings from checkpatch.pl for
epoll_wait02.

Signed-off-by: Xie Ziyao <xieziyao@huawei.com>
---
 testcases/kernel/syscalls/epoll_wait/epoll_wait02.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/testcases/kernel/syscalls/epoll_wait/epoll_wait02.c b/testcases/kernel/syscalls/epoll_wait/epoll_wait02.c
index c54a739f8..d2c0b6ef4 100644
--- a/testcases/kernel/syscalls/epoll_wait/epoll_wait02.c
+++ b/testcases/kernel/syscalls/epoll_wait/epoll_wait02.c
@@ -1,12 +1,14 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2016 Fujitsu Ltd.
- *  Author: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
+ * Author: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
  * Copyright (c) 2017 Cyril Hrubis <chrubis@suse.cz>
  */

-/*
- *  Check that epoll_wait(2) timeouts correctly.
+/*\
+ * [Description]
+ *
+ * Check that epoll_wait(2) timeouts correctly.
  */

 #include <sys/epoll.h>
@@ -17,7 +19,7 @@

 static int epfd, fds[2];
 static struct epoll_event epevs[1] = {
-       {.events = EPOLLIN}
+	{.events = EPOLLIN}
 };

 int sample_fn(int clk_id, long long usec)
@@ -30,8 +32,7 @@ int sample_fn(int clk_id, long long usec)
 	tst_timer_sample();

 	if (TST_RET != 0) {
-		tst_res(TFAIL | TTERRNO,
-			"epoll_wait() returned %li", TST_RET);
+		tst_res(TFAIL | TTERRNO, "epoll_wait() returned %li", TST_RET);
 		return 1;
 	}

--
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [LTP] [PATCH 3/4] epoll_wait: Convert epoll_wait03 to the new API
  2021-08-09  8:38 [LTP] [PATCH 0/4] epoll_wait: Add test for epoll_wait04 and cleanup Xie Ziyao
  2021-08-09  8:39 ` [LTP] [PATCH 1/4] epoll_wait: Add docparse formatting and cleanup for epoll_wait01 Xie Ziyao
  2021-08-09  8:39 ` [LTP] [PATCH 2/4] epoll_wait: Add docparse formatting and fix warnings from checkpatch.pl Xie Ziyao
@ 2021-08-09  8:39 ` Xie Ziyao
  2021-08-09  8:53   ` Xie Ziyao
  2021-08-11 13:30   ` Cyril Hrubis
  2021-08-09  8:39 ` [LTP] [PATCH 4/4] epoll_wait: Add test for epoll_wait04 Xie Ziyao
  3 siblings, 2 replies; 7+ messages in thread
From: Xie Ziyao @ 2021-08-09  8:39 UTC (permalink / raw)
  To: ltp

Convert epoll_wait03 to the new API.

Fixes: #792
Signed-off-by: Xie Ziyao <xieziyao@huawei.com>
---
 .../kernel/syscalls/epoll_wait/epoll_wait03.c | 157 +++++-------------
 1 file changed, 45 insertions(+), 112 deletions(-)

diff --git a/testcases/kernel/syscalls/epoll_wait/epoll_wait03.c b/testcases/kernel/syscalls/epoll_wait/epoll_wait03.c
index 47b6d8f61..6b0851ea8 100644
--- a/testcases/kernel/syscalls/epoll_wait/epoll_wait03.c
+++ b/testcases/kernel/syscalls/epoll_wait/epoll_wait03.c
@@ -1,153 +1,86 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2016 Fujitsu Ltd.
  * Author: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.
+ * Copyright (c) 2021 Xie Ziyao <xieziyao@huawei.com>
  */

-/*
- * Description:
- *  1) epoll_wait(2) fails if epfd is not a valid file descriptor
- *  2) epoll_wait(2) fails if epfd is not an epoll file descriptor
- *  3) epoll_wait(2) fails if maxevents is less than zero
- *  4) epoll_wait(2) fails if maxevents is equal to zero
- *  5) epoll_wait(2) fails if the memory area pointed to by events
- *     is not accessible with write permissions.
+/*\
+ * [Description]
+ *
+ * Basic test for epoll_wait:
  *
- * Expected Result:
- *  1) epoll_wait(2) should return -1 and set errno to EBADF
- *  2) epoll_wait(2) should return -1 and set errno to EINVAL
- *  3) epoll_wait(2) should return -1 and set errno to EINVAL
- *  4) epoll_wait(2) should return -1 and set errno to EINVAL
- *  5) epoll_wait(2) should return -1 and set errno to EFAULT
+ * 1. epoll_wait fails with EBADF if epfd is not a valid file descriptor.
+ * 2. epoll_wait fails with EINVAL if epfd is not an epoll file descriptor.
+ * 3. epoll_wait fails with EINVAL if maxevents is less than zero.
+ * 4. epoll_wait fails with EINVAL if maxevents is equal to zero.
+ * 5. epoll_wait fails with EFAULT if the memory area pointed to by events is
+ * not accessible with write permissions.
  */

-#include <sys/epoll.h>
 #include <sys/mman.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-
-#include "test.h"
-#include "safe_macros.h"
+#include <sys/epoll.h>

-static int page_size, fds[2], epfd, inv_epfd, bad_epfd = -1;
+#include "tst_test.h"

 static struct epoll_event epevs[1] = {
 	{.events = EPOLLOUT}
 };

-static struct epoll_event *ev_rdwr = epevs;
-static struct epoll_event *ev_rdonly;
+static struct epoll_event *ev_rdonly, *ev_rdwr = epevs;
+static int fds[2], epfd, inv_epfd, bad_epfd = -1;

 static struct test_case_t {
 	int *epfd;
 	struct epoll_event **ev;
 	int maxevents;
 	int exp_errno;
+	const char *desc;
 } tc[] = {
-	/* test1 */
-	{&bad_epfd, &ev_rdwr, 1, EBADF},
-	/* test2 */
-	{&inv_epfd, &ev_rdwr, 1, EINVAL},
-	/* test3 */
-	{&epfd, &ev_rdwr, -1, EINVAL},
-	/* test4 */
-	{&epfd, &ev_rdwr, 0, EINVAL},
-	/* test5 */
-	{&epfd, &ev_rdonly, 1, EFAULT}
+	{&bad_epfd, &ev_rdwr, 1, EBADF, "epfd is not a valid fd"},
+	{&inv_epfd, &ev_rdwr, 1, EINVAL, "epfd is not an epoll fd"},
+	{&epfd, &ev_rdwr, -1, EINVAL, "maxevents is less than zero"},
+	{&epfd, &ev_rdwr, 0, EINVAL, "maxevents is equal to zero"},
+	{&epfd, &ev_rdonly, 1, EFAULT, "events has no write permissions"}
 };

-char *TCID = "epoll_wait03";
-int TST_TOTAL = ARRAY_SIZE(tc);
-
-static void setup(void);
-static void verify_epoll_wait(struct test_case_t *tc);
-static void cleanup(void);
-
-int main(int ac, char **av)
-{
-	int lc, i;
-
-	tst_parse_opts(ac, av, NULL, NULL);
-
-	setup();
-
-	for (lc = 0; TEST_LOOPING(lc); lc++) {
-		tst_count = 0;
-
-		for (i = 0; i < TST_TOTAL; i++)
-			verify_epoll_wait(&tc[i]);
-	}
-
-	cleanup();
-	tst_exit();
-}
-
 static void setup(void)
 {
-	tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
-	TEST_PAUSE;
-
-	page_size = getpagesize();
-
-	ev_rdonly = SAFE_MMAP(NULL, NULL, page_size, PROT_READ,
-		MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
-
-	SAFE_PIPE(NULL, fds);
+	ev_rdonly = SAFE_MMAP(NULL, getpagesize(), PROT_READ,
+			      MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+	SAFE_PIPE(fds);

 	epfd = epoll_create(1);
-	if (epfd == -1) {
-		tst_brkm(TBROK | TERRNO, cleanup,
-			 "failed to create epoll instance");
-	}
+	if (epfd == -1)
+		tst_brk(TBROK | TERRNO, "epoll_create()");

 	epevs[0].data.fd = fds[1];

-	if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[1], &epevs[0])) {
-		tst_brkm(TBROK | TERRNO, cleanup,
-			 "failed to register epoll target");
-	}
+	if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[1], &epevs[0]))
+		tst_brk(TBROK | TERRNO, "epoll_clt(..., EPOLL_CTL_ADD, ...)");
 }

-static void verify_epoll_wait(struct test_case_t *tc)
+static void verify_epoll_wait(unsigned int n)
 {
-	TEST(epoll_wait(*(tc->epfd), *(tc->ev), tc->maxevents, -1));
-	if (TEST_RETURN != -1) {
-		tst_resm(TFAIL, "epoll_wait() succeed unexpectedly");
-	} else {
-		if (tc->exp_errno == TEST_ERRNO) {
-			tst_resm(TPASS | TTERRNO,
-				 "epoll_wait() fails as expected");
-		} else {
-			tst_resm(TFAIL | TTERRNO,
-				 "epoll_wait() fails unexpectedly, "
-				 "expected %d: %s", tc->exp_errno,
-				 tst_strerrno(tc->exp_errno));
-		}
-	}
+	TST_EXP_FAIL(epoll_wait(*tc[n].epfd, *tc[n].ev, tc[n].maxevents, -1),
+		     tc[n].exp_errno, "epoll_wait() %s", tc[n].desc);
 }

 static void cleanup(void)
 {
-	if (epfd > 0 && close(epfd))
-		tst_resm(TWARN | TERRNO, "failed to close epfd");
+	if (epfd > 0)
+		SAFE_CLOSE(epfd);

-	if (close(fds[0]))
-		tst_resm(TWARN | TERRNO, "close(fds[0]) failed");
+	if (fds[0] > 0)
+		SAFE_CLOSE(fds[0]);

-	if (close(fds[1]))
-		tst_resm(TWARN | TERRNO, "close(fds[1]) failed");
+	if (fds[1] > 0)
+		SAFE_CLOSE(fds[1]);
 }
+
+static struct tst_test test = {
+	.setup = setup,
+	.cleanup = cleanup,
+	.test = verify_epoll_wait,
+	.tcnt = ARRAY_SIZE(tc),
+};
--
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [LTP] [PATCH 4/4] epoll_wait: Add test for epoll_wait04
  2021-08-09  8:38 [LTP] [PATCH 0/4] epoll_wait: Add test for epoll_wait04 and cleanup Xie Ziyao
                   ` (2 preceding siblings ...)
  2021-08-09  8:39 ` [LTP] [PATCH 3/4] epoll_wait: Convert epoll_wait03 to the new API Xie Ziyao
@ 2021-08-09  8:39 ` Xie Ziyao
  3 siblings, 0 replies; 7+ messages in thread
From: Xie Ziyao @ 2021-08-09  8:39 UTC (permalink / raw)
  To: ltp

Check that a timeout equal to zero causes epoll_wait() to return immediately.

Fixes: #792
Signed-off-by: Xie Ziyao <xieziyao@huawei.com>
---
 runtest/syscalls                              |  1 +
 .../kernel/syscalls/epoll_wait/.gitignore     |  7 +-
 .../kernel/syscalls/epoll_wait/epoll_wait04.c | 71 +++++++++++++++++++
 3 files changed, 76 insertions(+), 3 deletions(-)
 create mode 100644 testcases/kernel/syscalls/epoll_wait/epoll_wait04.c

diff --git a/runtest/syscalls b/runtest/syscalls
index 9af5aa5c0..57bf0477b 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -165,6 +165,7 @@ epoll_ctl02 epoll_ctl02
 epoll_wait01 epoll_wait01
 epoll_wait02 epoll_wait02
 epoll_wait03 epoll_wait03
+epoll_wait04 epoll_wait04
 epoll_pwait01 epoll_pwait01
 epoll_pwait02 epoll_pwait02
 epoll_pwait03 epoll_pwait03
diff --git a/testcases/kernel/syscalls/epoll_wait/.gitignore b/testcases/kernel/syscalls/epoll_wait/.gitignore
index 03b1be9a0..222955dd2 100644
--- a/testcases/kernel/syscalls/epoll_wait/.gitignore
+++ b/testcases/kernel/syscalls/epoll_wait/.gitignore
@@ -1,3 +1,4 @@
-/epoll_wait01
-/epoll_wait02
-/epoll_wait03
+epoll_wait01
+epoll_wait02
+epoll_wait03
+epoll_wait04
diff --git a/testcases/kernel/syscalls/epoll_wait/epoll_wait04.c b/testcases/kernel/syscalls/epoll_wait/epoll_wait04.c
new file mode 100644
index 000000000..dc62e9202
--- /dev/null
+++ b/testcases/kernel/syscalls/epoll_wait/epoll_wait04.c
@@ -0,0 +1,71 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved.
+ * Author: Xie Ziyao <xieziyao@huawei.com>
+ */
+
+/*\
+ * [Description]
+ *
+ * Check that a timeout equal to zero causes epoll_wait() to return immediately.
+ */
+
+#include <sys/epoll.h>
+
+#include "tst_test.h"
+#include "tst_timer_test.h"
+
+#define USEC_PRECISION 1000	/* Error margin allowed in usec */
+
+static int epfd, fds[2];
+static struct epoll_event epevs[1] = {
+	{.events = EPOLLIN}
+};
+
+static void run(void)
+{
+	tst_timer_start(CLOCK_MONOTONIC);
+	TEST(epoll_wait(epfd, epevs, 1, 0));
+	tst_timer_stop();
+
+	if (TST_RET != 0)
+		tst_res(TFAIL | TTERRNO, "epoll_wait() returned %li", TST_RET);
+
+	if (tst_timer_elapsed_us() <= USEC_PRECISION)
+		tst_res(TPASS, "epoll_wait() returns immediately with a timeout equal to zero");
+	else
+		tst_res(TFAIL, "epoll_wait() waited for %llius with a timeout equal to zero",
+			tst_timer_elapsed_us());
+}
+
+static void setup(void)
+{
+	SAFE_PIPE(fds);
+
+	epfd = epoll_create(1);
+	if (epfd == -1)
+		tst_brk(TBROK | TERRNO, "epoll_create()");
+
+	epevs[0].data.fd = fds[0];
+
+	if (epoll_ctl(epfd, EPOLL_CTL_ADD, fds[0], &epevs[0]))
+		tst_brk(TBROK | TERRNO, "epoll_clt(..., EPOLL_CTL_ADD, ...)");
+}
+
+static void cleanup(void)
+{
+	if (epfd > 0)
+		SAFE_CLOSE(epfd);
+
+	if (fds[0] > 0)
+		SAFE_CLOSE(fds[0]);
+
+	if (fds[1] > 0)
+		SAFE_CLOSE(fds[1]);
+}
+
+static struct tst_test test = {
+	.test_all = run,
+	.setup = setup,
+	.cleanup = cleanup,
+};
--
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [LTP] [PATCH 3/4] epoll_wait: Convert epoll_wait03 to the new API
  2021-08-09  8:39 ` [LTP] [PATCH 3/4] epoll_wait: Convert epoll_wait03 to the new API Xie Ziyao
@ 2021-08-09  8:53   ` Xie Ziyao
  2021-08-11 13:30   ` Cyril Hrubis
  1 sibling, 0 replies; 7+ messages in thread
From: Xie Ziyao @ 2021-08-09  8:53 UTC (permalink / raw)
  To: ltp

Hi, Cyril,

> +/*\
> + * [Description]
> + *
> + * Basic test for epoll_wait:
>    *
> - * Expected Result:
> - *  1) epoll_wait(2) should return -1 and set errno to EBADF
> - *  2) epoll_wait(2) should return -1 and set errno to EINVAL
> - *  3) epoll_wait(2) should return -1 and set errno to EINVAL
> - *  4) epoll_wait(2) should return -1 and set errno to EINVAL
> - *  5) epoll_wait(2) should return -1 and set errno to EFAULT
> + * 1. epoll_wait fails with EBADF if epfd is not a valid file descriptor.
> + * 2. epoll_wait fails with EINVAL if epfd is not an epoll file descriptor.
> + * 3. epoll_wait fails with EINVAL if maxevents is less than zero.
> + * 4. epoll_wait fails with EINVAL if maxevents is equal to zero.
> + * 5. epoll_wait fails with EFAULT if the memory area pointed to by events is
> + * not accessible with write permissions.
>    */

As I mentioned in #792, testcases/kernel/syscalls/epoll_wait has some 
test points that can also cover the epoll_pwait/epoll_pwait2 system call 
since their underlying implementations are similar.

Therefore, I suggest that we add tests for different parameters in 
syscalls/epoll_pwait, and implement basic tests in syscalls/epoll_wait.

The case where timeout set to 0 causes the call to return immediately is 
added to epoll_wait04, and new tests for epoll_pwait/epoll_pwait2 will 
be added in syscalls/epoll_pwait.

...
> +
> +static struct tst_test test = {
> +	.setup = setup,
> +	.cleanup = cleanup,
> +	.test = verify_epoll_wait,
> +	.tcnt = ARRAY_SIZE(tc),
> +};
> --
> 2.17.1
> 
> .
> 

Thank you for the suggestion.

Kind Regards,
Ziyao

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [LTP] [PATCH 3/4] epoll_wait: Convert epoll_wait03 to the new API
  2021-08-09  8:39 ` [LTP] [PATCH 3/4] epoll_wait: Convert epoll_wait03 to the new API Xie Ziyao
  2021-08-09  8:53   ` Xie Ziyao
@ 2021-08-11 13:30   ` Cyril Hrubis
  1 sibling, 0 replies; 7+ messages in thread
From: Cyril Hrubis @ 2021-08-11 13:30 UTC (permalink / raw)
  To: ltp

Hi!
> + * 1. epoll_wait fails with EBADF if epfd is not a valid file descriptor.
> + * 2. epoll_wait fails with EINVAL if epfd is not an epoll file descriptor.
> + * 3. epoll_wait fails with EINVAL if maxevents is less than zero.

I've changed this list to be use dashes instead of numbers, since that
is how the rest of the testcases documents subtests in lists.

And pushed the whole patchset, nice work, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-11 13:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09  8:38 [LTP] [PATCH 0/4] epoll_wait: Add test for epoll_wait04 and cleanup Xie Ziyao
2021-08-09  8:39 ` [LTP] [PATCH 1/4] epoll_wait: Add docparse formatting and cleanup for epoll_wait01 Xie Ziyao
2021-08-09  8:39 ` [LTP] [PATCH 2/4] epoll_wait: Add docparse formatting and fix warnings from checkpatch.pl Xie Ziyao
2021-08-09  8:39 ` [LTP] [PATCH 3/4] epoll_wait: Convert epoll_wait03 to the new API Xie Ziyao
2021-08-09  8:53   ` Xie Ziyao
2021-08-11 13:30   ` Cyril Hrubis
2021-08-09  8:39 ` [LTP] [PATCH 4/4] epoll_wait: Add test for epoll_wait04 Xie Ziyao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.