From: Noah Watkins Date: Sun, 29 Sep 2013 19:19:00 +0000 (-0700) Subject: test: disable cross process sem tests on non-Linux X-Git-Tag: v0.77~43^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1043%2Fhead;p=ceph.git test: disable cross process sem tests on non-Linux 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 --- diff --git a/src/test/Makefile.am b/src/test/Makefile.am index 5faf9ac49fd1..9123f1d2ca1d 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -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)