Commit Graph
894 Commits
Author SHA1 Message Date
Jeremy Lorelli 9e4b366ee8 libcom: Switch epicsMutexMustLock() to cantProceed() 2026-10-14 15:45:57 +02:00
Jeremy Lorelli c50b7e4a0b libcom: Switch epicsThreadMustCreate to cantProceed() 2026-10-14 15:45:56 +02:00
Michael Davidsaver cb75bf73c7 doc 2026-10-14 15:12:24 +02:00
Brendan Chandler 5c3dba706f Configure Static IP with RTEMS libbsd (#853)
* Add RTEMS libbsd static network config for motload nvram

setBootConfigFromNVRAM() now configures static networking via the
libbsd rtems_bsd_ifconfig() API when building against RTEMS with
libbsd.  It only uses static networking if it can find a configured IP
and netmask from GEV or the mot script boot parameters, otherwise it
falls back to DHCP.

Also note, NTP was part of setBootConfigFromNVRAM() when using legacy
RTEMS networking, but is handled outside this function for LibBSD.  To
preserve the legacy behavior, setBootConfigFromNVRAM() still pulls out
NTP server info, but now stores it in an output parameter for outside
code to use.

* Wait for link to come up when starting RTEMS/libbsd/static IP

When configuring a static IP on RTEMS/libbsd, we need to intentionally
wait for the link to come up before continuing to configure ntp, etc.

* Separate common network setup from BSP specific implementations

All the BSP setBootConfigFromNVRAM() functions ultimately configured
the RTEMS networking the same way.  The common networking code
has been pulled out into a separate function now called from BSP specific
code.

All networking setup is now included and optionally used only
when the BSP sets the field appropriately.

This lets the setBootConfigFromNVRAM functions be independent of the
network stack, just focussing on collecting the configuration from each
BSP as appropriate.

* Fix unused function warnings for functions unused on certain BSPs

* Remove old comments about if MY_BOOTP

* Added release note entry

-- 
Co-authored-by: Brendan Chandler <bchandler@anl.gov>
2026-10-14 15:12:09 +02:00
Sang Woo Kim bff771ac60 RTEMS-posix: free the epicsEventOSD in epicsEventDestroy()
epicsEventCreate() mallocs the wrapper but epicsEventDestroy() only
destroys the embedded rtems_binary_semaphore, leaking one heap block
per event lifecycle on every RTEMS >= 5 build.
2026-10-14 15:12:08 +02:00
Andrew Johnson 4886eaade8 Add better tests of the ResetHighWaterMark API 2026-10-14 11:25:44 +02:00
Jacqueline GarrahanandClaude Opus 4.8 a5eddfcd63 epicsRingBytes: fix reversed operands in ResetHighWaterMark
The used-bytes count is nextPut - nextGet everywhere else in this file
(epicsRingBytesPut, epicsRingBytesUsedBytes), but
epicsRingBytesResetHighWaterMark computed nextGet - nextPut.  For a ring
holding u bytes it therefore stored size-u; since Put only raises the
mark, the high-water mark stayed permanently inflated and wrong.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-10-14 11:24:59 +02:00
Jacqueline GarrahanandClaude Opus 4.8 da3ee4fef6 iocsh: fix inverted parse test in 'on error wait <delay>'
epicsParseDouble returns 0 on success and non-zero on failure, but the
branches were swapped: a valid delay printed "Invalid 'on error wait'
delay" and the usage text, while an invalid delay was silently accepted
with timeout forced to 5.0.  Report the error on parse failure and accept
the value on success.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-10-14 11:19:42 +02:00
Jacqueline GarrahanandClaude Opus 4.8 5107e2de49 errlog: fix out-of-bounds read when resizing the print buffer
errlogBufResize copied the print buffer from &pvt.print->base (the
address of the char* field inside the buffer_t struct) instead of
pvt.print->base (the buffer it points to), reading bufSize bytes from an
~8-byte struct field.  Drop the stray & so it reads the actual buffer,
matching the adjacent log-buffer copy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-10-14 11:17:17 +02:00
rhong 2fdfb4cde0 Slow search_reply_udp in RTEMS IOCs (#836)
* Use malloc_free_space() instead of malloc_info( &info ) in osiSufficentSpaceInPool
2026-10-14 11:09:29 +02:00
Michael Davidsaver e564d85e62 asDump* quote UAG and HAG entries 2026-10-14 10:57:27 +02:00
Simon Rose 9972f8ab3a Refactor tests and add test that errlogInit() can be run more than once 2026-10-13 10:25:21 +02:00
Simon Rose 8e56569e41 Add error/warning ANSI prefixes to error/warning messages 2026-10-13 10:25:09 +02:00
Simon Rose 90c287fbaa Add unrelease for errloginit2 change 2026-10-13 10:24:53 +02:00
Simon Rose ca424832a7 Block resizes from listener callbacks 2026-10-13 10:24:41 +02:00
Simon Rose 2bb445a992 Lock buffer size changes while running thread 2026-10-13 10:24:24 +02:00
Simon Rose 9668255042 Call errlogClampConfig only a single time 2026-10-13 10:24:12 +02:00
Simon Rose 8999ee7a0b Move frees out of mutex lock 2026-10-13 10:23:57 +02:00
Simon Rose 2c12fdec86 Stop flushing the errorlog during init 2026-10-13 10:23:29 +02:00
Simon Rose b16f8cfd8d Change initial errlogprintfs to printfs
RTEMS performs a few early errlogPrintf calls. This initialises
the errlog buffers to some default values blocking certain tests
from re-initialising the error log later.
2026-10-13 10:23:16 +02:00
Simon Rose 9cdd14d47d Remove errlogBufResize in favour of allowing errlogInit[2] to be called repeatedly 2026-10-13 10:22:47 +02:00
Simon Rose 63b22565fc Add warning if errorlog configuration has been clamped 2026-10-13 10:22:36 +02:00
Simon Rose b86265e682 Make the maximum message size dependent on the buffer size 2026-10-13 10:22:25 +02:00
Simon Rose 0e0a815e7c Update the error log functionality to avoid losing writes 2026-10-13 10:22:15 +02:00
Simon Rose 9b835a1fdb Add command to show errlog buffer contents 2026-10-13 10:21:59 +02:00
Simon Rose d3ff8dca3f Add commandline utility to resize buffer after being initialised 2026-10-13 10:21:35 +02:00
Simon Rose 53a3e4b694 Modify errorlog initialisation to add separate default value 2026-10-13 10:20:50 +02:00
Michael Davidsaver 68ff68cb31 epicsStrPrintEscaped() operate on unterminated string
see 3a2d225682
see f488765631
2026-10-13 10:18:56 +02:00
Michael Davidsaver 267b56d495 doc 2026-10-13 10:17:03 +02:00
zimoch d6df659acf Merge commit '631c8831b942ee5533a2f7016085dcef52c2f3ba' into PSI-7.0
Merge latest 7.0 until before records are modified
2026-10-13 10:15:50 +02:00
zimoch 15ba5ed863 Merge branch '7.0' into PSI-7.0 2026-09-28 09:39:12 +02:00
Freddie Akeroyd 631c8831b9 Fix number of tests 2026-04-01 08:37:29 -07:00
Freddie Akeroyd acf53d31ee Add test case 2026-04-01 08:37:29 -07:00
Freddie Akeroyd fb09dc0df9 Fix memory overwrite in macParseDefns 2026-04-01 08:37:29 -07:00
Andrew Johnson 05c27e453c Color the keywords in macLib errors 2026-04-01 10:26:47 -05:00
Andrew Johnson 1c9ef94818 Fix the bug reported in #834, but behaves differently
Adds tests and checks for unterminated macros,
which are now reported but not expanded.
2026-04-01 10:26:47 -05:00
Evan Daykin 77a3b8110f use (s)rand() to generate RNDM calc values with a system clock nanosecond seed 2026-04-01 10:16:34 -05:00
Érico Nogueira 6ef94d744f Use deterministic timezones in epicsTimeZoneTest
The DST characteristics of the POSIX EST5EDT and CST6CDT timezones
depend on whether the implementation uses the built-in POSIX definition
or reads an updated version from the tzdata files, and for POSIX
timezones, there is no specified behavior [1].

To avoid any plaform-specific behavior, we can specify the desired DST
ourselves. We used the timezone values available in
configure/CONFIG_SITE_ENV, which already included DST information, and
means the tests are consistent with our own usage.

[1] https://www.openwall.com/lists/musl/2024/03/05/2
2026-04-01 10:13:56 -05:00
Michael Davidsaver e181517de1 readline history, clear before append
read_history() appends to the global history array.
Clear before each read to prevent duplication.
2026-04-01 10:01:54 -05:00
Michael Davidsaver 4dfd5c7694 skip readline interactive setup when not interactive 2026-04-01 10:01:54 -05:00
ronaldomercado 2d8a6f91a9 Use consistent language for string termination (#806)
Avoid hyphen, prefer space: "null terminated"
2026-03-18 10:45:25 -05:00
Michael Davidsaver d44ddf441a configure: ensure output file only updated on success
eg. After running "false > $@", the output file modification
time will be updated.  So a despite failure, a repeated
"make" will not re-run.

Handle this by accumulating output to "$@.tmp", then
move to $@ as a final step.
2026-02-27 16:17:53 +00:00
Andrew Johnson b5df3e002a Various non-functional fixes/changes
Fix EditorConfig failure in modules/libcom/RTEMS/epicsNtp.c
Add dbDefs to Sphinx API index, move devLib to libcom
Rename internal CA enum tag to fix Doxygen complaint
Set Clang's minimum MacOS version for aarch64 CPUs
2026-02-18 11:23:50 -06:00
zimoch db693d4930 enable trim_trailing_whitespace 2026-02-18 10:34:08 -06:00
zimoch cd36c03da4 Enforce consistent space indent style 2026-02-18 10:34:08 -06:00
zimoch 8c9dd71f6e Fix gcc warning 'stringop-truncation' 2026-02-18 10:06:26 -06:00
zimoch e66bb87909 document change in epicsThreadGetCPUs 2026-02-18 09:50:03 -06:00
zimoch 556de06ff2 avoid overreporting available CPUs 2026-02-18 09:50:03 -06:00
Bruce Hill 08c8f5fd1b Minor comment fix in libcom/src/env/RULES 2026-02-04 09:50:44 -06:00
zimoch b5f73d8200 Merge branch '7.0' into PSI-7.0 2026-01-27 15:17:04 +01:00