Skip to content
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

Test and Potential Fix for Issue #363 Native Windows Condition Variables do not set errno to ETIME #364

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

mathersm
Copy link

@mathersm mathersm commented Feb 8, 2017

  • Added a really simple test for the return value and errno combination expected when a wait on a condition variable times out. Project name is Native_Condition_Variable_Test.
  • Added new test onto the list for automatic testing via run_test.lst
  • Added an additional case to the ACE_FAIL_RETURN macro to mutate ERROR_TIMEOUT into ETIME.
  • Added an additional check at the end of the implementation of ACE_Condition::wait(const ACE_Time_Value*) to mutate WIN32 errors into errno (as expected).

It might be worth considering revisiting the MSVC configuration files to enable ACE_HAS_WTHREADS_CONDITION_VARIABLE (with appropriate include statements) for Windows Vista/Server2008 and beyond.

… a wait on a condition variable times out. Added an additional case to the ACE_FAIL_RETURN macro to mutate ERROR_TIMEOUT into ETIME. Added an additional check at the end of the implementation of ACE_Condition<T>::wait(ACE_Time_Value*) to mutate WIN32 errors into errno (as expected).
@jwillemsen
Copy link
Member

FYI, because ACE_HAS_WTHREADS_CONDITION_VARIABLE is not defined by any of the CI or regular scoreboard builds none will test the core changes and the support for this


//=============================================================================
/**
* @file Native_Condition_Variable_Test.cpp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would propose to remove Native_ from the name of this test, it just tests the condition variable behavior on any platform

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I will probably change it to something like Condition_Variable_Timeout_Test.

…re general nature of the test and better indicate what is being tested.
…_RETURN now uses this method. Allows for a new macro ACE_FAIL_RETVAL which will mutate the last error and provide a value without requiring to return from a function.

* Updated Win32 configuration to include native condition variables by default for Windows Vista / Windows Server 2008 and newer.
… checks correctly and not automatically default to Windows XP support.
@jwillemsen jwillemsen modified the milestone: 6.5.0/2.5.0 Aug 7, 2018
@jwillemsen jwillemsen added the needs review Needs to be reviewed label Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Needs to be reviewed
Development

Successfully merging this pull request may close these issues.

2 participants