From cb264a069a6c70027dc7085c37390408109c5101 Mon Sep 17 00:00:00 2001 From: Christian Eltzschig Date: Wed, 28 Sep 2022 11:45:28 +0200 Subject: [PATCH 1/2] iox-#1683 Disable robust mutex test for qnx Signed-off-by: Christian Eltzschig --- iceoryx_hoofs/test/moduletests/test_posix_mutex.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/iceoryx_hoofs/test/moduletests/test_posix_mutex.cpp b/iceoryx_hoofs/test/moduletests/test_posix_mutex.cpp index b695a6e303..9c9cd0055a 100644 --- a/iceoryx_hoofs/test/moduletests/test_posix_mutex.cpp +++ b/iceoryx_hoofs/test/moduletests/test_posix_mutex.cpp @@ -223,6 +223,9 @@ TEST_F(Mutex_test, MutexWithOnReleaseWhenLockedBehaviorUnlocksLockedMutexWhenThreadTerminatesAndSetsItIntoInconsistentState) { ::testing::Test::RecordProperty("TEST_ID", "4da7b1fb-23f1-421c-acf3-2a3d9e26b1a1"); +#if defined(QNX) || defined(__QNX) || defined(__QNX__) || defined(QNX__) + GTEST_SKIP() << "iox-#1683 QNX supports robust mutex not like the posix standard describes them."; +#endif iox::cxx::optional sut; ASSERT_FALSE(iox::posix::MutexBuilder() .threadTerminationBehavior(iox::posix::MutexThreadTerminationBehavior::RELEASE_WHEN_LOCKED) From 175b560c742638b763e893d5ff6ecc14df396166 Mon Sep 17 00:00:00 2001 From: Christian Eltzschig Date: Wed, 28 Sep 2022 19:06:19 +0200 Subject: [PATCH 2/2] iox-#1683 Explicitly implement ctor again in trigger_handle Signed-off-by: Christian Eltzschig --- iceoryx_hoofs/test/moduletests/test_posix_mutex.cpp | 3 +++ iceoryx_posh/include/iceoryx_posh/popo/trigger_handle.hpp | 3 ++- iceoryx_posh/source/popo/trigger_handle.cpp | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/iceoryx_hoofs/test/moduletests/test_posix_mutex.cpp b/iceoryx_hoofs/test/moduletests/test_posix_mutex.cpp index 9c9cd0055a..211bd0b150 100644 --- a/iceoryx_hoofs/test/moduletests/test_posix_mutex.cpp +++ b/iceoryx_hoofs/test/moduletests/test_posix_mutex.cpp @@ -247,6 +247,9 @@ TEST_F(Mutex_test, TEST_F(Mutex_test, MutexWithStallWhenLockedBehaviorDoesntUnlockMutexWhenThreadTerminates) { ::testing::Test::RecordProperty("TEST_ID", "9beae890-f18e-4878-a957-312920eb1833"); +#if defined(QNX) || defined(__QNX) || defined(__QNX__) || defined(QNX__) + GTEST_SKIP() << "iox-#1683 QNX supports robust mutex not like the posix standard describes them."; +#endif iox::cxx::optional sut; ASSERT_FALSE(iox::posix::MutexBuilder() .threadTerminationBehavior(iox::posix::MutexThreadTerminationBehavior::STALL_WHEN_LOCKED) diff --git a/iceoryx_posh/include/iceoryx_posh/popo/trigger_handle.hpp b/iceoryx_posh/include/iceoryx_posh/popo/trigger_handle.hpp index 833ba3fe3f..82fef72d70 100644 --- a/iceoryx_posh/include/iceoryx_posh/popo/trigger_handle.hpp +++ b/iceoryx_posh/include/iceoryx_posh/popo/trigger_handle.hpp @@ -37,7 +37,8 @@ namespace popo class TriggerHandle { public: - TriggerHandle() noexcept = default; + /// @warning do not use =default here otherwise QNX will fail to compile! + TriggerHandle() noexcept; /// @brief Creates a TriggerHandle /// @param[in] conditionVariableDataRef reference to a condition variable data struct diff --git a/iceoryx_posh/source/popo/trigger_handle.cpp b/iceoryx_posh/source/popo/trigger_handle.cpp index ab4308b7cc..ca913fbcff 100644 --- a/iceoryx_posh/source/popo/trigger_handle.cpp +++ b/iceoryx_posh/source/popo/trigger_handle.cpp @@ -21,6 +21,10 @@ namespace iox { namespace popo { +TriggerHandle::TriggerHandle() noexcept +{ +} + TriggerHandle::TriggerHandle(ConditionVariableData& conditionVariableData, const cxx::function& resetCallback, const uint64_t uniqueTriggerId) noexcept