about summary refs log tree commit homepage
path: root/Makefile.am
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-07-12 00:22:29 +0000
committerEric Wong <normalperson@yhbt.net>2013-07-12 00:22:29 +0000
commitf206fc4ee27546c57ebc6b4bf069257c05970cd2 (patch)
treef3c56cde58919b46762c2d69399303eb9901f554 /Makefile.am
parente50365f275ada4afcd5f25f2ac3328e341a79d71 (diff)
downloadcmogstored-f206fc4ee27546c57ebc6b4bf069257c05970cd2.tar.gz
pwrite can be a slow, blocking function on an overloaded
system, but a slow pwrite requires a wrapper to simulate.

This allows us to have coverage of the:

	if (mog_ioq_contended())
		return MOG_NEXT_WAIT_RD;

cases in http_put.c
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 494bfa8..ad19560 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -169,6 +169,12 @@ 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
+
+check_PROGRAMS += test/pwrite-wrap
+test_pwrite_wrap_SOURCES = $(cmogstored_SOURCES) test/pwrite-wrap.c
+test_pwrite_wrap_LDFLAGS = $(cmogstored_LDFLAGS) $(AM_LDFLAGS) \
+                          -Wl,--wrap=pwrite
+
 endif # HAVE_LD_WRAP
 
 HELP2MAN = help2man