Commit Graph

372 Commits

Author SHA1 Message Date
Andrew Johnson
7778c0c3ff Solaris & vxWorks 5.5.x fixes
Remove C++-isms.
Make internal routines static when duplicate names appear
in the epicsMutexTest.cpp code; on vxWorks and RTEMS all
test programs get linked into a single binary.
2012-11-20 15:55:53 -06:00
Ralph Lange
3f18327d2d libCom/osi: add tests for epicsSpin (based on epicsMutex tests) 2012-10-29 20:26:11 +01:00
Andrew Johnson
c23b907eee Reduce the duration of epicsMessageQueueTest to 60 seconds. 2012-07-24 11:29:31 -05:00
Andrew Johnson
c6aab2390c More fixes for Cygwin builds. 2012-07-20 17:50:59 -05:00
Andrew Johnson
64c9d7a32a Many tweaks to build on Windows.
There might be some more to come since I'm not committing
this from my Win32 system.
2012-07-17 14:33:31 -05:00
Andrew Johnson
62727dcba6 Clean up warnings from gcc 4.6.3 2012-07-07 15:54:31 -05:00
Andrew Johnson
3bfc6dcf64 errlog in tests
Take eltc(0) out of testPlan() and explicitly add it to those tests
that should suppress expected errlog output.
2012-07-06 17:47:56 -05:00
Andrew Johnson
0597f9c1c8 libCom: Fixed issues with thread-hooks. 2012-07-06 16:33:10 -05:00
Andrew Johnson
004826e67a Clean up some warnings. 2012-07-06 14:26:20 -05:00
Andrew Johnson
dda5e60250 libCom/test: Rename test harness as "libComTestHarness" 2012-07-06 14:23:03 -05:00
Andrew Johnson
a942295ead libCom/calc: Support 0x literals as epicsUInt32
Also use epicsInt32 for all integer calculations.
2012-07-06 14:17:51 -05:00
Andrew Johnson
f9bb1ef542 Fix vxWorks build issues from thread-hooks merge. 2012-07-05 13:39:00 -05:00
Andrew Johnson
a857f7a5ed Merged Ralph's thread-hooks branch.
Minor modifications to fix the vxWorks epicsThreadInit() and
rename some functions.
2012-07-04 13:28:55 -05:00
Ralph Lange
7b47cad8e4 libCom/osi: Clean up epicsThreadHooks API
- remove exit hooks completely
- remove non-public functions fom header files
- add test for epicsThreadMap
- fix bugs in RTEMS and vxWorks implementation of epicsThreadMap
2012-07-03 14:38:12 +02:00
Ralph Lange
da91893ec2 libCom/test: Add test for epicsThreadHooks 2012-07-02 18:18:54 +02:00
Andrew Johnson
da9982f875 libCom: Fix unsigned overflow limits in epicsParse*
The strtoul() routine accepts negative numbers.  This fix
ensures we handle them properly, and adds suitable tests.

Also fix the test for 1e300, in case the compiler gives a
slightly different literal constant than strtod() returns.
2012-06-30 15:34:29 -05:00
Andrew Johnson
fb61234431 Change the epicsParse APIs to return a units pointer.
This lets us use epicsParseDouble() for scan rate parsing.

Ensure the scanOnce thread is a higher priority than the fastest
periodic scan thread, irrespective of how many threads there are.
2012-06-29 14:41:35 -05:00
Andrew Johnson
6595ff9518 Clean up some compiler warnings from gcc 4.6 2012-06-26 00:19:10 -05:00
Andrew Johnson
269fb01c63 libCom: Add routines for parsing strings into epicsTypes
Adds new routines for converting numeric strings into the
standard epicsInt8, epicsUInt8, epicsInt16, epicsUInt16,
epicsInt32 and epicsUInt32 types, along with Long, ULong,
Double and Float.  These all provide error checking and
detection of extraneous characters.  The epicsScanDouble
and epicsScanFloat routines originally in epicsStdlib.h
are replaced by macros that call the epicsParse routine,
and this also provides epicsScanLong and epicsScanULong
to match.

A test file is added to ensure conversions work properly
and report appropriate errors.  This file also checks the
native strtod() routine if not used to check whether the
epicsStrtod() code is required on this platform.
2012-06-22 14:06:52 -05:00
Andrew Johnson
c708bb1bac epicsTypes: Added epicsInt64 and epicsUInt64
With size checks for them in epicsTypesTest.
Also added static checks of type sizes there, since we can.
2012-06-08 16:28:31 -05:00
Andrew Johnson
24e2452bd4 libCom/test: epicsAtomic tests
Added C++ template instances, so this code loads on
a vxWorks 5.5.2 system.
2012-06-07 13:38:11 -05:00
Andrew Johnson
5b228618e1 Merged epicsStdioRedirect.h into epicsStdio.h 2012-05-03 12:19:34 -05:00
Andrew Johnson
09c313764e Merged changes from 3.14 branch
Includes all changes up to revno 12334 on 2012-04-04
2012-04-06 12:22:20 -05:00
Andrew Johnson
10e7bced84 libCom/test: epicsTimeTest reworked a bit
Report throw from first call to epicsTime::getCurrent().
Reorganized test order so a bad time provider doesn't stop
all tests from being run.  Also cleaned up a few extraneous
variables.
2012-03-06 12:54:54 -06:00
Andrew Johnson
df7fa22a15 libCom/test: Add more tests of the CALC engine
Some of the isnan(Inf) tests were failing on mingw.
This change doesn't fix them, it adds related examples.
2012-02-29 17:11:08 -06:00
Andrew Johnson
bf965cc59c Merged changes from 3.14 branch.
Includes all changes up to rev 12323 on 2012-02-20.
2012-02-20 10:01:04 -06:00
Andrew Johnson
6f9f5498b4 libCom/test: Add diagnostic to epicsStdioTest on vxWorks
This test fails if the cwd is not writable, but on vxWorks the
fault appears at the fclose() not the fopen() line. The code
now detects this and tells the user what's probably wrong.
2012-02-03 16:12:06 -06:00
Jeff Hill
d8f7c3731d fixed various archaic sun pro build failures repoted by Dirk 2011-12-12 16:10:24 -07:00
Andrew Johnson
ab4376c54a Merge 3.14 changes up to 3.14.12.2-pre1 release 2011-11-14 17:42:50 -06:00
Andrew Johnson
b36b07db9e Clean up some compiler warnings reported by J. Lewis Muir. 2011-11-07 11:58:09 -06:00
Andrew Johnson
0b92d61a14 libCom/test: Added epicsTypesTest, checks type sizes. 2011-10-28 15:19:54 -05:00
unknown
4fa6f0556c fixed 64 bit compiler warnings 2011-09-12 15:44:52 -06:00
Andrew Johnson
dfb8c8ed2b Merged the rebased-atomics branch.
There are still quite a lot of warnings that need cleaning
up when compiling epicsAtomicTest.cpp on a 64-bit system.
2011-09-09 18:09:48 -05:00
Andrew Johnson
8e028f0f3d libCom/test: errlog test needs -lsocket on Solaris 2011-09-07 10:05:42 -05:00
Michael Davidsaver
2714ff703b Fix source reorg issues from Windows
* fix libCom exports for things which used to be built differently
* logserver needs winsock
* errlog prefix: fix warnings on win32
* fix dll imports in ioc/db
2011-08-30 18:09:11 -05:00
Jeff Hill
43fa23bba6 fixed vxWorks name for epicsAtomicTest 2011-08-30 10:49:52 -06:00
unknown
f0afcef02e o changed to more generic implementation to reduce the code size
o changed name, OSD_ATOMIC_INLINE to EPICS_ATOMIC_INLINE
o changed supported data types, unsigned removed and int added (per reveiw at codeathon)
o added add/subtract functions (per reveiw at codeathon)
o now presuming that __sync_synchronize available all gcc 4  mingw does not provide windows mem barrier)
o consolodated on one implemention for Microsoft invarient of cmplr intrinisic or win32 by using macros to config a shared header file
o improved doc in epicsAtomic.h
o added overloaded c++ interface in namespace epics :: atomic to epicsAtomic.h
o added epicsAtomicReadMemoryBarrier and epicsAtomicWriteMemoryBarrier interface to epicsAtomic.h
o changed the implementation so that each of the functions can be individually specified for a particular compiler, os, or in the generic implementation (this is accomplished with macros)
o modified the functional and performance test so that they are based on templates so we can easily support new data types
o modified performance tests to repeat function calls and measure performance using a template
2011-08-29 19:02:41 -06:00
Andrew Johnson
e15e42cff3 Merged Murali Shankar's iocLogPrefix changes.
Adjusted a few things during the merge.
2011-08-25 18:17:09 -05:00
Murali Shankar
c12f6808f1 Added a couple of units tests for iocLogPrefix 2011-08-24 11:25:06 -07:00
Andrew Johnson
712bb052ef Merged the epicsEvent-api branch.
Modified epicsEventTest.cpp to use the new names.
2011-08-23 18:19:55 -05:00
Jeff Hill
bd1b1479f4 o no longer need to define OSD_ATOMIC_GCC
o removed function
epicsAtomicTestAndSetUIntT
o added new functions
epicsAtomicSetPtrT
epicsAtomicGetPtrT
epicsAtomicCmpAndSwapUIntT
epicsAtomicCmpAndSwapPtrT
o changed msvc intrinsics to define memory fence
o fixed mutex synchronized version so that its slow, but correct if the c++ compiler doesnt synchronized local scope static initialization
o changed most of the set/get methods to use memory barriers instead of some other primitive
o added additional tests
2011-08-15 17:00:01 -06:00
Jeff Hill
c872c44668 added epicsAtomicGetUIntT for completeness 2011-08-12 10:06:09 -06:00
Jeff Hill
9e60e923e7 redo change reversed by merge 2011-08-08 18:38:39 -06:00
Jeff Hill
092e161485 o fixed compile errors in epicsAtomicOSD.h (I didnt have the proper version of solaris to test)
o fixed darwin compile errors (I dont have access to darwin)
2011-08-08 17:54:43 -06:00
Jeff Hill
b051875f22 changed test iterations to accomodate old systems 2011-08-05 11:14:37 -06:00
Jeff Hill
747a59fd7f o added epicsAtomic implementation including compiler and os specific files
o added functionality and performance testing
2011-08-05 09:13:38 -06:00
Jeff Hill
fa55316272 o added CMPL_CLASD definition to CONFIG.gnuCommon, CONFIG.solarisCommon.solarisCommon, configure/os/CONFIG.win32-x86.win32-x86
o added CMPLR_SRC_DIRS to ALL_SRC_DIRS, and added compiler/$CMPLR_CLASS) to INSTALL_INCLUDES in CONFIG_COMMON
o added additional compiler specific rule deciding where things are installed to  in CONFIG_COMMON
o added compiler specific include install to RULES_BUILD
o changed configure/os/CONFIG.linux-x86.linux-x86 to specify minimum arch is 586 (pentium circa 1995)
o changed configure/os/CONFIG.win32-x86-cygwin.win32-x86-cygwin to specify minimum arch is 586 (pentium circa 1995)
o added epicsAtoimic facility to libCom/Makefile
o added testing and performance measurement to  libCom/test/Makefile
2011-08-05 08:57:15 -06:00
Andrew Johnson
8418aa059a libCom/test: Suppress g++ build warnings from epicsCalcTest
Newer versions of gcc support #pragma GCC diagnostic
2011-04-07 17:25:02 -05:00
Andrew Johnson
038ac0cd38 Fix some build issues with old Solaris C++ compiler.
src/libCom/test/epicsExceptionTest.cpp:
  exThread needs a destructor

src/cas/generic/st/casStreamOS.cc:
  Can't use inline as armSend already called
2011-04-05 16:08:49 -05:00
Andrew Johnson
f4528ff5e1 libCom: Fix msgbufGetNode() in errlog.c
Systems that generate large numbers of errlog messages or have a slow
message listener could overwrite older messages in the message buffer
after the buffer wraps.  This also corrects and annotates the test
code to describe what's being checked.
2011-03-01 15:03:33 -06:00