-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split several sync utility tests to improve parallelization. Windows:
* Spin and Shm based utilities will be tested independently. * Includes some refactoring to avoid copy-pasting some code in several similar synchronization primitive tests.
- Loading branch information
1 parent
b01a6bc
commit 48e201a
Showing
31 changed files
with
788 additions
and
355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
################################################################################ | ||
# This .gitignore file was automatically created by Microsoft(R) Visual Studio. | ||
################################################################################ | ||
|
||
/test/test_intermod_holder.cpp.wrk | ||
/test/test_intermod_holder.hpp.wrk | ||
/test/intermod_holder_dll.hpp | ||
/test/test_intermod_holder_main.cpp.wrk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// (C) Copyright Ion Gaztanaga 2024-2024. Distributed under the Boost | ||
// Software License, Version 1.0. (See accompanying file | ||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
// | ||
// See http://www.boost.org/libs/interprocess for documentation. | ||
// | ||
////////////////////////////////////////////////////////////////////////////// | ||
|
||
#ifndef BOOST_INTERPROCESS_TEST_NAMED_MUTEX_HELPERS_HEADER | ||
#define BOOST_INTERPROCESS_TEST_NAMED_MUTEX_HELPERS_HEADER | ||
|
||
#include <boost/interprocess/detail/config_begin.hpp> | ||
#include <boost/interprocess/detail/workaround.hpp> | ||
|
||
#include "mutex_test_template.hpp" | ||
#include "named_creation_template.hpp" | ||
#include "get_process_id_name.hpp" | ||
#include <exception> | ||
|
||
namespace boost { namespace interprocess { namespace test { | ||
|
||
template<class NamedMutex> | ||
int test_named_mutex() | ||
{ | ||
int ret = 0; | ||
BOOST_TRY{ | ||
NamedMutex::remove(test::get_process_id_name()); | ||
test::test_named_creation< test::named_sync_creation_test_wrapper<NamedMutex> >(); | ||
#if defined(BOOST_INTERPROCESS_WCHAR_NAMED_RESOURCES) | ||
test::test_named_creation< test::named_sync_creation_test_wrapper_w<NamedMutex> >(); | ||
#endif //defined(BOOST_INTERPROCESS_WCHAR_NAMED_RESOURCES) | ||
test::test_all_lock< test::named_sync_wrapper<NamedMutex> >(); | ||
test::test_all_mutex<test::named_sync_wrapper<NamedMutex> >(); | ||
} | ||
BOOST_CATCH(std::exception& ex) { | ||
std::cout << ex.what() << std::endl; | ||
ret = 1; | ||
} BOOST_CATCH_END | ||
NamedMutex::remove(test::get_process_id_name()); | ||
return ret; | ||
} | ||
|
||
template<class NamedRecursiveMutex> | ||
int test_named_recursive_mutex() | ||
{ | ||
int ret = 0; | ||
BOOST_TRY{ | ||
NamedRecursiveMutex::remove(test::get_process_id_name()); | ||
test::test_named_creation< test::named_sync_creation_test_wrapper<NamedRecursiveMutex> >(); | ||
#if defined(BOOST_INTERPROCESS_WCHAR_NAMED_RESOURCES) | ||
test::test_named_creation< test::named_sync_creation_test_wrapper_w<NamedRecursiveMutex> >(); | ||
#endif //defined(BOOST_INTERPROCESS_WCHAR_NAMED_RESOURCES) | ||
test::test_all_lock< test::named_sync_wrapper<NamedRecursiveMutex> >(); | ||
test::test_all_mutex<test::named_sync_wrapper<NamedRecursiveMutex> >(); | ||
test::test_all_recursive_lock<test::named_sync_wrapper<NamedRecursiveMutex> >(); | ||
} | ||
BOOST_CATCH(std::exception& ex) { | ||
std::cout << ex.what() << std::endl; | ||
ret = 1; | ||
} BOOST_CATCH_END | ||
NamedRecursiveMutex::remove(test::get_process_id_name()); | ||
return ret; | ||
} | ||
|
||
|
||
|
||
}}} //namespace boost { namespace interprocess { namespace test { | ||
|
||
#include <boost/interprocess/detail/config_end.hpp> | ||
|
||
#endif //BOOST_INTERPROCESS_TEST_NAMED_MUTEX_HELPERS_HEADER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.