From 5f433cca782b8cc3498ffe4c85c6612c16d48bf6 Mon Sep 17 00:00:00 2001 From: Rex Schilasky <49162693+rex-schilasky@users.noreply.github.com> Date: Wed, 25 Oct 2023 17:03:32 +0200 Subject: [PATCH 1/2] additional logging added for shm memfile creation/handling (#1225) return values of ShmSetBufferCount evaluated in CSyncMemoryFile::Create function to state failed creation --- ecal/core/src/io/ecal_memfile.cpp | 4 +-- ecal/core/src/io/ecal_memfile_sync.cpp | 4 +-- ecal/core/src/io/ecal_memfile_sync.h | 1 + ecal/core/src/io/linux/ecal_memfile_os.cpp | 13 +++++-- ecal/core/src/readwrite/ecal_writer.cpp | 40 ++++++++++++++++----- ecal/core/src/readwrite/ecal_writer_shm.cpp | 17 ++++++--- 6 files changed, 59 insertions(+), 20 deletions(-) diff --git a/ecal/core/src/io/ecal_memfile.cpp b/ecal/core/src/io/ecal_memfile.cpp index 5d1b84dfdf..6c671845b5 100644 --- a/ecal/core/src/io/ecal_memfile.cpp +++ b/ecal/core/src/io/ecal_memfile.cpp @@ -87,7 +87,7 @@ namespace eCAL if (!memfile::db::AddFile(name_, create_, create_ ? len_ + m_header.int_hdr_size : SIZEOF_PARTIAL_STRUCT(SInternalHeader, int_hdr_size), m_memfile_info)) { #ifndef NDEBUG - printf("Could not create memory file: %s.\n\n", name_); + printf("Could not create memory file: %s.\n", name_); #endif return(false); } @@ -98,7 +98,7 @@ namespace eCAL if(!m_memfile_mutex.Create(name_, m_auto_sanitizing)) { #ifndef NDEBUG - printf("Could not create memory file mutex: %s.\n\n", name_); + printf("Could not create memory file mutex: %s.\n", name_); #endif return(false); } diff --git a/ecal/core/src/io/ecal_memfile_sync.cpp b/ecal/core/src/io/ecal_memfile_sync.cpp index ee22d8a363..ce071df73d 100644 --- a/ecal/core/src/io/ecal_memfile_sync.cpp +++ b/ecal/core/src/io/ecal_memfile_sync.cpp @@ -251,12 +251,12 @@ namespace eCAL // create the memory file if (!m_memfile.Create(m_memfile_name.c_str(), true, memfile_size)) { - Logging::Log(log_level_error, std::string(m_base_name + "::CSyncMemoryFile::Create - FAILED : ") + m_memfile_name); + Logging::Log(log_level_error, std::string("CSyncMemoryFile::Create FAILED : ") + m_memfile_name); return false; } #ifndef NDEBUG - Logging::Log(log_level_debug2, std::string(m_base_name + "::CSyncMemoryFile::Create - SUCCESS : ") + m_memfile_name); + Logging::Log(log_level_debug2, std::string("CSyncMemoryFile::Create SUCCESS : ") + m_memfile_name); #endif // initialize memory file with empty header diff --git a/ecal/core/src/io/ecal_memfile_sync.h b/ecal/core/src/io/ecal_memfile_sync.h index daefd5add5..a6756116d0 100644 --- a/ecal/core/src/io/ecal_memfile_sync.h +++ b/ecal/core/src/io/ecal_memfile_sync.h @@ -57,6 +57,7 @@ namespace eCAL std::string GetName() const; size_t GetSize() const; + bool IsCreated() const { return m_created; }; protected: bool Create(const std::string& base_name_, size_t size_); diff --git a/ecal/core/src/io/linux/ecal_memfile_os.cpp b/ecal/core/src/io/linux/ecal_memfile_os.cpp index 8857bce875..5d2fb89132 100644 --- a/ecal/core/src/io/linux/ecal_memfile_os.cpp +++ b/ecal/core/src/io/linux/ecal_memfile_os.cpp @@ -60,7 +60,14 @@ namespace eCAL umask(previous_umask); // reset umask to previous permissions if (mem_file_info_.memfile == -1) { - std::cout << "shm_open failed : " << mem_file_info_.name << " errno: " << strerror(errno) << std::endl; + if(create_) + { + std::cerr << "shm_open failed to CREATE memory file (memfile::os::AllocFile): " << mem_file_info_.name << " errno: " << strerror(errno) << std::endl; + } + else + { + std::cerr << "shm_open failed to OPEN memory file (memfile::os::AllocFile): " << mem_file_info_.name << " errno: " << strerror(errno) << std::endl; + } mem_file_info_.memfile = 0; mem_file_info_.name = ""; mem_file_info_.exists = false; @@ -101,7 +108,7 @@ namespace eCAL // truncate file if (::ftruncate(mem_file_info_.memfile, mem_file_info_.size) != 0) { - std::cout << "ftruncate failed : " << mem_file_info_.name << " errno: " << strerror(errno) << std::endl; + std::cerr << "ftruncate failed (memfile::os::MapFile): " << mem_file_info_.name << " errno: " << strerror(errno) << std::endl; } } @@ -113,7 +120,7 @@ namespace eCAL if (mem_file_info_.mem_address == MAP_FAILED) { mem_file_info_.mem_address = nullptr; - std::cout << "mmap failed : " << mem_file_info_.name << " errno: " << strerror(errno) << std::endl; + std::cerr << "mmap failed (memfile::os::MapFile): " << mem_file_info_.name << " errno: " << strerror(errno) << std::endl; return(false); } } diff --git a/ecal/core/src/readwrite/ecal_writer.cpp b/ecal/core/src/readwrite/ecal_writer.cpp index 5a18c3d08d..aa289ffcdb 100644 --- a/ecal/core/src/readwrite/ecal_writer.cpp +++ b/ecal/core/src/readwrite/ecal_writer.cpp @@ -1057,10 +1057,16 @@ namespace eCAL { case TLayer::eSendMode::smode_auto: case TLayer::eSendMode::smode_on: - m_writer.udp_mc.Create(m_host_name, m_topic_name, m_topic_id); + if (m_writer.udp_mc.Create(m_host_name, m_topic_name, m_topic_id)) + { #ifndef NDEBUG - Logging::Log(log_level_debug4, m_topic_name + "::CDataWriter::Create::UDP_MC_WRITER"); + Logging::Log(log_level_debug4, m_topic_name + "::CDataWriter::Create::UDP_MC_WRITER - SUCCESS"); #endif + } + else + { + Logging::Log(log_level_error, m_topic_name + "::CDataWriter::Create::UDP_MC_WRITER - FAILED"); + } break; case TLayer::eSendMode::smode_none: case TLayer::eSendMode::smode_off: @@ -1081,10 +1087,16 @@ namespace eCAL { case TLayer::eSendMode::smode_auto: case TLayer::eSendMode::smode_on: - m_writer.shm.Create(m_host_name, m_topic_name, m_topic_id); + if (m_writer.shm.Create(m_host_name, m_topic_name, m_topic_id)) + { #ifndef NDEBUG - Logging::Log(log_level_debug4, m_topic_name + "::CDataWriter::Create::SHM_WRITER"); + Logging::Log(log_level_debug4, m_topic_name + "::CDataWriter::Create::SHM_WRITER - SUCCESS"); #endif + } + else + { + Logging::Log(log_level_error, m_topic_name + "::CDataWriter::Create::SHM_WRITER - FAILED"); + } break; case TLayer::eSendMode::smode_none: case TLayer::eSendMode::smode_off: @@ -1105,10 +1117,16 @@ namespace eCAL { case TLayer::eSendMode::smode_auto: case TLayer::eSendMode::smode_on: - m_writer.tcp.Create(m_host_name, m_topic_name, m_topic_id); + if (m_writer.tcp.Create(m_host_name, m_topic_name, m_topic_id)) + { #ifndef NDEBUG - Logging::Log(log_level_debug4, m_topic_name + "::CDataWriter::Create::TCP_WRITER"); + Logging::Log(log_level_debug4, m_topic_name + "::CDataWriter::Create::TCP_WRITER - SUCCESS"); #endif + } + else + { + Logging::Log(log_level_error, m_topic_name + "::CDataWriter::Create::TCP_WRITER - FAILED"); + } break; case TLayer::eSendMode::smode_none: case TLayer::eSendMode::smode_off: @@ -1129,10 +1147,16 @@ namespace eCAL { case TLayer::eSendMode::smode_auto: case TLayer::eSendMode::smode_on: - m_writer.inproc.Create(m_host_name, m_topic_name, m_topic_id); + if (m_writer.inproc.Create(m_host_name, m_topic_name, m_topic_id)) + { #ifndef NDEBUG - Logging::Log(log_level_debug4, m_topic_name + "::CDataWriter::Create::INPROC_WRITER"); + Logging::Log(log_level_debug4, m_topic_name + "::CDataWriter::Create::INPROC_WRITER - SUCCESS"); #endif + } + else + { + Logging::Log(log_level_error, m_topic_name + "::CDataWriter::Create::INPROC_WRITER - FAILED"); + } break; default: m_writer.inproc.Destroy(); diff --git a/ecal/core/src/readwrite/ecal_writer_shm.cpp b/ecal/core/src/readwrite/ecal_writer_shm.cpp index 5dbee9cd44..fd11fd548d 100644 --- a/ecal/core/src/readwrite/ecal_writer_shm.cpp +++ b/ecal/core/src/readwrite/ecal_writer_shm.cpp @@ -79,9 +79,7 @@ namespace eCAL m_memory_file_attr.timeout_ack_ms = Config::GetMemfileAckTimeoutMs(); // initialize memory file buffer - SetBufferCount(m_buffer_count); - - m_created = true; + m_created = SetBufferCount(m_buffer_count);; return m_created; } @@ -124,12 +122,21 @@ namespace eCAL memory_file_size = m_memory_file_attr.min_size; } - // recreate memory file vector + // create memory file vector m_memory_file_vec.clear(); while (m_memory_file_vec.size() < buffer_count_) { auto sync_memfile = std::make_shared(m_memfile_base_name, memory_file_size, m_memory_file_attr); - m_memory_file_vec.push_back(sync_memfile); + if (sync_memfile->IsCreated()) + { + m_memory_file_vec.push_back(sync_memfile); + } + else + { + m_memory_file_vec.clear(); + Logging::Log(log_level_error, "CDataWriterSHM::SetBufferCount - FAILED"); + return false; + } } return true; From 171ecae3a794d89983af89577061f873c97b4f1b Mon Sep 17 00:00:00 2001 From: Rex Schilasky <49162693+rex-schilasky@users.noreply.github.com> Date: Wed, 25 Oct 2023 17:04:16 +0200 Subject: [PATCH 2/2] testing: tried to cleanup the naming of the ecal unit tests a bit (#1224) --- .../test/src/ecal_tcp_service_test.cpp | 2 +- .../dynproto_test/src/dynproto_test.cpp | 2 +- .../ecal_proto_test/src/test_filters.cpp | 10 +++--- .../src/clientserver_getservices.cpp | 2 +- .../src/clientserver_test.cpp | 20 +++++------ .../src/memfile_naming_test.cpp | 3 +- .../ecal/io_memfile_test/src/memfile_test.cpp | 6 ++-- .../src/pubsub_inproc_test.cpp | 2 +- .../src/proto_dyn_subscriber_test.cpp | 3 -- .../pubsub_test/src/pubsub_acknowledge.cpp | 2 +- .../ecal/pubsub_test/src/pubsub_gettopics.cpp | 2 +- .../pubsub_test/src/pubsub_multibuffer.cpp | 2 +- .../pubsub_test/src/pubsub_receive_test.cpp | 4 +-- testing/ecal/pubsub_test/src/pubsub_test.cpp | 34 +++++++++---------- testing/ecal/util_test/src/util_test.cpp | 1 - 15 files changed, 45 insertions(+), 50 deletions(-) diff --git a/ecal/service/test/src/ecal_tcp_service_test.cpp b/ecal/service/test/src/ecal_tcp_service_test.cpp index 275430f65a..6b44026678 100644 --- a/ecal/service/test/src/ecal_tcp_service_test.cpp +++ b/ecal/service/test/src/ecal_tcp_service_test.cpp @@ -1306,7 +1306,7 @@ TEST(CommunicationAndCallbacks, StressfulCommunicationMassivePayload) // NOLINT #endif #if 1 -TEST(callback, ServerAndClientManagers) // NOLINT +TEST(Callback, ServerAndClientManagers) // NOLINT { for (std::uint8_t protocol_version = min_protocol_version; protocol_version <= max_protocol_version; protocol_version++) { diff --git a/testing/contrib/ecalproto/dynproto_test/src/dynproto_test.cpp b/testing/contrib/ecalproto/dynproto_test/src/dynproto_test.cpp index 7b3e2738dd..110c842694 100644 --- a/testing/contrib/ecalproto/dynproto_test/src/dynproto_test.cpp +++ b/testing/contrib/ecalproto/dynproto_test/src/dynproto_test.cpp @@ -29,7 +29,7 @@ void ProcProtoMsg(const google::protobuf::Message& msg_, const std::string& prefix_ /* = "" */); // google test -TEST(IO, dynproto) +TEST(DynProto, dynproto) { // generate a class instance of Person pb::People::Person person; diff --git a/testing/contrib/ecalproto/ecal_proto_test/src/test_filters.cpp b/testing/contrib/ecalproto/ecal_proto_test/src/test_filters.cpp index 61c2822270..c84fffb10d 100644 --- a/testing/contrib/ecalproto/ecal_proto_test/src/test_filters.cpp +++ b/testing/contrib/ecalproto/ecal_proto_test/src/test_filters.cpp @@ -29,14 +29,14 @@ using namespace eCAL::protobuf; -TEST(filter, nofilter) +TEST(Filter, nofilter) { NoFilter filter; bool result = filter.Filter("abc"); EXPECT_EQ(true, result); } -TEST(filter, include_filter_clear) +TEST(Filter, include_filter_clear) { SimpleIncludeFilter filter; std::string a("a"); @@ -90,7 +90,7 @@ void test_regular_includes(BaseIncludeFilter& filter) EXPECT_EQ(false, filter.Filter(adf)); } -TEST(filter, include_filter) +TEST(Filter, include_filter) { SimpleIncludeFilter simple_filter; test_regular_includes(simple_filter); @@ -98,7 +98,7 @@ TEST(filter, include_filter) test_regular_includes(complex_filter); } -TEST(filter, include_filter_array_simple) +TEST(Filter, include_filter_array_simple) { const std::string a("a"); const std::string a1("a[1]"); @@ -130,7 +130,7 @@ TEST(filter, include_filter_array_simple) EXPECT_EQ(false, filter.Filter(a2b)); // should not accept a[2].b } -TEST(filter, include_filter_array_complex) +TEST(Filter, include_filter_array_complex) { const std::string a ("a" ); const std::string a1 ("a[1]" ); diff --git a/testing/ecal/clientserver_test/src/clientserver_getservices.cpp b/testing/ecal/clientserver_test/src/clientserver_getservices.cpp index d6b3d7be80..1b55e23555 100644 --- a/testing/ecal/clientserver_test/src/clientserver_getservices.cpp +++ b/testing/ecal/clientserver_test/src/clientserver_getservices.cpp @@ -24,7 +24,7 @@ #define CMN_MONITORING_TIMEOUT 5000 -TEST(IO, GetServices) +TEST(ClientServer, GetServices) { // initialize eCAL API eCAL::Initialize(0, nullptr, "clientserver_getservices"); diff --git a/testing/ecal/clientserver_test/src/clientserver_test.cpp b/testing/ecal/clientserver_test/src/clientserver_test.cpp index 7c5b1e5ab8..d77b5b5789 100644 --- a/testing/ecal/clientserver_test/src/clientserver_test.cpp +++ b/testing/ecal/clientserver_test/src/clientserver_test.cpp @@ -92,7 +92,7 @@ namespace #if ClientConnectEventTest -TEST(IO, ClientConnectEvent) +TEST(ClientServer, ClientConnectEvent) { // initialize eCAL API eCAL::Initialize(0, nullptr, "clientserver base connect event callback"); @@ -156,7 +156,7 @@ TEST(IO, ClientConnectEvent) #if ServerConnectEventTest -TEST(IO, ServerConnectEvent) +TEST(ClientServer, ServerConnectEvent) { // initialize eCAL API eCAL::Initialize(0, nullptr, "clientserver base connect event callback"); @@ -218,7 +218,7 @@ TEST(IO, ServerConnectEvent) #if ClientServerBaseCallbackTest -TEST(IO, ClientServerBaseCallback) +TEST(ClientServer, ClientServerBaseCallback) { const int num_services(2); const int num_clients(3); @@ -332,7 +332,7 @@ TEST(IO, ClientServerBaseCallback) #if ClientServerBaseCallbackTimeoutTest -TEST(IO, ClientServerBaseCallbackTimeout) +TEST(ClientServer, ClientServerBaseCallbackTimeout) { const int num_services(2); const int num_clients(3); @@ -502,7 +502,7 @@ TEST(IO, ClientServerBaseCallbackTimeout) #if ClientServerBaseAsyncCallbackTest -TEST(IO, ClientServerBaseAsyncCallback) +TEST(ClientServer, ClientServerBaseAsyncCallback) { const int calls(1); const int sleep(100); @@ -576,7 +576,7 @@ TEST(IO, ClientServerBaseAsyncCallback) #if ClientServerBaseAsyncTest -TEST(IO, ClientServerBaseAsyncTest) +TEST(ClientServer, ClientServerBaseAsyncTest) { const int calls(5); @@ -683,7 +683,7 @@ TEST(IO, ClientServerBaseAsyncTest) #if ClientServerBaseBlockingTest -TEST(IO, ClientServerBaseBlocking) +TEST(ClientServer, ClientServerBaseBlocking) { const int num_services(2); const int num_clients(3); @@ -818,7 +818,7 @@ class MathServiceImpl : public MathService } }; -TEST(IO, ClientServerProtoCallback) +TEST(ClientServer, ClientServerProtoCallback) { // initialize eCAL API eCAL::Initialize(0, nullptr, "clientserver proto callback test"); @@ -907,7 +907,7 @@ class PingServiceImpl : public PingService } }; -TEST(IO, ClientServerProtoBlocking) +TEST(ClientServer, ClientServerProtoBlocking) { // initialize eCAL API eCAL::Initialize(0, nullptr, "clientserver proto blocking test"); @@ -959,7 +959,7 @@ TEST(IO, ClientServerProtoBlocking) #if NestedRPCCallTest -TEST(IO, NestedRPCCall) +TEST(ClientServer, NestedRPCCall) { const int calls(1); const int sleep(0); diff --git a/testing/ecal/io_memfile_test/src/memfile_naming_test.cpp b/testing/ecal/io_memfile_test/src/memfile_naming_test.cpp index 5c716ba87f..ca8c97d062 100644 --- a/testing/ecal/io_memfile_test/src/memfile_naming_test.cpp +++ b/testing/ecal/io_memfile_test/src/memfile_naming_test.cpp @@ -28,7 +28,7 @@ #include -TEST(IO, MemfileNaming) +TEST(MemFile, MemfileNaming) { std::chrono::steady_clock::time_point timepoint{}; @@ -37,5 +37,4 @@ TEST(IO, MemfileNaming) EXPECT_LE(memfile_name_1.size(), 13); EXPECT_NE(memfile_name_1, memfile_name_2); - } diff --git a/testing/ecal/io_memfile_test/src/memfile_test.cpp b/testing/ecal/io_memfile_test/src/memfile_test.cpp index 0f9e126d7b..b9e78f6b86 100644 --- a/testing/ecal/io_memfile_test/src/memfile_test.cpp +++ b/testing/ecal/io_memfile_test/src/memfile_test.cpp @@ -38,7 +38,7 @@ namespace eCAL } } -TEST(IO, MemfileReadWrite) +TEST(MemFile, MemfileReadWrite) { eCAL::CMemoryFile mem_file; @@ -140,7 +140,7 @@ TEST(IO, MemfileReadWrite) EXPECT_EQ(true, mem_file.Destroy(true)); } -TEST(IO, MemfilePerf) +TEST(MemFile, MemfilePerf) { eCAL::CMemoryFile mem_file; @@ -200,7 +200,7 @@ TEST(IO, MemfilePerf) EXPECT_EQ(true, mem_file.Destroy(true)); } -TEST(IO, MemfileConcurrency) +TEST(MemFile, MemfileConcurrency) { eCAL::CMemoryFile mem_file; diff --git a/testing/ecal/pubsub_inproc_test/src/pubsub_inproc_test.cpp b/testing/ecal/pubsub_inproc_test/src/pubsub_inproc_test.cpp index fd156d0dbf..8648f94535 100644 --- a/testing/ecal/pubsub_inproc_test/src/pubsub_inproc_test.cpp +++ b/testing/ecal/pubsub_inproc_test/src/pubsub_inproc_test.cpp @@ -52,7 +52,7 @@ void OnReceive3() sub_clock3++; } -TEST(INPROC, CLOCKS) +TEST(PubSubInproc, CLOCKS) { // initialize eCAL API EXPECT_EQ(0, eCAL::Initialize(0, nullptr, "inproc_clock_test")); diff --git a/testing/ecal/pubsub_proto_test/src/proto_dyn_subscriber_test.cpp b/testing/ecal/pubsub_proto_test/src/proto_dyn_subscriber_test.cpp index e38f1c6d31..a79630c05b 100644 --- a/testing/ecal/pubsub_proto_test/src/proto_dyn_subscriber_test.cpp +++ b/testing/ecal/pubsub_proto_test/src/proto_dyn_subscriber_test.cpp @@ -131,6 +131,3 @@ TEST_F(ProtoDynSubscriberTest, SendReceive) auto id = extract_id(*message); ASSERT_EQ(id, 1); } - - - diff --git a/testing/ecal/pubsub_test/src/pubsub_acknowledge.cpp b/testing/ecal/pubsub_test/src/pubsub_acknowledge.cpp index 32df00f385..0467a13353 100644 --- a/testing/ecal/pubsub_test/src/pubsub_acknowledge.cpp +++ b/testing/ecal/pubsub_test/src/pubsub_acknowledge.cpp @@ -47,7 +47,7 @@ namespace } // This test asserts that a timeouted acknowledge does not break subsequent calls -TEST(Core, TimeoutAcknowledgment) +TEST(PubSub, TimeoutAcknowledgment) { // initialize eCAL API EXPECT_EQ(0, eCAL::Initialize(0, nullptr, "TimeoutAcknowledgment", eCAL::Init::All)); diff --git a/testing/ecal/pubsub_test/src/pubsub_gettopics.cpp b/testing/ecal/pubsub_test/src/pubsub_gettopics.cpp index b5f6cd1cff..6806596fe0 100644 --- a/testing/ecal/pubsub_test/src/pubsub_gettopics.cpp +++ b/testing/ecal/pubsub_test/src/pubsub_gettopics.cpp @@ -26,7 +26,7 @@ #define CMN_REGISTRATION_REFRESH 1000 #define CMN_MONITORING_TIMEOUT 5000 -TEST(IO, GetTopics) +TEST(PubSub, GetTopics) { // initialize eCAL API eCAL::Initialize(0, nullptr, "pubsub_gettopics"); diff --git a/testing/ecal/pubsub_test/src/pubsub_multibuffer.cpp b/testing/ecal/pubsub_test/src/pubsub_multibuffer.cpp index 6dee9de0b1..4929beca30 100644 --- a/testing/ecal/pubsub_test/src/pubsub_multibuffer.cpp +++ b/testing/ecal/pubsub_test/src/pubsub_multibuffer.cpp @@ -65,7 +65,7 @@ class CBinaryPayload : public eCAL::CPayloadWriter int clock = 0; }; -TEST(IO, MultibufferPubSub) +TEST(PubSub, MultibufferPubSub) { // create payload CBinaryPayload binary_payload(PAYLOAD_SIZE); diff --git a/testing/ecal/pubsub_test/src/pubsub_receive_test.cpp b/testing/ecal/pubsub_test/src/pubsub_receive_test.cpp index dfba50e79d..d7059015a1 100644 --- a/testing/ecal/pubsub_test/src/pubsub_receive_test.cpp +++ b/testing/ecal/pubsub_test/src/pubsub_receive_test.cpp @@ -65,7 +65,7 @@ void measure_execution_within_range(const std::string& description, std::functio } -TEST(SUBSCRIBER, TimingSubscriberReceive) +TEST(PubSub, TimingSubscriberReceive) { // initialize eCAL API EXPECT_EQ(0, eCAL::Initialize(0, nullptr, "subscriber_receive_timing")); @@ -164,7 +164,7 @@ TEST(SUBSCRIBER, TimingSubscriberReceive) // This tests test for sporadically received empty messages which were a problem. -TEST(SUBSCRIBER, SporadicEmptyReceives) +TEST(PubSub, SporadicEmptyReceives) { // initialize eCAL API EXPECT_EQ(0, eCAL::Initialize(0, nullptr, "sporadic_empty_receives")); diff --git a/testing/ecal/pubsub_test/src/pubsub_test.cpp b/testing/ecal/pubsub_test/src/pubsub_test.cpp index 214412cc92..0a1f9f97f2 100644 --- a/testing/ecal/pubsub_test/src/pubsub_test.cpp +++ b/testing/ecal/pubsub_test/src/pubsub_test.cpp @@ -51,7 +51,7 @@ static std::string CreatePayLoad(size_t payload_size_) return(s); } -TEST(IO, InitializeFinalize) +TEST(PubSub, InitializeFinalize) { // Is eCAL API initialized ? EXPECT_EQ(0, eCAL::IsInitialized()); @@ -91,7 +91,7 @@ TEST(IO, InitializeFinalize) EXPECT_EQ(1, eCAL::Finalize()); } -TEST(IO, CreateDestroy) +TEST(PubSub, CreateDestroy) { // initialize eCAL API eCAL::Initialize(0, nullptr, "pubsub_test"); @@ -130,7 +130,7 @@ TEST(IO, CreateDestroy) eCAL::Finalize(); } -TEST(IO, TypeDescriptionStatic) +TEST(PubSub, TypeDescriptionStatic) { // initialize eCAL API eCAL::Initialize(0, nullptr, "pubsub_test"); @@ -153,7 +153,7 @@ TEST(IO, TypeDescriptionStatic) eCAL::Finalize(); } -TEST(IO, TypeDescriptionDynamic) +TEST(PubSub, TypeDescriptionDynamic) { // initialize eCAL API eCAL::Initialize(0, nullptr, "pubsub_test"); @@ -257,7 +257,7 @@ TEST(IO, TypeDescriptionDynamic) eCAL::Finalize(); } -TEST(IO, SimpleMessage1) +TEST(PubSub, SimpleMessage1) { // default send / receive strings std::string send_s = CreatePayLoad(PAYLOAD_SIZE); @@ -302,7 +302,7 @@ TEST(IO, SimpleMessage1) eCAL::Finalize(); } -TEST(IO, SimpleMessage2) +TEST(PubSub, SimpleMessage2) { // default send / receive strings std::string send_s = CreatePayLoad(PAYLOAD_SIZE); @@ -341,7 +341,7 @@ TEST(IO, SimpleMessage2) eCAL::Finalize(); } -TEST(IO, SimpleMessageCB) +TEST(PubSub, SimpleMessageCB) { // default send string std::string send_s = CreatePayLoad(PAYLOAD_SIZE); @@ -420,7 +420,7 @@ TEST(IO, SimpleMessageCB) eCAL::Finalize(); } -TEST(IO, DynamicSizeCB) +TEST(PubSub, DynamicSizeCB) { // default send string std::string send_s = CreatePayLoad(PAYLOAD_SIZE); @@ -476,7 +476,7 @@ TEST(IO, DynamicSizeCB) eCAL::Finalize(); } -TEST(IO, DynamicCreate) +TEST(PubSub, DynamicCreate) { // default send string std::string send_s = CreatePayLoad(PAYLOAD_SIZE); @@ -568,7 +568,7 @@ TEST(IO, DynamicCreate) eCAL::Finalize(); } -TEST(IO, SimpleMessageCBSHMBufferCount) +TEST(PubSub, SimpleMessageCBSHMBufferCount) { // default send string std::string send_s = CreatePayLoad(PAYLOAD_SIZE); @@ -619,7 +619,7 @@ TEST(IO, SimpleMessageCBSHMBufferCount) eCAL::Finalize(); } -TEST(IO, ZeroPayloadMessageInProc) +TEST(PubSub, ZeroPayloadMessageInProc) { // default send string std::string send_s; @@ -667,7 +667,7 @@ TEST(IO, ZeroPayloadMessageInProc) eCAL::Finalize(); } -TEST(IO, ZeroPayloadMessageSHM) +TEST(PubSub, ZeroPayloadMessageSHM) { // default send string std::string send_s; @@ -715,7 +715,7 @@ TEST(IO, ZeroPayloadMessageSHM) eCAL::Finalize(); } -TEST(IO, ZeroPayloadMessageUDP) +TEST(PubSub, ZeroPayloadMessageUDP) { // default send string std::string send_s; @@ -764,7 +764,7 @@ TEST(IO, ZeroPayloadMessageUDP) } -TEST(IO, MultipleSendsSHM) +TEST(PubSub, MultipleSendsSHM) { // default send string std::vector send_vector{ "this", "is", "a", "", "testtest" }; @@ -817,7 +817,7 @@ TEST(IO, MultipleSendsSHM) } -TEST(IO, MultipleSendsUDP) +TEST(PubSub, MultipleSendsUDP) { // default send string std::vector send_vector{ "this", "is", "a", "", "testtest" }; @@ -874,7 +874,7 @@ TEST(IO, MultipleSendsUDP) #if 0 -TEST(IO, ZeroPayloadMessageTCP) +TEST(PubSub, ZeroPayloadMessageTCP) { // default send string std::string send_s; @@ -925,7 +925,7 @@ TEST(IO, ZeroPayloadMessageTCP) #include #include -TEST(IO, DestroyInCallback) +TEST(PubSub, DestroyInCallback) { /* Test setup : * 2 pair of pub_sub connections ("foo" and "destroy") diff --git a/testing/ecal/util_test/src/util_test.cpp b/testing/ecal/util_test/src/util_test.cpp index 59bdb7e8ca..a042dd0bd5 100644 --- a/testing/ecal/util_test/src/util_test.cpp +++ b/testing/ecal/util_test/src/util_test.cpp @@ -45,7 +45,6 @@ TEST(Util, CombineTopicEncodingAndType) TestCombinedTopicEncodingAndType("", "MyType", "MyType"); } - TEST(Util, SplitCombinedTopicType) { TestSplitCombinedTopicType("", "", "");