Moved RCU-based list tests to gtest framework
authorkhizmax <libcds.dev@gmail.com>
Sun, 14 Feb 2016 20:11:12 +0000 (23:11 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sun, 14 Feb 2016 20:11:12 +0000 (23:11 +0300)
16 files changed:
projects/Win/vc14/gtest-list.vcxproj
projects/Win/vc14/gtest-list.vcxproj.filters
test/unit/list/CMakeLists.txt
test/unit/list/lazy_rcu_gpb.cpp [new file with mode: 0644]
test/unit/list/lazy_rcu_gpi.cpp [new file with mode: 0644]
test/unit/list/lazy_rcu_gpt.cpp [new file with mode: 0644]
test/unit/list/lazy_rcu_shb.cpp [new file with mode: 0644]
test/unit/list/lazy_rcu_sht.cpp [new file with mode: 0644]
test/unit/list/michael_rcu_gpb.cpp [new file with mode: 0644]
test/unit/list/michael_rcu_gpi.cpp [new file with mode: 0644]
test/unit/list/michael_rcu_gpt.cpp [new file with mode: 0644]
test/unit/list/michael_rcu_shb.cpp [new file with mode: 0644]
test/unit/list/michael_rcu_sht.cpp [new file with mode: 0644]
test/unit/list/test_lazy_rcu.h [new file with mode: 0644]
test/unit/list/test_list_rcu.h [new file with mode: 0644]
test/unit/list/test_michael_rcu.h [new file with mode: 0644]

index 4cabb61174d3f5ef9878e9cc6d285b0774ac4362..4ab86dde2a0bc26196da9bd14c1ae0ad2de6cd30 100644 (file)
     <ClInclude Include="..\..\..\test\unit\list\test_intrusive_list_nogc.h" />\r
     <ClInclude Include="..\..\..\test\unit\list\test_intrusive_list_rcu.h" />\r
     <ClInclude Include="..\..\..\test\unit\list\test_intrusive_michael_rcu.h" />\r
+    <ClInclude Include="..\..\..\test\unit\list\test_lazy_rcu.h" />\r
     <ClInclude Include="..\..\..\test\unit\list\test_list.h" />\r
     <ClInclude Include="..\..\..\test\unit\list\test_list_hp.h" />\r
     <ClInclude Include="..\..\..\test\unit\list\test_list_nogc.h" />\r
+    <ClInclude Include="..\..\..\test\unit\list\test_list_rcu.h" />\r
+    <ClInclude Include="..\..\..\test\unit\list\test_michael_rcu.h" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="..\..\..\test\unit\list\intrusive_lazy_dhp.cpp" />\r
     <ClCompile Include="..\..\..\test\unit\list\lazy_dhp.cpp" />\r
     <ClCompile Include="..\..\..\test\unit\list\lazy_hp.cpp" />\r
     <ClCompile Include="..\..\..\test\unit\list\lazy_nogc.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\list\lazy_rcu_gpb.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\list\lazy_rcu_gpi.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\list\lazy_rcu_gpt.cpp">\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4503</DisableSpecificWarnings>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\lazy_rcu_shb.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\list\lazy_rcu_sht.cpp" />\r
     <ClCompile Include="..\..\..\test\unit\list\michael_dhp.cpp" />\r
     <ClCompile Include="..\..\..\test\unit\list\michael_hp.cpp" />\r
     <ClCompile Include="..\..\..\test\unit\list\michael_nogc.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\list\michael_rcu_gpb.cpp">\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4503</DisableSpecificWarnings>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\michael_rcu_gpi.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\list\michael_rcu_gpt.cpp">\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">4503</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4503</DisableSpecificWarnings>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\michael_rcu_shb.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\list\michael_rcu_sht.cpp" />\r
     <ClCompile Include="..\..\..\test\unit\main.cpp" />\r
   </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
index 8396e4543e98c422235f6de97f93bbdbc76f4fc7..16c832760720a853d70e96d0c1956f800948bfd5 100644 (file)
     <ClInclude Include="..\..\..\test\unit\list\test_list_nogc.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\test\unit\list\test_list_rcu.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\test\unit\list\test_michael_rcu.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\test\unit\list\test_lazy_rcu.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="..\..\..\test\unit\list\intrusive_michael_hp.cpp">\r
     <ClCompile Include="..\..\..\test\unit\list\lazy_nogc.cpp">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\michael_rcu_gpb.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\michael_rcu_gpi.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\michael_rcu_gpt.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\michael_rcu_shb.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\michael_rcu_sht.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\lazy_rcu_gpb.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\lazy_rcu_gpi.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\lazy_rcu_gpt.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\lazy_rcu_shb.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\list\lazy_rcu_sht.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 2014cf464295bdc0224eac9db224ebc0f2c1e86d..dbe84711be2d1a1c1a9ccc9f0081947c5bcb2e6a 100644 (file)
@@ -21,9 +21,19 @@ set(CDSGTEST_LIST_SOURCES
     lazy_hp.cpp
     lazy_dhp.cpp
     lazy_nogc.cpp
+    lazy_rcu_gpb.cpp
+    lazy_rcu_gpi.cpp
+    lazy_rcu_gpt.cpp
+    lazy_rcu_shb.cpp
+    lazy_rcu_sht.cpp
     michael_hp.cpp
     michael_dhp.cpp
     michael_nogc.cpp
+    michael_rcu_gpb.cpp
+    michael_rcu_gpi.cpp
+    michael_rcu_gpt.cpp
+    michael_rcu_shb.cpp
+    michael_rcu_sht.cpp
 )
 
 include_directories(
diff --git a/test/unit/list/lazy_rcu_gpb.cpp b/test/unit/list/lazy_rcu_gpb.cpp
new file mode 100644 (file)
index 0000000..adc4c4e
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <cds/urcu/general_buffered.h>
+
+#include "test_lazy_rcu.h"
+
+namespace {
+
+    typedef cds::urcu::general_buffered<> rcu_implementation;
+
+} // namespace
+
+INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPB, LazyList, rcu_implementation );
diff --git a/test/unit/list/lazy_rcu_gpi.cpp b/test/unit/list/lazy_rcu_gpi.cpp
new file mode 100644 (file)
index 0000000..8514ff1
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <cds/urcu/general_instant.h>
+
+#include "test_lazy_rcu.h"
+
+namespace {
+
+    typedef cds::urcu::general_instant<> rcu_implementation;
+
+} // namespace
+
+INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPI, LazyList, rcu_implementation );
diff --git a/test/unit/list/lazy_rcu_gpt.cpp b/test/unit/list/lazy_rcu_gpt.cpp
new file mode 100644 (file)
index 0000000..6748d6c
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <cds/urcu/general_threaded.h>
+
+#include "test_lazy_rcu.h"
+
+namespace {
+
+    typedef cds::urcu::general_threaded<> rcu_implementation;
+
+} // namespace
+
+INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPT, LazyList, rcu_implementation );
diff --git a/test/unit/list/lazy_rcu_shb.cpp b/test/unit/list/lazy_rcu_shb.cpp
new file mode 100644 (file)
index 0000000..dd9da15
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <cds/urcu/signal_buffered.h>
+
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+
+#include "test_lazy_rcu.h"
+
+namespace {
+
+    typedef cds::urcu::signal_buffered<> rcu_implementation;
+
+} // namespace
+
+INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHB, LazyList, rcu_implementation );
+
+#endif
diff --git a/test/unit/list/lazy_rcu_sht.cpp b/test/unit/list/lazy_rcu_sht.cpp
new file mode 100644 (file)
index 0000000..aae8016
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <cds/urcu/signal_threaded.h>
+
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+#include "test_lazy_rcu.h"
+
+namespace {
+
+    typedef cds::urcu::signal_threaded<> rcu_implementation;
+
+} // namespace
+
+INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHT, LazyList, rcu_implementation );
+
+#endif
diff --git a/test/unit/list/michael_rcu_gpb.cpp b/test/unit/list/michael_rcu_gpb.cpp
new file mode 100644 (file)
index 0000000..23b5389
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <cds/urcu/general_buffered.h>
+
+#include "test_michael_rcu.h"
+
+namespace {
+
+    typedef cds::urcu::general_buffered<> rcu_implementation;
+
+} // namespace
+
+INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPB, MichaelList, rcu_implementation );
diff --git a/test/unit/list/michael_rcu_gpi.cpp b/test/unit/list/michael_rcu_gpi.cpp
new file mode 100644 (file)
index 0000000..c045ec2
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <cds/urcu/general_instant.h>
+
+#include "test_michael_rcu.h"
+
+namespace {
+
+    typedef cds::urcu::general_instant<> rcu_implementation;
+
+} // namespace
+
+INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPI, MichaelList, rcu_implementation );
diff --git a/test/unit/list/michael_rcu_gpt.cpp b/test/unit/list/michael_rcu_gpt.cpp
new file mode 100644 (file)
index 0000000..c64db00
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <cds/urcu/general_threaded.h>
+
+#include "test_michael_rcu.h"
+
+namespace {
+
+    typedef cds::urcu::general_threaded<> rcu_implementation;
+
+} // namespace
+
+INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPT, MichaelList, rcu_implementation );
diff --git a/test/unit/list/michael_rcu_shb.cpp b/test/unit/list/michael_rcu_shb.cpp
new file mode 100644 (file)
index 0000000..820b8a3
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <cds/urcu/signal_buffered.h>
+
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+
+#include "test_michael_rcu.h"
+
+namespace {
+
+    typedef cds::urcu::signal_buffered<> rcu_implementation;
+
+} // namespace
+
+INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHB, MichaelList, rcu_implementation );
+
+#endif
diff --git a/test/unit/list/michael_rcu_sht.cpp b/test/unit/list/michael_rcu_sht.cpp
new file mode 100644 (file)
index 0000000..d80ee86
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <cds/urcu/signal_threaded.h>
+
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+#include "test_michael_rcu.h"
+
+namespace {
+
+    typedef cds::urcu::signal_threaded<> rcu_implementation;
+
+} // namespace
+
+INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHT, MichaelList, rcu_implementation );
+
+#endif
diff --git a/test/unit/list/test_lazy_rcu.h b/test/unit/list/test_lazy_rcu.h
new file mode 100644 (file)
index 0000000..f506d7b
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+    
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+      list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     
+*/
+
+#ifndef CDSUNIT_LIST_TEST_LAZY_LIST_RCU_H
+#define CDSUNIT_LIST_TEST_LAZY_LIST_RCU_H
+
+#include "test_list_rcu.h"
+#include <cds/container/lazy_list_rcu.h>
+
+namespace cc = cds::container;
+
+template <class RCU>
+class LazyList : public cds_test::list_rcu
+{
+    typedef cds_test::list_rcu base_class;
+public:
+    typedef cds::urcu::gc<RCU> rcu_type;
+
+protected:
+    void SetUp()
+    {
+        RCU::Construct();
+        cds::threading::Manager::attachThread();
+    }
+
+    void TearDown()
+    {
+        cds::threading::Manager::detachThread();
+        RCU::Destruct();
+    }
+};
+
+TYPED_TEST_CASE_P( LazyList );
+
+TYPED_TEST_P( LazyList, less_ordered )
+{
+    typedef cc::LazyList< typename TestFixture::rcu_type, typename TestFixture::item,
+        typename cc::lazy_list::make_traits<
+            cds::opt::less< typename TestFixture::template lt< typename TestFixture::item>>
+        >::type
+    > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+TYPED_TEST_P( LazyList, compare_ordered )
+{
+    typedef cc::LazyList< typename TestFixture::rcu_type, typename TestFixture::item,
+        typename cc::lazy_list::make_traits<
+            cds::opt::compare< typename TestFixture::template cmp< typename TestFixture::item>>
+        >::type
+    > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+TYPED_TEST_P( LazyList, mix_ordered )
+{
+    typedef cc::LazyList< typename TestFixture::rcu_type, typename TestFixture::item,
+        typename cc::lazy_list::make_traits<
+            cds::opt::less< typename TestFixture::template lt< typename TestFixture::item>>
+            ,cds::opt::compare< typename TestFixture::template cmp< typename TestFixture::item>>
+        >::type
+    > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+TYPED_TEST_P( LazyList, item_counting )
+{
+    struct traits : public cc::lazy_list::traits
+    {
+        typedef typename TestFixture::template lt< typename TestFixture::item> less;
+        typedef cds::atomicity::item_counter item_counter;
+    };
+    typedef cc::LazyList<typename TestFixture::rcu_type, typename TestFixture::item, traits > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+TYPED_TEST_P( LazyList, backoff )
+{
+    struct traits : public cc::lazy_list::traits
+    {
+        typedef typename TestFixture::template lt< typename TestFixture::item> less;
+        typedef cds::atomicity::item_counter item_counter;
+        typedef cds::backoff::empty back_off;
+    };
+    typedef cc::LazyList<typename TestFixture::rcu_type, typename TestFixture::item, traits > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+TYPED_TEST_P( LazyList, seq_cst )
+{
+    struct traits : public cc::lazy_list::traits
+    {
+        typedef typename TestFixture::template lt< typename TestFixture::item> less;
+        typedef cds::atomicity::item_counter item_counter;
+        typedef cds::opt::v::sequential_consistent memory_model;
+    };
+    typedef cc::LazyList<typename TestFixture::rcu_type, typename TestFixture::item, traits > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+TYPED_TEST_P( LazyList, mutex )
+{
+    struct traits : public cc::lazy_list::traits
+    {
+        typedef typename TestFixture::template lt< typename TestFixture::item> less;
+        typedef cds::atomicity::item_counter item_counter;
+        typedef std::mutex lock_type;
+    };
+    typedef cc::LazyList<typename TestFixture::rcu_type, typename TestFixture::item, traits > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+// GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as
+// "No test named <test_name> can be found in this test case"
+REGISTER_TYPED_TEST_CASE_P( LazyList,
+    less_ordered, compare_ordered, mix_ordered, item_counting, backoff, seq_cst, mutex
+    );
+
+#endif // CDSUNIT_LIST_TEST_LAZY_LIST_RCU_H
diff --git a/test/unit/list/test_list_rcu.h b/test/unit/list/test_list_rcu.h
new file mode 100644 (file)
index 0000000..cf4b2cb
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef CDSUNIT_LIST_TEST_LIST_RCU_H
+#define CDSUNIT_LIST_TEST_LIST_RCU_H
+
+#include "test_list.h"
+
+namespace cds_test {
+
+    class list_rcu : public list_common
+    {
+    protected:
+        template <typename List>
+        void test_rcu( List& l )
+        {
+            // Precondition: list is empty
+            // Postcondition: list is empty
+
+            static const size_t nSize = 20;
+            typedef typename List::value_type value_type;
+            value_type arr[nSize];
+
+            for ( size_t i = 0; i < nSize; ++i ) {
+                arr[i].nKey = static_cast<int>(i);
+                arr[i].nVal = arr[i].nKey * 10;
+            }
+            shuffle( arr, arr + nSize );
+
+            ASSERT_TRUE( l.empty() );
+            ASSERT_CONTAINER_SIZE( l, 0 );
+
+            typedef typename List::exempt_ptr exempt_ptr;
+            typedef typename List::raw_ptr    raw_ptr;
+            typedef typename List::rcu_lock   rcu_lock;
+
+            // get() test
+            for ( auto const& i : arr ) {
+                {
+                    rcu_lock lock;
+                    raw_ptr rp = l.get( i.nKey );
+                    EXPECT_TRUE( !rp );
+                    rp = l.get_with( other_item( i.nKey ), other_less() );
+                    EXPECT_TRUE( !rp );
+                }
+
+                EXPECT_TRUE( l.insert( i ) );
+
+                {
+                    rcu_lock lock;
+                    raw_ptr rp = l.get( i.nKey );
+                    ASSERT_FALSE( !rp );
+                    EXPECT_EQ( rp->nKey, i.nKey );
+                    EXPECT_EQ( rp->nVal, i.nVal );
+                }
+                {
+                    rcu_lock lock;
+                    raw_ptr rp = l.get( i );
+                    ASSERT_FALSE( !rp );
+                    EXPECT_EQ( rp->nKey, i.nKey );
+                    EXPECT_EQ( rp->nVal, i.nVal );
+                }
+                {
+                    rcu_lock lock;
+                    raw_ptr rp = l.get_with( other_item( i.nKey ), other_less());
+                    ASSERT_FALSE( !rp );
+                    EXPECT_EQ( rp->nKey, i.nKey );
+                    EXPECT_EQ( rp->nVal, i.nVal );
+                }
+            }
+
+            ASSERT_FALSE( l.empty() );
+            ASSERT_CONTAINER_SIZE( l, nSize );
+
+            // extract()
+
+            exempt_ptr gp;
+            if ( List::c_bExtractLockExternal ) {
+                for ( auto const& i : arr ) {
+                    {
+                        rcu_lock lock;
+                        if ( i.nKey & 1 )
+                            gp = l.extract( i.nKey );
+                        else
+                            gp = l.extract_with( other_item( i.nKey ), other_less());
+
+                        ASSERT_FALSE( !gp );
+                        EXPECT_EQ( gp->nKey, i.nKey );
+                    }
+                    gp.release();
+                    {
+                        rcu_lock lock;
+                        gp = l.extract( i );
+                        EXPECT_TRUE( !gp );
+                        gp = l.extract_with( other_item( i.nKey ), other_less());
+                        EXPECT_TRUE( !gp );
+                    }
+                }
+            }
+            else {
+                for ( auto const& i : arr ) {
+                    if ( i.nKey & 1 )
+                        gp = l.extract( i.nKey );
+                    else
+                        gp = l.extract_with( other_item( i.nKey ), other_less());
+
+                    ASSERT_FALSE( !gp );
+                    EXPECT_EQ( gp->nKey, i.nKey );
+
+                    gp = l.extract( i );
+                    EXPECT_TRUE( !gp );
+                    gp = l.extract_with( other_item( i.nKey ), other_less());
+                    EXPECT_TRUE( !gp );
+                }
+            }
+
+            ASSERT_TRUE( l.empty() );
+            ASSERT_CONTAINER_SIZE( l, 0 );
+        }
+    };
+} // namespace cds_test
+
+#endif // CDSUNIT_LIST_TEST_LIST_RCU_H
diff --git a/test/unit/list/test_michael_rcu.h b/test/unit/list/test_michael_rcu.h
new file mode 100644 (file)
index 0000000..143afc4
--- /dev/null
@@ -0,0 +1,157 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+    
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+      list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     
+*/
+#ifndef CDSUNIT_LIST_TEST_MICHAEL_LIST_RCU_H
+#define CDSUNIT_LIST_TEST_MICHAEL_LIST_RCU_H
+
+#include "test_list_rcu.h"
+#include <cds/container/michael_list_rcu.h>
+
+namespace cc = cds::container;
+
+template <class RCU>
+class MichaelList : public cds_test::list_rcu
+{
+    typedef cds_test::list_rcu base_class;
+public:
+    typedef cds::urcu::gc<RCU> rcu_type;
+
+protected:
+    void SetUp()
+    {
+        RCU::Construct();
+        cds::threading::Manager::attachThread();
+    }
+
+    void TearDown()
+    {
+        cds::threading::Manager::detachThread();
+        RCU::Destruct();
+    }
+};
+
+TYPED_TEST_CASE_P( MichaelList );
+
+TYPED_TEST_P( MichaelList, less_ordered )
+{
+    typedef cc::MichaelList< typename TestFixture::rcu_type, typename TestFixture::item,
+        typename cc::michael_list::make_traits<
+            cds::opt::less< typename TestFixture::template lt< typename TestFixture::item>>
+        >::type
+    > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+TYPED_TEST_P( MichaelList, compare_ordered )
+{
+    typedef cc::MichaelList< typename TestFixture::rcu_type, typename TestFixture::item,
+        typename cc::michael_list::make_traits<
+            cds::opt::compare< typename TestFixture::template cmp<typename TestFixture::item>>
+        >::type
+    > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+TYPED_TEST_P( MichaelList, mix_ordered )
+{
+    typedef cc::MichaelList< typename TestFixture::rcu_type, typename TestFixture::item,
+        typename cc::michael_list::make_traits<
+            cds::opt::compare< typename TestFixture::template cmp<typename TestFixture::item>>
+            ,cds::opt::less< typename TestFixture::template lt< typename TestFixture::item>>
+        >::type
+    > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+TYPED_TEST_P( MichaelList, item_counting )
+{
+    struct traits : public cc::michael_list::traits
+    {
+        typedef typename TestFixture::template lt< typename TestFixture::item> less;
+        typedef cds::atomicity::item_counter item_counter;
+    };
+    typedef cc::MichaelList<typename TestFixture::rcu_type, typename TestFixture::item, traits > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+TYPED_TEST_P( MichaelList, backoff )
+{
+    struct traits : public cc::michael_list::traits
+    {
+        typedef typename TestFixture::template lt< typename TestFixture::item> less;
+        typedef cds::atomicity::item_counter item_counter;
+        typedef cds::backoff::empty back_off;
+    };
+    typedef cc::MichaelList<typename TestFixture::rcu_type, typename TestFixture::item, traits > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+TYPED_TEST_P( MichaelList, seq_cst )
+{
+    struct traits : public cc::michael_list::traits
+    {
+        typedef typename TestFixture::template lt< typename TestFixture::item> less;
+        typedef cds::atomicity::item_counter item_counter;
+        typedef cds::opt::v::sequential_consistent memory_model;
+    };
+    typedef cc::MichaelList<typename TestFixture::rcu_type, typename TestFixture::item, traits > list_type;
+
+    list_type l;
+    this->test_common( l );
+    this->test_ordered_iterator( l );
+    this->test_rcu( l );
+}
+
+// GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as
+// "No test named <test_name> can be found in this test case"
+REGISTER_TYPED_TEST_CASE_P( MichaelList,
+    less_ordered, compare_ordered, mix_ordered, item_counting, backoff, seq_cst
+    );
+
+#endif // CDSUNIT_LIST_TEST_MICHAEL_LIST_RCU_H