-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iox-#33 posix mutex support in windows #797
iox-#33 posix mutex support in windows #797
Conversation
Codecov Report
@@ Coverage Diff @@
## master #797 +/- ##
==========================================
- Coverage 74.41% 74.36% -0.05%
==========================================
Files 322 322
Lines 11522 11533 +11
Branches 1952 1956 +4
==========================================
+ Hits 8574 8577 +3
- Misses 2190 2193 +3
- Partials 758 763 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
|
iceoryx_hoofs/platform/win/include/iceoryx_hoofs/platform/pthread.hpp
Outdated
Show resolved
Hide resolved
…accordingly, fixed issue where the wrong errno was set in windows platform semaphore Signed-off-by: Christian Eltzschig <me@elchris.org>
Signed-off-by: Christian Eltzschig <me@elchris.org>
Signed-off-by: Christian Eltzschig <me@elchris.org>
Signed-off-by: Christian Eltzschig <me@elchris.org>
…posixCall assigns returnValue to errnum if it contains errno Signed-off-by: Christian Eltzschig <me@elchris.org>
…six call Signed-off-by: Christian Eltzschig <me@elchris.org>
Signed-off-by: Christian Eltzschig <me@elchris.org>
…ting time < 1, linking error fix in mutex posix Signed-off-by: Christian Eltzschig <me@elchris.org>
…ility of code, steady clock instead high resolution clock (since it is not the same on all platforms), added missing posix call tests Signed-off-by: Christian Eltzschig <me@elchris.org>
Signed-off-by: Christian Eltzschig <me@elchris.org>
Signed-off-by: Mathias Kraus <mathias.kraus@apex.ai>
f812379
to
5bbfb72
Compare
@@ -34,7 +34,7 @@ class Mutex_test : public Test | |||
void SetUp() override | |||
{ | |||
internal::CaptureStderr(); | |||
m_deadlockWatchdog.watchAndActOnFailure([] { std::terminate(); }); | |||
deadlockWatchdog.watchAndActOnFailure([] { std::terminate(); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also ASSERT_TRUE(false)
here instead of terminate. I have not tested how it behaves when called from another thread (like here in the watchdog) but maybe it would be possible to abort the current test this way with a failure and still run the next test (to get more info on what is broken).
If this does not work I see no easy way to abort only the current test (which is considered blocked).
Èdit: ASSERT_TRUE
is a crude way of doing this, better use FAIL
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert just return and does not unblock the deadlock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right.We could in theory still do this in another way by essentially creating a NO_DEATH test which under normal conditions expects not to terminate but can terminated like here due to timeout. I did something like this some time ago (not with timeout) in the C binding with an invalid options test case, Gtest has the necessary macro infrastructure.
This would work (I think) because those are forked and if we terminate the forked test it would fail and a blocked mutex is of no concern since thre process is terminated anyway.
But it is not worth it to do so, I just think it is possible in principle.
@@ -7,7 +7,8 @@ CheckOptions: | |||
- { key: readability-identifier-naming.MethodCase, value: camelBack } | |||
- { key: readability-identifier-naming.FunctionCase, value: camelBack } | |||
- { key: readability-identifier-naming.NamespaceCase, value: lower_case } | |||
- { key: readability-identifier-naming.MemberPrefix, value: m_ } | |||
- { key: readability-identifier-naming.PrivateMemberPrefix, value: m_ } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To which clang-tidy version refers this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkroenke This should be available in clang-tidy 10, see: https://releases.llvm.org/10.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/readability-identifier-naming.html
At the moment I would not yet enforce this clang-tidy file since needs to mature a little while longer. But I strongly suggest that we all integrate clang-tidy into our IDE so that this file can mature faster.
Pre-Review Checklist for the PR Author
iox-#123-this-is-a-branch
)iox-#123 commit text
)git commit -s
)task-list-completed
)Notes for Reviewer
Checklist for the PR Reviewer
Post-review Checklist for the PR Author
References