Stress tests: removed command line parameter --detail-level and envvar CDSTEST_DETAIL...
[libcds.git] / test / stress / map / map_type_skip_list.h
1 /*
2     This file is a part of libcds - Concurrent Data Structures library
3
4     (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
5
6     Source code repo: http://github.com/khizmax/libcds/
7     Download: http://sourceforge.net/projects/libcds/files/
8
9     Redistribution and use in source and binary forms, with or without
10     modification, are permitted provided that the following conditions are met:
11
12     * Redistributions of source code must retain the above copyright notice, this
13       list of conditions and the following disclaimer.
14
15     * Redistributions in binary form must reproduce the above copyright notice,
16       this list of conditions and the following disclaimer in the documentation
17       and/or other materials provided with the distribution.
18
19     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23     FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24     DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27     OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef CDSUNIT_MAP_TYPE_SKIP_LIST_H
32 #define CDSUNIT_MAP_TYPE_SKIP_LIST_H
33
34 #include "map_type.h"
35
36 #include <cds/container/skip_list_map_hp.h>
37 #include <cds/container/skip_list_map_dhp.h>
38 #include <cds/container/skip_list_map_rcu.h>
39 #include <cds/container/skip_list_map_nogc.h>
40
41 #include <cds_test/stat_skiplist_out.h>
42
43 namespace map {
44
45     template <class GC, typename Key, typename T, typename Traits = cc::skip_list::traits >
46     class SkipListMap : public cc::SkipListMap< GC, Key, T, Traits >
47     {
48         typedef cc::SkipListMap< GC, Key, T, Traits > base_class;
49     public:
50         template <typename Config>
51         SkipListMap( Config const& /*cfg*/)
52             : base_class()
53         {}
54
55         std::pair<Key, bool> extract_min_key()
56         {
57             auto xp = base_class::extract_min();
58             if ( xp )
59                 return std::make_pair( xp->first, true );
60             return std::make_pair( Key(), false );
61         }
62
63         std::pair<Key, bool> extract_max_key()
64         {
65             auto xp = base_class::extract_max();
66             if ( xp )
67                 return std::make_pair( xp->first, true );
68             return std::make_pair( Key(), false );
69         }
70
71         // for testing
72         static CDS_CONSTEXPR bool const c_bExtractSupported = true;
73         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
74         static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
75     };
76
77     struct tag_SkipListMap;
78
79     template <typename Key, typename Value>
80     struct map_type< tag_SkipListMap, Key, Value >: public map_type_base< Key, Value >
81     {
82         typedef map_type_base< Key, Value >      base_class;
83         typedef typename base_class::key_compare compare;
84         typedef typename base_class::key_less    less;
85
86         class traits_SkipListMap_less_pascal: public cc::skip_list::make_traits <
87                 co::less< less >
88                 ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
89                 ,co::item_counter< cds::atomicity::item_counter >
90             >::type
91         {};
92         typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_hp_less_pascal;
93         typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_dhp_less_pascal;
94         typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_nogc_less_pascal;
95         typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpi_less_pascal;
96         typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpb_less_pascal;
97         typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpt_less_pascal;
98 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
99         typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_shb_less_pascal;
100         typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_sht_less_pascal;
101 #endif
102
103         class traits_SkipListMap_less_pascal_seqcst: public cc::skip_list::make_traits <
104                 co::less< less >
105                 ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
106                 ,co::memory_model< co::v::sequential_consistent >
107                 ,co::item_counter< cds::atomicity::item_counter >
108             >::type
109         {};
110         typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_hp_less_pascal_seqcst;
111         typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_dhp_less_pascal_seqcst;
112         typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_nogc_less_pascal_seqcst;
113         typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpi_less_pascal_seqcst;
114         typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpb_less_pascal_seqcst;
115         typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpt_less_pascal_seqcst;
116 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
117         typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_shb_less_pascal_seqcst;
118         typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_sht_less_pascal_seqcst;
119 #endif
120
121         class traits_SkipListMap_less_pascal_stat: public cc::skip_list::make_traits <
122                 co::less< less >
123                 ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
124                 ,co::stat< cc::skip_list::stat<> >
125                 ,co::item_counter< cds::atomicity::item_counter >
126             >::type
127         {};
128         typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_hp_less_pascal_stat;
129         typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_dhp_less_pascal_stat;
130         typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_nogc_less_pascal_stat;
131         typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpi_less_pascal_stat;
132         typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpb_less_pascal_stat;
133         typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpt_less_pascal_stat;
134 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
135         typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_shb_less_pascal_stat;
136         typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_sht_less_pascal_stat;
137 #endif
138
139         class traits_SkipListMap_cmp_pascal: public cc::skip_list::make_traits <
140                 co::compare< compare >
141                 ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
142                 ,co::item_counter< cds::atomicity::item_counter >
143             >::type
144         {};
145         typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_hp_cmp_pascal;
146         typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_dhp_cmp_pascal;
147         typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_nogc_cmp_pascal;
148         typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpi_cmp_pascal;
149         typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpb_cmp_pascal;
150         typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpt_cmp_pascal;
151 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
152         typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_shb_cmp_pascal;
153         typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_sht_cmp_pascal;
154 #endif
155
156         class traits_SkipListMap_cmp_pascal_stat: public cc::skip_list::make_traits <
157                 co::compare< compare >
158                 ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
159                 ,co::stat< cc::skip_list::stat<> >
160                 ,co::item_counter< cds::atomicity::item_counter >
161             >::type
162         {};
163         typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_hp_cmp_pascal_stat;
164         typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_dhp_cmp_pascal_stat;
165         typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_nogc_cmp_pascal_stat;
166         typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpi_cmp_pascal_stat;
167         typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpb_cmp_pascal_stat;
168         typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpt_cmp_pascal_stat;
169 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
170         typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_shb_cmp_pascal_stat;
171         typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_sht_cmp_pascal_stat;
172 #endif
173
174         class traits_SkipListMap_less_xorshift: public cc::skip_list::make_traits <
175                 co::less< less >
176                 ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
177                 ,co::item_counter< cds::atomicity::item_counter >
178             >::type
179         {};
180         typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_hp_less_xorshift;
181         typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_dhp_less_xorshift;
182         typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_nogc_less_xorshift;
183         typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpi_less_xorshift;
184         typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpb_less_xorshift;
185         typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpt_less_xorshift;
186 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
187         typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_shb_less_xorshift;
188         typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_sht_less_xorshift;
189 #endif
190
191         class traits_SkipListMap_less_xorshift_stat: public cc::skip_list::make_traits <
192                 co::less< less >
193                 ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
194                 ,co::stat< cc::skip_list::stat<> >
195                 ,co::item_counter< cds::atomicity::item_counter >
196             >::type
197         {};
198         typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_hp_less_xorshift_stat;
199         typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_dhp_less_xorshift_stat;
200         typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_nogc_less_xorshift_stat;
201         typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpi_less_xorshift_stat;
202         typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpb_less_xorshift_stat;
203         typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpt_less_xorshift_stat;
204 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
205         typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_shb_less_xorshift_stat;
206         typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_sht_less_xorshift_stat;
207 #endif
208
209         class traits_SkipListMap_cmp_xorshift: public cc::skip_list::make_traits <
210                 co::compare< compare >
211                 ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
212                 ,co::item_counter< cds::atomicity::item_counter >
213             >::type
214         {};
215         typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_hp_cmp_xorshift;
216         typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_dhp_cmp_xorshift;
217         typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_nogc_cmp_xorshift;
218         typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpi_cmp_xorshift;
219         typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpb_cmp_xorshift;
220         typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpt_cmp_xorshift;
221 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
222         typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_shb_cmp_xorshift;
223         typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_sht_cmp_xorshift;
224 #endif
225
226         class traits_SkipListMap_cmp_xorshift_stat: public cc::skip_list::make_traits <
227                 co::compare< compare >
228                 ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
229                 ,co::stat< cc::skip_list::stat<> >
230                 ,co::item_counter< cds::atomicity::item_counter >
231             >::type
232         {};
233         typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_hp_cmp_xorshift_stat;
234         typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_dhp_cmp_xorshift_stat;
235         typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_nogc_cmp_xorshift_stat;
236         typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpi_cmp_xorshift_stat;
237         typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpb_cmp_xorshift_stat;
238         typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpt_cmp_xorshift_stat;
239 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
240         typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_shb_cmp_xorshift_stat;
241         typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_sht_cmp_xorshift_stat;
242 #endif
243
244     };
245
246     template <typename GC, typename K, typename T, typename Traits >
247     static inline void print_stat( cds_test::property_stream& o, SkipListMap< GC, K, T, Traits > const& m )
248     {
249         o << m.statistics();
250     }
251
252 }   // namespace map
253
254 #define CDSSTRESS_SkipListMap_case( fixture, test_case, skiplist_map_type, key_type, value_type ) \
255     TEST_F( fixture, skiplist_map_type ) \
256     { \
257         typedef map::map_type< tag_SkipListMap, key_type, value_type >::skiplist_map_type map_type; \
258         test_case<map_type>(); \
259     }
260
261 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
262
263 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1
264 #   define CDSSTRESS_SkipListMap_SHRCU_2( fixture, test_case, key_type, value_type ) \
265         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_pascal_seqcst, key_type, value_type ) \
266         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_less_pascal_seqcst, key_type, value_type ) \
267
268 #else
269 #   define CDSSTRESS_SkipListMap_SHRCU_2( fixture, test_case, key_type, value_type )
270 #endif
271
272 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1
273 #   define CDSSTRESS_SkipListMap_SHRCU_1( fixture, test_case, key_type, value_type ) \
274         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_less_pascal,        key_type, value_type ) \
275         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_pascal_stat,   key_type, value_type ) \
276         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_pascal,         key_type, value_type ) \
277         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_pascal_stat,    key_type, value_type ) \
278         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_less_xorshift,      key_type, value_type ) \
279         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_xorshift_stat, key_type, value_type ) \
280         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_xorshift,       key_type, value_type ) \
281         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_cmp_xorshift_stat,  key_type, value_type ) \
282
283 #else
284 #   define CDSSTRESS_SkipListMap_SHRCU_1( fixture, test_case, key_type, value_type )
285 #endif
286
287
288 #   define CDSSTRESS_SkipListMap_SHRCU( fixture, test_case, key_type, value_type ) \
289         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_pascal,        key_type, value_type ) \
290         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_less_pascal_stat,   key_type, value_type ) \
291         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_cmp_pascal,         key_type, value_type ) \
292         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_cmp_pascal_stat,    key_type, value_type ) \
293         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_xorshift,      key_type, value_type ) \
294         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_less_xorshift_stat, key_type, value_type ) \
295         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_cmp_xorshift,       key_type, value_type ) \
296         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_xorshift_stat,  key_type, value_type ) \
297         CDSSTRESS_SkipListMap_SHRCU_1( fixture, test_case, key_type, value_type ) \
298         CDSSTRESS_SkipListMap_SHRCU_2( fixture, test_case, key_type, value_type ) \
299
300 #else
301 #   define CDSSTRESS_SkipListMap_SHRCU( fixture, test_case, key_type, value_type )
302 #endif
303
304 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1
305 #   define CDSSTRESS_SkipListMap_2( fixture, test_case, key_type, value_type ) \
306         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_pascal_seqcst,      key_type, value_type ) \
307         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_pascal_seqcst,     key_type, value_type ) \
308         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_pascal_seqcst, key_type, value_type ) \
309         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_pascal_seqcst, key_type, value_type ) \
310         CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_pascal_seqcst, key_type, value_type ) \
311
312 #else
313 #   define CDSSTRESS_SkipListMap_2( fixture, test_case, key_type, value_type )
314 #endif
315
316 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1
317 #   define CDSSTRESS_SkipListMap_1( fixture, test_case, key_type, value_type ) \
318     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_pascal,            key_type, value_type ) \
319     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_pascal,        key_type, value_type ) \
320     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_pascal_stat,        key_type, value_type ) \
321     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_pascal_stat,   key_type, value_type ) \
322     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_pascal_stat,   key_type, value_type ) \
323     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_pascal,              key_type, value_type ) \
324     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_pascal,         key_type, value_type ) \
325     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_pascal,         key_type, value_type ) \
326     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_pascal_stat,        key_type, value_type ) \
327     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_pascal_stat,    key_type, value_type ) \
328     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_xorshift,          key_type, value_type ) \
329     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_xorshift,      key_type, value_type ) \
330     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_xorshift_stat,      key_type, value_type ) \
331     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_xorshift_stat, key_type, value_type ) \
332     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_xorshift_stat, key_type, value_type ) \
333     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_xorshift,            key_type, value_type ) \
334     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_xorshift,       key_type, value_type ) \
335     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_xorshift,       key_type, value_type ) \
336     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_xorshift_stat,      key_type, value_type ) \
337     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_xorshift_stat,  key_type, value_type ) \
338
339 #else
340 #   define CDSSTRESS_SkipListMap_1( fixture, test_case, key_type, value_type )
341 #endif
342
343
344 #define CDSSTRESS_SkipListMap( fixture, test_case, key_type, value_type ) \
345     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_pascal,             key_type, value_type ) \
346     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_pascal,        key_type, value_type ) \
347     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_pascal,        key_type, value_type ) \
348     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_pascal_stat,       key_type, value_type ) \
349     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_pascal_stat,   key_type, value_type ) \
350     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_pascal,             key_type, value_type ) \
351     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_pascal,         key_type, value_type ) \
352     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_pascal_stat,         key_type, value_type ) \
353     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_pascal_stat,    key_type, value_type ) \
354     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_pascal_stat,    key_type, value_type ) \
355     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_xorshift,           key_type, value_type ) \
356     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_xorshift,      key_type, value_type ) \
357     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_xorshift,      key_type, value_type ) \
358     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_xorshift_stat,     key_type, value_type ) \
359     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_xorshift_stat, key_type, value_type ) \
360     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_xorshift,           key_type, value_type ) \
361     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_xorshift,       key_type, value_type ) \
362     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_xorshift_stat,       key_type, value_type ) \
363     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_xorshift_stat,  key_type, value_type ) \
364     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_xorshift_stat,  key_type, value_type ) \
365     CDSSTRESS_SkipListMap_1( fixture, test_case, key_type, value_type ) \
366     CDSSTRESS_SkipListMap_2( fixture, test_case, key_type, value_type ) \
367     CDSSTRESS_SkipListMap_SHRCU( fixture, test_case, key_type, value_type )
368
369 #define CDSSTRESS_SkipListMap_nogc( fixture, test_case, key_type, value_type ) \
370     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_pascal,           key_type, value_type ) \
371     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_pascal_seqcst,    key_type, value_type ) \
372     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_pascal_stat,      key_type, value_type ) \
373     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_pascal,            key_type, value_type ) \
374     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_pascal_stat,       key_type, value_type ) \
375     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_xorshift,         key_type, value_type ) \
376     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_xorshift_stat,    key_type, value_type ) \
377     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_xorshift,          key_type, value_type ) \
378     CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_xorshift_stat,     key_type, value_type ) \
379
380
381 #endif // ifndef CDSUNIT_MAP_TYPE_SKIP_LIST_H