Skip to contentSkip to conversation

cr_tests: epoll: Add test passing epoll fd via SCM_RIGHTS

PATCH In review Matt Helsley 1 participant 1 message Oct 12, 2009

lore
Share & tools
lore
#0 lore raw

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.

---
 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
index 84aec49..b3e3ca2 100644
@@ -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
index 16ed76c..7e30e4f 100755
@@ -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