]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: disable cross process sem tests on non-Linux 1043/head
authorNoah Watkins <noahwatkins@gmail.com>
Sun, 29 Sep 2013 19:19:00 +0000 (12:19 -0700)
committerNoah Watkins <noahwatkins@gmail.com>
Sat, 4 Jan 2014 17:18:04 +0000 (09:18 -0800)
How to make this portable:

- MAP_ANONYMOUS -> MAP_ANON (OSX)

- sem_init (anonymous semaphore) needs to be replaced by named
semaphores using sem_open/sem_close. Use a memory address of the sem_t
variable to hack anonymous semaphore behavior.

- sem_getvalue isn't supported on OSX. it is used here to do
sem_wait/sem_post to bring a semaphore back to a specific value. to get
around this we may need to restructure the test so that the semaphore
can be destroyed and re-initialized rather than inspected as its
currently being done.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
src/test/Makefile.am

index 5faf9ac49fd1e83c2d738a928091634dbc3ed755..9123f1d2ca1d8aa657dabf4addc2806c63857e3f 100644 (file)
@@ -192,6 +192,7 @@ bin_DEBUGPROGRAMS += ceph_erasure_code_benchmark
 
 ## System tests
 
+if LINUX
 libsystest_la_SOURCES = \
        test/system/cross_process_sem.cc \
        test/system/systest_runnable.cc \
@@ -229,6 +230,7 @@ ceph_test_rados_watch_notify_SOURCES = \
        test/system/st_rados_notify.cc
 ceph_test_rados_watch_notify_LDADD = $(LIBRADOS) libsystest.la $(PTHREAD_LIBS)
 bin_DEBUGPROGRAMS += ceph_test_rados_watch_notify
+endif
 
 ceph_bench_log_SOURCES = test/bench_log.cc
 ceph_bench_log_LDADD = $(CEPH_GLOBAL)