Update rcutorture: test all RCU flavors
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 9 Oct 2009 14:23:09 +0000 (10:23 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 9 Oct 2009 14:23:09 +0000 (10:23 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
tests/Makefile.am
tests/api_gcc.h
tests/api_ppc.h
tests/api_x86.h
tests/rcutorture.h
tests/urcutorture.c

index 748e77019d6987c9927194144fbc7300c86ec8ba..a4c30ff911b36d8158787486a7f8617fbface6e3 100644 (file)
@@ -4,13 +4,13 @@ AM_CFLAGS=-I$(top_srcdir) -I$(top_builddir)
 noinst_PROGRAMS = test_urcu test_urcu_dynamic_link test_urcu_timing \
         test_rwlock_timing test_rwlock test_perthreadlock_timing \
         test_perthreadlock test_urcu_yield test_urcu_mb \
-        test_qsbr_timing test_qsbr urcutorture \
-        urcutorture-yield test_mutex test_looplen test_urcu_gc \
+        test_qsbr_timing test_qsbr rcutorture_urcu \
+        rcutorture_urcu_mb rcutorture_urcu_bp rcutorture_qsbr \
+       test_mutex test_looplen test_urcu_gc \
         test_urcu_gc_mb test_qsbr_gc test_qsbr_lgc test_urcu_lgc \
         test_urcu_lgc_mb test_qsbr_dynamic_link test_urcu_mb_defer \
         test_uatomic test_urcu_assign test_urcu_assign_dynamic_link \
         test_urcu_bp test_urcu_bp_dynamic_link
-
 noinst_HEADERS = rcutorture.h
 
 if COMPAT_ARCH
@@ -33,6 +33,10 @@ URCU_QSBR=$(top_builddir)/urcu-qsbr.c $(top_builddir)/urcu-pointer.c $(COMPAT)
 # -DURCU_MB must be defined
 URCU_MB_DEFER=$(top_builddir)/urcu.c $(top_builddir)/urcu-defer.c $(top_builddir)/urcu-pointer.c $(COMPAT)
 
+URCU_SIGNAL_LIB=$(top_builddir)/liburcu.la
+URCU_MB_LIB=$(top_builddir)/liburcu-mb.la
+URCU_BP_LIB=$(top_builddir)/liburcu-bp.la
+URCU_QSBR_LIB=$(top_builddir)/liburcu-qsbr.la
 
 if GCC_API
 APIHEADER=api_gcc.h
@@ -68,10 +72,21 @@ test_qsbr_timing_SOURCES = test_qsbr_timing.c $(URCU_QSBR)
 
 test_qsbr_SOURCES = test_qsbr.c $(URCU_QSBR)
 
-urcutorture_SOURCES = api.h urcutorture.c $(URCU_SIGNAL)
+rcutorture_urcu_SOURCES = api.h urcutorture.c
+rcutorture_urcu_CFLAGS = -DTORTURE_URCU_SIGNAL $(AM_CFLAGS)
+rcutorture_urcu_LDADD = $(URCU_SIGNAL_LIB)
+
+rcutorture_urcu_mb_SOURCES = api.h urcutorture.c
+rcutorture_urcu_mb_CFLAGS = -DTORTURE_URCU_MB $(AM_CFLAGS)
+rcutorture_urcu_mb_LDADD = $(URCU_MB_LIB)
+
+rcutorture_qsbr_SOURCES = api.h urcutorture.c
+rcutorture_qsbr_CFLAGS = -DTORTURE_QSBR $(AM_CFLAGS)
+rcutorture_qsbr_LDADD = $(URCU_QSBR_LIB)
 
-urcutorture_yield_SOURCES = api.h urcutorture.c $(URCU_SIGNAL_YIELD)
-urcutorture_yield_CFLAGS = -DDEBUG_YIELD $(AM_CFLAGS)
+rcutorture_urcu_bp_SOURCES = api.h urcutorture.c
+rcutorture_urcu_bp_CFLAGS = -DTORTURE_URCU_BP $(AM_CFLAGS)
+rcutorture_urcu_bp_LDADD = $(URCU_BP_LIB)
 
 test_mutex_SOURCES = test_mutex.c $(URCU_SIGNAL)
 
@@ -111,7 +126,7 @@ test_urcu_bp_SOURCES = test_urcu_bp.c $(URCU_BP)
 test_urcu_bp_dynamic_link_SOURCES = test_urcu_bp.c $(URCU_BP)
 test_urcu_bp_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
 
-urcutorture.o: api.h
+*.o: api.h
 
 api.h: $(APIHEADER)
        cp -f $(srcdir)/$(APIHEADER) api.h
index b31f3fcd2a1d5a52426c01537bd76820c00023a3..872c873f9760da2b812c54aa19a2dc4d0c7894f0 100644 (file)
@@ -1,3 +1,5 @@
+
+#ifndef _INCLUDE_API_H
 #define _INCLUDE_API_H
 
 /*
@@ -1330,3 +1332,5 @@ static inline void hlist_move_list(struct hlist_head *old,
             pos = n)
 
 #endif
+
+#endif
index 3ca5270293ae65c193b3b1ca6293d4beb6ab72fa..18821e42125b6f97c0f572aa27dba5c400d5b2fb 100644 (file)
@@ -1,5 +1,6 @@
 /* MECHANICALLY GENERATED, DO NOT EDIT!!! */
 
+#ifndef _INCLUDE_API_H
 #define _INCLUDE_API_H
 
 /*
@@ -1704,3 +1705,5 @@ static inline void hlist_move_list(struct hlist_head *old,
             pos = n)
 
 #endif
+
+#endif
index 4f6e836388ccc2e14693e080a7fcdb12b4b73f40..05fc05adbd538f3631efc419f6bd78d461ff5106 100644 (file)
@@ -1,5 +1,6 @@
 /* MECHANICALLY GENERATED, DO NOT EDIT!!! */
 
+#ifndef _INCLUDE_API_H
 #define _INCLUDE_API_H
 
 /*
@@ -1393,3 +1394,5 @@ static inline void hlist_move_list(struct hlist_head *old,
             pos = n)
 
 #endif
+
+#endif
index 712d59df669c54d564b21d2a18b5f75c71a17372..181547a0097dbaab406eceba1d19177da6fb8373 100644 (file)
@@ -92,6 +92,12 @@ int goflag __attribute__((__aligned__(CACHE_LINE_SIZE))) = GOFLAG_INIT;
 #define rcu_read_unlock_nest()
 #endif /* #else #ifdef RCU_READ_NESTABLE */
 
+#ifdef TORTURE_QSBR
+#define mark_rcu_quiescent_state       rcu_quiescent_state
+#define put_thread_offline             rcu_thread_offline
+#define put_thread_online              rcu_thread_online
+#endif
+
 #ifndef mark_rcu_quiescent_state
 #define mark_rcu_quiescent_state() do ; while (0)
 #endif /* #ifdef mark_rcu_quiescent_state */
index 7e3860615c999d793074b5f5698fc4dfbb5e6772..929d171b862717ab985bcde59407f1678c3fbe21 100644 (file)
@@ -6,7 +6,21 @@
 #include <urcu/arch.h>
 #include "api.h"
 #define _LGPL_SOURCE
+
+#ifdef TORTURE_URCU_SIGNAL
 #include <urcu.h>
+#endif
+#ifdef TORTURE_URCU_MB
+#define URCU_MB
+#include <urcu.h>
+#endif
+#ifdef TORTURE_QSBR
+#include <urcu-qsbr.h>
+#endif
+#ifdef TORTURE_URCU_BP
+#include <urcu-bp.h>
+#endif
+
 #include <urcu/uatomic_arch.h>
 #include <urcu/rculist.h>
 #include "rcutorture.h"
This page took 0.030615 seconds and 4 git commands to generate.