Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: libcom tests
From: Michael Davidsaver <mdavidsaver@gmail.com>
To: Heinz Junkes <junkes@fhi-berlin.mpg.de>
Cc: core-talk@aps.anl.gov
Date: Wed, 12 Jul 2017 17:52:52 +0200
On 07/12/2017 05:28 PM, Heinz Junkes wrote:
> I'm just trying to write tests for the stdout/stderr mix up …

How do you plan to test this?

> In src/libCom/test most of the files are named epicsBlaBlaTest.c[pp] but some not
> 
> e.g. ringPointerTest.c 
> 
> Is this intended?
> 
> In the file, there is no epicsThreadCreate in main

Nor should there be.  The main() thread is implicitly made an "epics"
thread in epicsThreadInit().  In osdThread.c look for a call to
init_threadInfo() in once().

>  but an epicsThreadSetPriority call
> which leads to an error output from posix/osdThread.c -> “epicsThreadSetPriority called by non epics thread”

Seems like epicsThreadSetPriority() is missing a call to
epicsThreadInit().  Not sure if there are an side-effects to adding this.

You can verify this by adding a call to epicsThreadGetIdSelf() at some
point before the call to epicsThreadSetPriority().

> Should I fix this in ringPointerTest.c ( I would rename it to epicsRingPointerTest.c ;-) ) ?

I think a fix is necessary, but in osdThread.c rather than ringPointerTest.c


References:
libcom tests Heinz Junkes

Navigate by Date:
Prev: libcom tests Heinz Junkes
Next: libCom posix/Linux Heinz Junkes
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: libcom tests Heinz Junkes
Next: libCom posix/Linux Heinz Junkes
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 14 Jul 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·