Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  Index 2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018 
<== Date ==> <== Thread ==>

Subject: Re: RTEMS tests -- epicsThreadOnce broken?
From: Andrew Johnson <anj@aps.anl.gov>
To: Eric Norum <eric@norum.ca>
Cc: Core-Talk Talk <core-talk@aps.anl.gov>
Date: Fri, 29 Oct 2010 10:25:32 -0500
On Thursday 28 October 2010 19:00:26 Eric Norum wrote:
> While running the epicsEventTests I also ran the other tests on RTEMS --
> and got some disturbing results: 

That is generally why I ask people to run tests on the -pre1 release...

> ***** epicsThreadOnceTest *****
> 1..11
> ok  1 - runCount = 8
> ok  2 - once-0: initCount = 1
> ok  3 - once-1: initCount = 1
> ok  4 - once-2: initCount = 1
> ok  5 - once-3: initCount = 1
> ok  6 - once-4: initCount = 1
> not ok  7 - doneCount = 4
> ok  8 - once-5: initCount = 1
> # init was run by once-0
> ok  9 - once-6: initCount = 1
> Recursive epicsThreadOnce() initialization
> ok 10 - once-7: initCount = 1
> Thread recurse (0xa01001b) can't proceed, suspending.
> ok 11 - Recursive epicsThreadOnce() detected
>
>     Results
>     =======
>        Tests: 11
>       Passed:  10 = 90.91%
>       Failed:   1 =  9.09%
>
> Have the recent epicsThreadOnce changes broken something on RTEMS? (!!!)

Actually it doesn't look that bad, just that the test code isn't waiting long 
enough for all the once-<n> threads to run; they are running later on, but by 
then it's stopped counting.  Try increasing the delay immediately before the 
testOk(doneCount==...) line.

This is the place where I really wanted a broadcast epicsEvent that would 
start all the waiting threads at once, to test that the once really can't be 
executed in parallel.

- Andrew
-- 
If a man is offered a fact which goes against his instincts, he will
scrutinize it closely, and unless the evidence is overwhelming, he will
refuse to believe it.  If, on the other hand, he is offered something
which affords a reason for acting in accordance to his instincts, he
will accept it even on the slightest evidence.  -- Bertrand Russell


Replies:
Re: RTEMS tests -- epicsThreadOnce broken? Eric Norum
References:
Re: epicsEvent Eric Norum
RTEMS tests -- epicsThreadOnce broken? Eric Norum

Navigate by Date:
Prev: Re: epicsEvent Ralph Lange
Next: Re: RTEMS tests -- epicsThreadOnce broken? Eric Norum
Index: 2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018 
Navigate by Thread:
Prev: RTEMS tests -- epicsThreadOnce broken? Eric Norum
Next: Re: RTEMS tests -- epicsThreadOnce broken? Eric Norum
Index: 2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·