Hi Travis,
Can you describe how this all works? I.e., what happens to a test
invoked without the --timeout option when it exceeds the default
295ms timeout? What happens to one that is invoked with the option?
From your comment below it sounds like the solution you implemented
is different from what I described in the issue, i.e., "set an alarm
in response to this command line option and in handler for the alarm
set a flag that each thread would check at each iteration of its
loop to see if it should break."
https://issues.apache.org/jira/browse/STDCXX-536#action_12526315
Thanks
Martin
Travis Vitek (JIRA) wrote:
[
https://issues.apache.org/jira/browse/STDCXX-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Travis Vitek updated STDCXX-536:
--------------------------------
Attachment: stdcxx-536.patch
fixed patch to not use rw_note when timer expires because that function is not
mt-safe.
allow thread safety tests to time out without failing
-----------------------------------------------------
Key: STDCXX-536
URL: https://issues.apache.org/jira/browse/STDCXX-536
Project: C++ Standard Library
Issue Type: Improvement
Components: Tests
Affects Versions: trunk
Reporter: Martin Sebor
Assignee: Travis Vitek
Fix For: 4.2
Attachments: stdcxx-536.patch
The newly added thread safety tests (and possibly some of the existing ones)
tend to run for a long time, consuming a lot of CPU cycles, and sometimes even
failing due to a timeout (currently 300 seconds in nightly builds). It would be
useful to provide a mechanism such as a command line option whereby the tests'
runtime could be limited without necessarily causing them to fail when the
amount of time is exceeded. One way to do it would be for each test to set an
alarm in response to this command line option and in handler for the alarm set
a flag that each thread would check at each iteration of its loop to see if it
should break.