Commit Graph

332 Commits

Author SHA1 Message Date
Andrew Johnson
ef5688f8de libCom: Accept hex literals in CALC expressions
Code back-ported from the 3.15 branch.
2012-12-03 12:58:26 -06:00
Andrew Johnson
d622bbad05 Fix compiler warnings on linux-x86 2012-12-03 12:48:11 -06: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
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
b36b07db9e Clean up some compiler warnings reported by J. Lewis Muir. 2011-11-07 11:58:09 -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
Andrew Johnson
1e6464cdc4 libCom/test: Various improvements.
Made epicsThreadOnceTest more deterministic, replacing an
epicsThreadSleep() with epicsEventMustWait(), and added a diagnostic
message before running the thread recurse test.

Eric added a series of checks to epicsEventTest.cpp which ensure that
epicsEventSignal() only wakes one waiting thread.
2010-10-29 11:58:44 -05:00
Andrew Johnson
03539b05a4 libCom/test: run epicsMutexTest loops a fixed number of times.
Windows sometimes managed to run an extra loop before this change.
2010-10-26 11:45:13 -05:00
Andrew Johnson
881d13ac07 Merged the expand-calc-size branch.
This allows calc and calcout record expressions to be up to
79 characters long, and shortens the postfix buffer needed by
introducing integer literals.  Also removes the length limit
for access security CALC expressions.
2010-10-07 14:16:24 -05:00
Andrew Johnson
fbda9f3280 RCS keyword updates for Bazaar
Replaced $Id$ and $Header$ keywords with $Revision-Id$
Deleted $Log$ keywords and any log messages
2010-10-05 14:27:37 -05:00
Andrew Johnson
6d1cc23a7e libCom/test: Enhanced epicsCalcTest.
Added testArgs() function and tests, and more bad expression tests.
2010-10-04 13:39:02 -05:00
Andrew Johnson
641aa70eb1 libCom/test: Added Michael Davidsaver's unit tests for errlog 2010-09-30 14:36:30 -05:00
Andrew Johnson
48aabfc6ad libCom/test/epicsStringTest: %Zd isn't portable. 2010-09-29 17:44:10 -05:00
Andrew Johnson
a6a01e6822 Converted buckTest.c to use epicsTime.h instead of time.h
This should finally resolve the build conflict between RTEMS-uc5282
and Windows, and remove the build warning on vxWorks.
2010-08-17 17:53:43 -05:00
Jeff Hill
a3dd3e1a2f unistd.h isnt available on windows, and doesnt appear to be required by this code? 2010-08-16 17:34:39 -06:00
Andrew Johnson
cc95161af0 Merged base-tests branch from epics-base-testing team.
Modified testspec output to omit Tests: line when empty
Added testspec generation to src/db/test/Makefile.
2010-08-04 14:16:14 -05:00
Eric Norum
31326b8b9f Add RTEMS R4.10 support 2010-07-23 09:21:02 -07:00
Nick Rees
31790737e4 Added Andrews changes to RULES_BUILD to generate a hint file for the runner 2010-05-27 15:36:52 +01:00
Andrew Johnson
6790acf78f Fix for hang from Ron Sluiter. 2010-05-18 16:12:36 -05:00
Andrew Johnson
e9593e4b6c Run epicsMessageQueueTest last, since it takes 5 minutes. 2010-05-05 15:43:58 -05:00
Andrew Johnson
831f48e719 Fix the macLib buffer overflow issue, Bug 551909.
This is mostly Eric's patches, without the valend name change.
2010-05-04 15:43:20 -05:00
Andrew Johnson
b4be728539 cvtFastPerform measures performance, it doesn't do functional testing.
* Cleaned up some warning messages in it on darwin
* Removed it from the epicsRunLibComTests function.
2010-04-26 17:19:10 -05:00
Andrew Johnson
6ece3235c9 Added libCom/test code for epicsThreadOnce() implementations.
Also fixed subsystems that were not using epicsThreadOnce correctly.
2010-04-26 15:48:42 -05:00
Andrew Johnson
3b0036b389 Improve code readablity, add more numeric tests. 2010-03-09 10:49:21 -06:00
Andrew Johnson
534ca2c86e Make ellFree() a 1-argument macro, calls ellFree2() with free as freeFunc. 2009-08-28 18:34:38 +00:00
Jeff Hill
fa24d119dd use verify instead of assert (in tests) 2009-08-24 17:07:03 +00:00
Andrew Johnson
c28520bea6 Adjust test 66 so it doesn't fail if the gcc optimizer result gives -1 but
glibc returns +1.  Both are correct, gcc is following a newer standard.
2009-08-21 14:49:01 +00:00
Jeff Hill
d764e7d4df added "using namespace std" 2009-07-29 15:10:24 +00:00
W. Eric Norum
49ddec4294 Add cvtFastPerform to test harness. 2009-07-29 14:29:54 +00:00
Jeff Hill
844ed6345a test also numbers in -5 to 5 range 2009-07-23 17:32:33 +00:00
Jeff Hill
7315f02888 added cvtFastPerfotm test 2009-07-23 17:25:51 +00:00
Andrew Johnson
70bf066ba9 Added ELLNODE_INIT and ELLLIST_INIT macros. 2009-07-08 19:04:22 +00:00
Andrew Johnson
13f064fd7f Resource allocation checks missing 2009-04-23 22:28:44 +00:00
Andrew Johnson
31d149d8d9 Fixed 64 bit compiler warnings from Tom Palaia/MacOS. 2009-04-23 18:49:40 +00:00
Andrew Johnson
d545a8f04f Added test code, fixed bug found in epicsStrnEscapedFromRawSize(). 2009-04-10 19:58:34 +00:00
Andrew Johnson
23b3154fa8 Declare epicsEllTest before calling... 2009-04-09 20:38:49 +00:00
Andrew Johnson
f3d07ad12f ellLib changes: ANSIfication patch; moved test code out of ellLib.c into
its own unit test program in libCom/test; changed ellFree() to take a
function pointer for the free() routine, so it can be used on Windows;
modified epicsExit and dbBkpt to use it and pass in the free routine.
2009-04-09 16:51:05 +00:00
Andrew Johnson
134509a8ea Thread name may not be available during termination. 2009-04-08 22:39:27 +00:00
Andrew Johnson
5d5fd663ff Use epicsNAN and epicsINF. 2009-04-03 21:16:25 +00:00
W. Eric Norum
cc4b462f8c Reflect ring bytes changes. 2009-04-03 19:43:41 +00:00
Ralph Lange
7fccc59fe9 ANSIfication of stuff (mostly missing argument types in declarations) 2009-04-03 17:46:26 +00:00
Ralph Lange
2640c5fa07 Added epicsNAN and epicsINF to libCom/osi 2009-04-02 21:15:26 +00:00
Jeff Hill
9f5b1a11da removed some epicsSingleton related code that isnt in use 2009-02-10 22:51:53 +00:00
Andrew Johnson
a37105e0c7 Fixed buffer overflow in thread name. 2008-11-16 17:32:58 +00:00
Andrew Johnson
b3abcbb52e Don't fail if epicsSnprintf returns less than the buffer size needed. 2008-10-20 15:35:10 +00:00
W. Eric Norum
48257aec7c Fix race condition exposed by compilers with more agressive optimization.
Add test procedure for epicsRingBytes.
2008-10-07 11:05:41 +00:00