Split stress-set-insdelfind to HP and RCU part
[libcds.git] / test / stress / set / set_type_skip_list.h
index ac3ebbc9c710c5467f5fd3d353635a4a4938ea5e..edf0bb34a0543b3cbdaf97ed2a25ab76627e5543 100644 (file)
@@ -225,84 +225,133 @@ namespace set {
 
 } // namespace set
 
-#define CDSSTRESS_SkipListSet_case( fixture, test_case, skiplist_set_type, key_type, value_type, level ) \
+#define CDSSTRESS_SkipListSet_case( fixture, test_case, skiplist_set_type, key_type, value_type ) \
     TEST_F( fixture, skiplist_set_type ) \
     { \
-        if ( !check_detail_level( level )) return; \
         typedef set::set_type< tag_SkipListSet, key_type, value_type >::skiplist_set_type set_type; \
         test_case<set_type>(); \
     }
 
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+
+#if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1
+#   define CDSSTRESS_SkipListSet_SHRCU_2( fixture, test_case, key_type, value_type ) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_pascal_seqcst, key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_less_pascal_seqcst, key_type, value_type) \
+
+#else
+#   define CDSSTRESS_SkipListSet_SHRCU_2( fixture, test_case, key_type, value_type )
+#endif
+
+#if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1
+#   define CDSSTRESS_SkipListSet_SHRCU_1( fixture, test_case, key_type, value_type ) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_less_pascal,        key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_pascal_stat,   key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_pascal,         key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_cmp_pascal_stat,    key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_less_xorshift,      key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_xorshift_stat, key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_cmp_xorshift,       key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_xorshift_stat,  key_type, value_type) \
+
+#else
+#   define CDSSTRESS_SkipListSet_SHRCU_1( fixture, test_case, key_type, value_type )
+#endif
+
+
 #   define CDSSTRESS_SkipListSet_SHRCU( fixture, test_case, key_type, value_type ) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_pascal,        key_type, value_type, 0) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_less_pascal,        key_type, value_type, 1) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_pascal_seqcst, key_type, value_type, 2) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_less_pascal_seqcst, key_type, value_type, 2) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_pascal_stat,   key_type, value_type, 1) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_less_pascal_stat,   key_type, value_type, 0) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_pascal,         key_type, value_type, 1) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_cmp_pascal,         key_type, value_type, 0) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_pascal_stat,    key_type, value_type, 0) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_cmp_pascal_stat,    key_type, value_type, 1) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_xorshift,      key_type, value_type, 0) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_less_xorshift,      key_type, value_type, 1) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_xorshift_stat, key_type, value_type, 1) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_less_xorshift_stat, key_type, value_type, 0) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_xorshift,       key_type, value_type, 0) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_cmp_xorshift,       key_type, value_type, 1) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_xorshift_stat,  key_type, value_type, 1) \
-        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_cmp_xorshift_stat,  key_type, value_type, 0)
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_pascal,        key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_less_pascal_stat,   key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_cmp_pascal,         key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_pascal_stat,    key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_xorshift,      key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_less_xorshift_stat, key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_xorshift,       key_type, value_type) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_sht_cmp_xorshift_stat,  key_type, value_type) \
+        CDSSTRESS_SkipListSet_SHRCU_1( fixture, test_case, key_type, value_type ) \
+        CDSSTRESS_SkipListSet_SHRCU_2( fixture, test_case, key_type, value_type ) \
+
 #else
 #   define CDSSTRESS_SkipListSet_SHRCU( fixture, test_case, key_type, value_type )
 #endif
 
+#if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1
+#   define CDSSTRESS_SkipListSet_HP_2( fixture, test_case, key_type, value_type ) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_pascal_seqcst,      key_type, value_type ) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_pascal_seqcst,     key_type, value_type ) \
+
+#   define CDSSTRESS_SkipListSet_RCU_2( fixture, test_case, key_type, value_type ) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_pascal_seqcst, key_type, value_type ) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_pascal_seqcst, key_type, value_type ) \
+        CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_pascal_seqcst, key_type, value_type ) \
+
+#else
+#   define CDSSTRESS_SkipListSet_HP_2( fixture, test_case, key_type, value_type )
+#   define CDSSTRESS_SkipListSet_RCU_2( fixture, test_case, key_type, value_type )
+#endif
+
+#if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1
+#   define CDSSTRESS_SkipListSet_HP_1( fixture, test_case, key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_pascal,            key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_pascal_stat,        key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_pascal,              key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_pascal_stat,        key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_xorshift,          key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_xorshift_stat,      key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_xorshift,            key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_xorshift_stat,      key_type, value_type ) \
+
+#   define CDSSTRESS_SkipListSet_RCU_1( fixture, test_case, key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_pascal,        key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_pascal_stat,   key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_pascal_stat,   key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_pascal,         key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_pascal,         key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_pascal_stat,    key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_xorshift,      key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_xorshift_stat, key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_xorshift_stat, key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_xorshift,       key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_xorshift,       key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_xorshift_stat,  key_type, value_type ) \
+
+#else
+#   define CDSSTRESS_SkipListSet_HP_1( fixture, test_case, key_type, value_type )
+#   define CDSSTRESS_SkipListSet_RCU_1( fixture, test_case, key_type, value_type )
+#endif
+
+
+#define CDSSTRESS_SkipListSet_HP( fixture, test_case, key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_pascal,             key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_pascal_stat,       key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_pascal,             key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_pascal_stat,         key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_xorshift,           key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_xorshift_stat,     key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_xorshift,           key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_xorshift_stat,       key_type, value_type ) \
+    CDSSTRESS_SkipListSet_HP_1( fixture, test_case, key_type, value_type ) \
+    CDSSTRESS_SkipListSet_HP_2( fixture, test_case, key_type, value_type ) \
+
+#define CDSSTRESS_SkipListSet_RCU( fixture, test_case, key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_pascal,        key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_pascal,        key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_pascal_stat,   key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_pascal,         key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_pascal_stat,    key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_pascal_stat,    key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_xorshift,      key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_xorshift,      key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_xorshift_stat, key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_xorshift,       key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_xorshift_stat,  key_type, value_type ) \
+    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_xorshift_stat,  key_type, value_type ) \
+    CDSSTRESS_SkipListSet_RCU_1( fixture, test_case, key_type, value_type ) \
+    CDSSTRESS_SkipListSet_RCU_2( fixture, test_case, key_type, value_type ) \
+    CDSSTRESS_SkipListSet_SHRCU( fixture, test_case, key_type, value_type ) \
+
 #define CDSSTRESS_SkipListSet( fixture, test_case, key_type, value_type ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_pascal,             key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_pascal,            key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_pascal,        key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_pascal,        key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_pascal,        key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_pascal_seqcst,      key_type, value_type, 2 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_pascal_seqcst,     key_type, value_type, 2 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_pascal_seqcst, key_type, value_type, 2 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_pascal_seqcst, key_type, value_type, 2 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_pascal_seqcst, key_type, value_type, 2 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_pascal_stat,        key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_pascal_stat,       key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_pascal_stat,   key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_pascal_stat,   key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_pascal_stat,   key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_pascal,              key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_pascal,             key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_pascal,         key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_pascal,         key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_pascal,         key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_pascal_stat,         key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_pascal_stat,        key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_pascal_stat,    key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_pascal_stat,    key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_pascal_stat,    key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_xorshift,           key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_xorshift,          key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_xorshift,      key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_xorshift,      key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_xorshift,      key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_xorshift_stat,      key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_xorshift_stat,     key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_xorshift_stat, key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_xorshift_stat, key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_xorshift_stat, key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_xorshift,            key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_xorshift,           key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_xorshift,       key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_xorshift,       key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_xorshift,       key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_xorshift_stat,       key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_xorshift_stat,      key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_xorshift_stat,  key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_xorshift_stat,  key_type, value_type, 1 ) \
-    CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_xorshift_stat,  key_type, value_type, 0 ) \
-    CDSSTRESS_SkipListSet_SHRCU( fixture, test_case, key_type, value_type )
+    CDSSTRESS_SkipListSet_HP( fixture, test_case, key_type, value_type ) \
+    CDSSTRESS_SkipListSet_RCU( fixture, test_case, key_type, value_type ) \
 
 #endif // #ifndef CDSUNIT_SET_TYPE_SKIP_LIST_H