stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-536) allow thread safety tests to time out without failing
Date Sun, 11 May 2008 21:07:55 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595938#action_12595938
] 

Travis Vitek commented on STDCXX-536:
-------------------------------------

Then this question remains... How does such messaging framework work in a single threaded
build? Does the test function need to call some {{messaging_framework_update()}} type function
to make sure that any messages get processed or do we use a thread inside the test library
that dispatches messages?

The simplest and probably most portable solution is to just add some context data that tells
the thread how long it should run [say a start and end time]. Then the thread_func would just
check to see if the current time was outside that period and bail.

> 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: 4.2.0
>            Reporter: Martin Sebor
>            Assignee: Travis Vitek
>             Fix For: 4.2.2
>
>         Attachments: stdcxx-536.patch
>
>   Original Estimate: 3h
>          Time Spent: 4h
>  Remaining Estimate: 0h
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message