Commit 6c07daa1 by lucapegolotti

Merge branch 'embb530_linearizability_tester' of https://github.com/siemens/embb…

Merge branch 'embb530_linearizability_tester' of https://github.com/siemens/embb into embb530_linearizability_tester
parents 18f7b491 6f4ef902
...@@ -4,14 +4,16 @@ project (EMBB_linearizability_test C CXX) ...@@ -4,14 +4,16 @@ project (EMBB_linearizability_test C CXX)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
#linux build #linux build
IF (CMAKE_COMPILER_IS_GNUCXXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lrt") IF (NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lrt")
set(PROJECT_LINK_LIBS set(PROJECT_LINK_LIBS
${CMAKE_CURRENT_SOURCE_DIR}/../build/base_cpp/libembb_base_cpp.a ${CMAKE_CURRENT_SOURCE_DIR}/../build/base_cpp/libembb_base_cpp.a
${CMAKE_CURRENT_SOURCE_DIR}/../build/base_c/libembb_base_c.a ${CMAKE_CURRENT_SOURCE_DIR}/../build/base_c/libembb_base_c.a
${CMAKE_CURRENT_SOURCE_DIR}/../build/containers_cpp/libembb_containers_cpp.a ${CMAKE_CURRENT_SOURCE_DIR}/../build/containers_cpp/libembb_containers_cpp.a
) )
ENDIF (CMAKE_COMPILER_IS_GNUCXXX) ENDIF (NOT WIN32)
# windows build # windows build
IF (WIN32) IF (WIN32)
......
File mode changed from 100644 to 100755
...@@ -1885,33 +1885,6 @@ static void test_slice_001() ...@@ -1885,33 +1885,6 @@ static void test_slice_001()
assert(tester_1.check()); assert(tester_1.check());
} }
static void debug()
{
constexpr char x = '\1';
Log<state::Set> log{ 2U };
EntryPtr<state::Set> contains_call_entry_ptr, contains_ret_entry_ptr;
contains_call_entry_ptr = log.add_call(state::Set::make_contains_call(x));
contains_ret_entry_ptr = log.add_ret(contains_call_entry_ptr, state::Set::make_ret(true));
LinearizabilityTester<state::Set> t{ log.info() };
Result<state::Set> result;
t.check(result);
assert(!result.is_linearizable());
std::stringstream os;
result.debug(os);
assert(os.str() == "Linearizable: No\n"
"entry id: 0, thread id: 0, call: contains(1)\n"
"^ previous entries cannot be linearized\n"
"entry id: 0, thread id: 0, return: ret: 1\n"
"^ previous entries cannot be linearized\n");
}
static void concurrent_log() static void concurrent_log()
{ {
constexpr unsigned number_of_partitions = 1U; constexpr unsigned number_of_partitions = 1U;
...@@ -2097,11 +2070,8 @@ void run_tests(){ ...@@ -2097,11 +2070,8 @@ void run_tests(){
test_slice_000(); test_slice_000();
test_slice_001(); test_slice_001();
#ifdef _LT_DEBUG_
debug();
#endif
concurrent_log(); concurrent_log();
fuzzy_functional_test(); fuzzy_functional_test();
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment