Commit Graph

123 Commits

Author SHA1 Message Date
Emilio Perez 0cd56fa40b Allow adding error symbols after early initialization
This was acomplished by making errSymbolAdd add the error symbol directly
into the global hash table and removing errnumlist which is not needed
anymore.

Unit tests were added for checking the following cases:
- Adding a valid symbol and checking that it exists (fixed by this change)
- Getting an existing error symbol
- Getting a non existing error symbol
- Adding an invalid error symbol (fixed by this change)
- Adding an error symbol with a code that already
  exists (fixed by this change)

Therefore, issue #268 was fixed
2023-09-01 16:11:49 +02:00
zimoch 73f80cced9 Merge branch '7.0' into PSI-7.0 2023-08-21 14:14:16 +02:00
AlexWells f488765631 Add tests for PR#310
Also add missing NULL/empty checks
2023-07-22 08:28:25 -07:00
zimoch 5b058d7d27 Merge branch '7.0' into PSI-7.0 2023-06-22 16:36:32 +02:00
zimoch 912a82c0b5 replace deprecated decrementing volatile with atomic decrement 2023-05-01 09:03:52 -07:00
Michael Davidsaver 625c2ef159 epicsThreadPerform: time epicsThreadOnce() 2023-04-18 09:51:24 -05:00
zimoch 23511c4a53 restore VxWorks 5 compatibility 2023-02-15 17:01:11 +01:00
zimoch 5db310813f Merge branch '7.0' into PSI-7.0 2023-02-15 16:54:36 +01:00
Andrew Johnson fb742beae3 Fix epicsThreadOnceTest.c
Replace epicsThreadSleep() with proper thread synchronization.
The main thread was reading runCount without taking lock first.
Taking the lock before accessing doneCount might not be necessary
given the epicsEventMustWait(), but not 100% sure.
2023-01-06 15:24:56 -06:00
Michael Davidsaver 166267a32f ringPointerTest in thread 2022-12-20 20:12:04 -08:00
Michael Davidsaver 60128ee924 Com: separate iocsh argument splitting 2022-12-20 20:12:04 -08:00
Michael Davidsaver a6afef4850 calc: add FMOD 2022-12-20 20:11:44 -08:00
Michael Davidsaver bc9415bb10 epicsErrlogTest: osiSockAttach() 2022-11-15 10:07:26 -08:00
Andrew Johnson 5cef60a3e4 Clear unused var warning 2022-08-21 16:51:17 -05:00
Michael Davidsaver 6feaaebd75 test epicsStrtok_r 2022-08-20 11:47:41 -07:00
Michael Davidsaver 13bd6bac5f Com: rewrite errlog
Switch to double buffering to allow errlogThread
to unlock while printing.

Conflicts:
	modules/libcom/src/error/errlog.c
2022-08-03 09:18:20 +02:00
Michael Davidsaver 7cf2a1daca epicsThreadTest: check that joined threads disappear 2022-06-08 09:40:12 -07:00
Andrew Johnson 156945c458 YAJL: Handle truncated Unicode surrogates better 2021-11-25 13:27:35 -06:00
Andrew Johnson 631f514c7c Test vprintf() redirection, other tweaks 2021-11-22 15:52:25 -06:00
Michael Davidsaver 0c12b02d4f errlog strip ANSI escapes
Always strip for handlers, and conditionally
if stderr is not a TTY, or $TERM unset/empty.
2021-10-18 08:45:13 -07:00
Michael Davidsaver 29fa0621d7 Com: rewrite errlog
Switch to double buffering to allow errlogThread
to unlock while printing.
2021-10-18 08:45:13 -07:00
Andrew Johnson 3d09106b51 Merge 3.15 branch into 7.0 2021-09-17 11:44:04 -05:00
Michael Davidsaver e34b6c5c0c Fix spelling in comments
Should be non-functional, except for some error message strings.
2021-08-29 07:27:50 -07:00
zimoch ddad6e7b6f backward compatible incomplete ? CALC expression 2021-08-19 11:24:25 +02:00
Andrew Johnson 7c6d049698 Merge branch 'gcc-atomic-cleanup' into 7.0 2021-08-10 20:54:39 -05:00
Michael Davidsaver cb8c7998b6 epicsTime: rework
Re-implement around epicsTimeStamp (C API)
with class epicsTime becoming a wrapper.

Prefer epicsInt64 arithmetic.

Remove opaque struct l_fp (NTP time conversion)
2021-08-05 08:30:53 -07:00
Andrew Johnson 540a5c87d9 Adjust wording of classification descriptions 2021-08-02 18:26:44 -05:00
Michael Davidsaver 78d2f20fa8 Com: Adjust epicsAtomic conditionals for GCC
cf. https://bugs.launchpad.net/epics-base/+bug/1932118
2021-08-02 18:13:40 -05:00
zimoch 55536a13db revert several files back to upstream version 2021-07-19 15:36:29 +02:00
zimoch 66abb7116f Merge tag 'R7.0.6' into PSI-7.0
ANJ: Tagged for release

Conflicts:
	.ci
	configure/os/CONFIG_SITE.linux-x86.Common
	modules/libcom/src/misc/epicsString.h
	src/tools/makeTestfile.pl
2021-07-08 19:00:08 +02:00
Michael Davidsaver 710c50b5ed add initHookTest 2021-06-30 13:40:53 -07:00
Michael Davidsaver e2d3b9a246 osiSockTest: ignore large messages on WIN32 2021-06-30 13:40:43 -07:00
zimoch b777233efb Support glob pattern for epicsEnvShow
Add epicsStrnGlobMatch with tests
2021-05-19 12:11:06 -07:00
Torsten Bögershausen dc03d519fb Proper CRLF handling
Add proper CLRF-LF rules to .gitattributes.
Renormalize the bat files to LF in the repo and CRLF on disk.

Remove executable bit of files which shouldn't have it set
2021-05-05 08:34:05 -07:00
zimoch 605aff2461 tests for epicsStrnGlobMatch added 2021-05-03 14:39:24 +02:00
zimoch dcc6a36bf7 Merge commit '235f8ed2fb85270a1b9edddbff6a1c5b10f484b9' into PSI-7.0
Conflicts:
	.ci
2021-05-03 14:02:42 +02:00
Michael Davidsaver 1bd041745b epicsEnvTest: ensure epicsEnvSet copies argument 2021-03-29 10:55:30 -07:00
zimoch f25f067e9c Merge branch '7.0' into PSI-7.0
Conflicts:
	modules/database/test/std/link/Makefile
	modules/libcom/src/osi/os/posix/osdMutex.c
	modules/libcom/src/osi/os/vxWorks/osdThread.h
2021-03-24 14:45:02 +01:00
Michael Davidsaver f30e9533c4 epicsLoadTest use INSTALL_LOCATION 2021-03-11 09:30:28 -08:00
zimoch 1a0de528e1 Merge tag 'R7.0.5' into PSI-7.0
ANJ: Tagged for release

Conflicts:
	configure/os/CONFIG_SITE.Common.linuxCommon
2021-03-02 09:18:43 +01:00
Michael Davidsaver 745c3f552e Com: add epicsStrSimilarity() 2021-02-08 09:22:27 -08:00
Andrew Johnson 99852c6504 Merge JSON5 support into 7.0 2021-01-05 21:39:15 -06:00
Michael Davidsaver dc99d63df8 C89 compat
Present for Dirk
2020-11-20 17:25:27 -08:00
Michael Davidsaver d24a297304 osiSockTest: fix timeout 2020-11-19 13:07:05 -08:00
Michael Davidsaver d83e3b5de1 osiSockTest: probe for !EPERM 2020-11-18 10:54:44 -08:00
zimoch d795dd76a6 bugfix for older compilers: have all declarations before instructions 2020-11-16 17:58:01 +01:00
zimoch 1db2cba81d Merge commit '10d472202dc2bf1fa5c569d2a14d460e95030564' into PSI-7.0
This is before PVA is modified
2020-11-16 17:06:22 +01:00
Andrew Johnson c1152f94fd epicsString: Remove support for Octal character escapes \nnn
These changes to the functions epicsStrnRawFromEscaped() and
epicsStrnEscapedFromRaw() were prompted by the addition of JSON5
support to the dbStatic parser.

 * \0 now represents a zero byte
 * Unprintable characters are now escaped in hex

Tests for the octal escapes have been removed.
2020-08-09 00:33:07 -05:00
Andrew Johnson 8c9e42d15e Fixed the response of epicsStrnRawFromEscaped() to numeric overflows
\x only takes 2 hex digits now, and the octal parser ignores a 3rd
digit if it would take the value over 0xff:
    "\400"  => ' ' then '0'
    "\x088" => '\b' then '8'

With additional tests.
2020-08-09 00:33:07 -05:00
Andrew Johnson b0d78921fd Final changes to YAJL for use in Base
* Bump the YAJL version number
* Define a HAS_JSON5 macro
* Set yajl_allow_json5 by default, fixing yajl_test and API comments
2020-08-09 00:33:07 -05:00