cr_tests: epoll: Add test passing epoll fd via SCM_RIGHTS
PATCH 7/7 cr_tests: epoll: Add test passing epoll fd via SCM_RIGHTS
This test passes an epoll fd and all the fds in its set over a UNIX socket via SCM_RIGHTS. Then it does virtually the same things as the pipe test. A special optional argument allows the second process to be in a different cgroup so that we can test leak detection of epoll fd sets in addition to SCM_RIGHTS.
Signed-off-by Matt Helsley <matthltc-r/[email protected]>
--- epoll/Makefile | 2 +- epoll/run.sh | 2 + epoll/scm.c | 345 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 348 insertions(+), 1 deletions(-) create mode 100644 epoll/scm.c
epoll/Makefile +1 -1
@@ -3,7 +3,7 @@ LIBS := ../libcrtest/libcrtest.a ./libeptest.a CFLAGS := -Wall $(ARCHOPTS) -I../ -I../libcrtest -PROGS=empty pipe sk10k cycle +PROGS=empty pipe sk10k cycle scm .PHONY: all clean
epoll/run.sh +2 -0
@@ -111,6 +111,8 @@ while [ $CURTEST -lt $NUMTESTS ]; do done trap '' ERR EXIT +# TODO add scm testcase to run.sh + rm -f ./checkpoint-{ready,done}
epoll/scm.c new file +345 -0
345 lines not on this page · raw message
Signature · 1 line
1.5.6.3