about summary refs log tree commit homepage
path: root/Makefile.am
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-06-21 03:34:39 +0000
committerEric Wong <normalperson@yhbt.net>2013-06-25 22:07:51 +0000
commitcb6851fc69a3fb3d47e4e3a350787deef1bfafa6 (patch)
treef391a86a50553f45aa3fdf183b3e29b4b904c1bd /Makefile.am
parentc1ced9e91ddc647a40f343d20d43cf13fe88eeba (diff)
downloadcmogstored-cb6851fc69a3fb3d47e4e3a350787deef1bfafa6.tar.gz
For difficult-to-trigger errors, fault injection is necessary for
testing our error handling.  I have confirmed this test fails with
"avoid leaks on epoll/kqueue resources exhaustion" reverted.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index dd1e9e3..b2cbd38 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -132,13 +132,14 @@ PERL_LOG_FLAGS = -v
 SLOWRB_LOG_COMPILER = RUBY="$(RUBY)"
 AM_SLOWRB_LOG_FLAGS = top_srcdir="$(top_srcdir)"
 include $(top_srcdir)/test/ruby.mk
-check_PROGRAMS = test/valid-path-1 test/trywrite-1 \
+check_tests = test/valid-path-1 test/trywrite-1 \
   test/cfg-parser-1 test/fdmap-1 test/thrpool-1 \
   test/queue-idle-1 \
   test/http-parser-1 test/chunk-parser-1 \
   test/ioutil-1
+check_PROGRAMS = $(check_tests)
 
-TESTS = $(SLOW_RB_FILES) $(RB_TESTS_FAST) $(check_PROGRAMS) $(PERL_TESTS)
+TESTS = $(SLOW_RB_FILES) $(RB_TESTS_FAST) $(check_tests) $(PERL_TESTS)
 
 # we need TMPDIR to work in a place where iostat(1) gives stats
 test_tmpdir = $(top_builddir)/tmp
@@ -161,6 +162,15 @@ test_http_parser_1_SOURCES = test/http-parser-1.c $(test_COMMON)
 test_chunk_parser_1_SOURCES = test/chunk-parser-1.c $(test_COMMON)
 test_ioutil_1_SOURCES = test/ioutil-1.c $(test_COMMON)
 
+if HAVE_LD_WRAP
+if HAVE_EPOLL
+check_PROGRAMS += test/epoll-wrap
+test_epoll_wrap_SOURCES = $(cmogstored_SOURCES) test/epoll-wrap.c
+test_epoll_wrap_LDFLAGS = $(cmogstored_LDFLAGS) $(AM_LDFLAGS) \
+                          -Wl,--wrap=epoll_ctl -Wl,--wrap=epoll_create
+endif # HAVE_EPOLL
+endif # HAVE_LD_WRAP
+
 HELP2MAN = help2man
 dist_man_MANS = cmogstored.1