@@ -156,6 +156,7 @@ dup205 dup205
dup3_01 dup3_01
dup3_02 dup3_02
+epoll_create01 epoll_create01
epoll_create1_01 epoll_create1_01
epoll_create1_02 epoll_create1_02
epoll01 epoll-ltp
new file mode 100644
@@ -0,0 +1 @@
+epoll_create01
new file mode 100644
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) Linux Test Project, 2021
+# Author: Xie Ziyao <ziyaoxie@outlook.com>
+
+top_srcdir ?= ../../../..
+
+include $(top_srcdir)/include/mk/testcases.mk
+
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
new file mode 100644
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) Linux Test Project, 2021
+ * Author: Xie Ziyao <ziyaoxie@outlook.com>
+ */
+
+/*\
+ * [Description]
+ *
+ * Verify that epoll_create return a nonnegative file descriptor on success.
+ *
+ * The size argument informed the kernel of the number of file descriptors
+ * that the caller expected to add to the epoll instance, but it is no longer
+ * required.
+ */
+
+#include <sys/epoll.h>
+
+#include "tst_test.h"
+#include "lapi/epoll.h"
+#include "lapi/syscalls.h"
+
+static int tc[] = {1, INT_MAX};
+
+static void run(unsigned int n)
+{
+ TST_EXP_FD(tst_syscall(__NR_epoll_create, tc[n]), "epoll_create(%d)", tc[n]);
+
+ if (!TST_PASS)
+ return;
+ SAFE_CLOSE(TST_PASS);
+}
+
+static struct tst_test test = {
+ .tcnt = ARRAY_SIZE(tc),
+ .test = run,
+};