Skip to contentSkip to conversation

selftests: add epoll selftests

PATCH In review hev 2 participants 2 messages Oct 9, 2019

Subsystems (2)
lore
Share & tools
lore

hev

author
#0 lore raw

PATCH 1/1 selftests: add epoll selftests

From: Heiher <[email protected]>

This adds the promised selftest for epoll. It will verify the wakeups of epoll. Including leaf and nested mode, epoll_wait() and poll() and multi-threads.

Cc Andrew Morton <[email protected]>
Cc Jason Baron <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Roman Penyaev <[email protected]>
---
 tools/testing/selftests/Makefile              |    1 +
 .../selftests/filesystems/epoll/.gitignore    |    1 +
 .../selftests/filesystems/epoll/Makefile      |    7 +
 .../filesystems/epoll/epoll_wakeup_test.c     | 3074 +++++++++++++++++
 4 files changed, 3083 insertions(+)
 create mode 100644 tools/testing/selftests/filesystems/epoll/.gitignore
 create mode 100644 tools/testing/selftests/filesystems/epoll/Makefile
 create mode 100644 tools/testing/selftests/filesystems/epoll/epoll_wakeup_test.c
tools/testing/selftests/Makefile +1 -0
index 9781ca79794a..57b91b0ac7cb 100644
@@ -11,6 +11,7 @@ TARGETS += efivarfs
 TARGETS += exec
 TARGETS += filesystems
 TARGETS += filesystems/binderfs
+TARGETS += filesystems/epoll
 TARGETS += firmware
 TARGETS += ftrace
 TARGETS += futex
tools/testing/selftests/filesystems/epoll/.gitignore new file +1 -0
new file mode 100644
index 000000000000..9ae8db44ec14
@@ -0,0 +1 @@
+epoll_wakeup_test
tools/testing/selftests/filesystems/epoll/Makefile new file +7 -0
new file mode 100644
index 000000000000..e62f3d4f68da
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0
+
+CFLAGS += -I../../../../../usr/include/
+LDFLAGS += -lpthread
+TEST_GEN_PROGS := epoll_wakeup_test
+
+include ../../lib.mk
tools/testing/selftests/filesystems/epoll/epoll_wakeup_test.c new file +3074 -0

2,985 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.23.0

Part of the diff is not shown here. View the raw message.

Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · hev

From: Heiher <[email protected]>

This adds the promised selftest for epoll. It will verify the wakeups of epoll. Including leaf and nested mode, epoll_wait() and poll() and multi-threads.

Nice! The only thing I doubt this suite should be a part of filesystems/, maybe one level up, i.e. selftests/epoll?

--
Roman