Commit Graph

132 Commits

Author SHA1 Message Date
90a727c901 Fix spelling errors
Most errors found with:

codespell -L cach,thst,odly,aslo,parm,parms,inpu,ges,prset,pevent,ptd,pring,valu,noo,noe,ned,inout,ro,siz,froms,nd,fo,singl,sart,multy,tthe,allong,ment,inate,nodel,tring,alse,ture,thi,wille,numer

Some more manually found (its -> it's)

c++20: Do not use apostrophe (e.g. can't) in unquoted #error message
2025-12-01 19:00:04 -08:00
Michael Davidsaver
45e3e58a1f asLib: fix generic lexer/parser 2025-11-23 14:03:47 -08:00
george-mcintyre
9b532540bf Introduce Future Proofing to ACF parsing.
- Allow ACF files to contain sections that are unsupported
- introduce a pragma disable-strict-parsing to disable strict parsing and allow files to be accepted

Add tests for future proof parser functionaluty

Expanded tests for Access Security configurations to validate parsing behaviors for unsupported elements. Added detailed cases covering invalid formats, unsupported modifications, and acceptable configurations while maintaining future-proofing and backward compatibility assurances.

Refactor parser to handle generic items and floating-point tokens

Replaced "unsupported elements" with a more flexible "generic items" mechanism to enhance parser extensibility. Added support for floating-point numbers in parsing rules. Updated tests and rules to reflect these changes, ensuring better handling of nested and unknown configurations.

Add warnings for unsupported ACF elements and update tests

Introduced `yywarn` to log warnings for unsupported ACF elements, rule permissions, and conditions in `asLib.y`. Updated test configuration to replace generic placeholders with more descriptive names. Adjusted test cases and reduced the test plan count to reflect the changes.

Remove unused strictParsing logic and improve error handling.

Removed strictParsing variable and related code as it was no longer in use. Enhanced error messaging and parsing logic for handling unsupported elements. Updated test cases for better clarity and expanded coverage of edge cases.

Enhance ASLib parsing with Int64/Float64 support.

Updated ASLib to utilize 64-bit integers and floats for improved parsing precision. Replaced legacy parsing methods with epics-friendly functions, improved error handling, and adjusted tests and grammar accordingly.

Refactor AS parser to separate non-rule keywords

Introduced a new `non_rule_keyword` type and moved `tokenASG` and `tokenRULE` under it for better logical grouping. This improves parser clarity and maintains a clean separation of keyword types.

Add rule-specific parsing for generic block elements

Introduce new rules for parsing rule-specific generic block elements and their names. This enhances the grammar to handle additional cases while maintaining memory management and error handling. Adjust references to use the new rule where applicable.

Refactor grammar rules in asLib.y to remove remaining shift/reduce conflict

Reorganize and refine grammar rules for handling generic elements, blocks, and lists. Simplifies the structure while introducing clearer distinctions between different constructs. This enhances maintainability and removes ambiguities in parsing.
2025-11-23 14:03:47 -08:00
Michael Davidsaver
9ce921f4fd fdManagerTest: quiet spurious failure
One iteration should be enough, but not always,
and not for all targets...
2025-08-28 11:16:56 -07:00
79624b72e5 extend calc, calcout and sub records and calc expressions to inputs A - U
To accomodate for the increased number of inputs, the size of CALC and OCAL
fields has been doubled to 160 characters.
2025-08-13 09:47:40 -05:00
Hinko Kocevar
f911f8ca3e fix Makefile test for including readlineTest 2025-06-20 16:01:44 -05:00
Hinko Kocevar
38376b95ea fix no. of test to be ran 2025-06-20 16:01:44 -05:00
Hinko Kocevar
f7f7443c4f remove the trailing newline in test file 2025-06-20 16:01:44 -05:00
Hinko Kocevar
f34dd44c29 add more tests 2025-06-20 16:01:44 -05:00
Hinko Kocevar
2e00d068d3 add multiline-input.txt and multiline-expect.txt to TESTFILES 2025-06-20 16:01:44 -05:00
Hinko Kocevar
7449a947ed check for fgets return value 2025-06-20 16:01:44 -05:00
Hinko Kocevar
a2be1c4f4f readline test
should work with READLINE and EPICS command line libraries
2025-06-20 16:01:44 -05:00
Jerzy Jamroz
7b6ec35110 test: afterIocRunningTest improved with help and pwd check 2025-06-20 15:42:47 -05:00
Jerzy Jamroz
70d5df05c7 refactor: atInit changed to afterIocRunning 2025-06-20 15:42:47 -05:00
Jerzy Jamroz
2fc955bf8a docs: add license header to atInitTest.cpp 2025-06-20 15:42:47 -05:00
Jerzy Jamroz
71e4b4ce2a test: add atInit test for arguments with spaces 2025-06-20 15:42:47 -05:00
Jerzy Jamroz
4fbe6daab7 refactor: testOkEnv instead of atInitTextEnv - better meaning. 2025-06-20 15:42:47 -05:00
Jerzy Jamroz
455978d9fb test: atInitTest added. 2025-06-20 15:42:47 -05:00
c9f80d82cc silence Codacy warning 2025-06-04 12:43:27 -05:00
Michael Davidsaver
93f6c4692f fdManagerTest: quiet codacy warnings 2025-06-04 12:43:27 -05:00
Michael Davidsaver
9731d07e68 add fdManager test 2025-06-04 12:43:27 -05:00
Michael Davidsaver
3daba7803b remove fdmgrTest
Not a unittest, and not functional.
2025-06-04 12:43:27 -05:00
Andrew Johnson
52d9ef1d20 Improve iocsh tests, update extected output 2025-06-04 09:52:44 -05:00
ee1a49045a support CROSS_COMPILER_RUNTESTS_ARCHS other than RTEMS 2025-03-05 10:00:44 -06:00
Érico Nogueira
1a9dc993c1 Fix gmtime messages in epicsTimeZoneTest. 2024-04-29 15:10:47 -07:00
Andrew Johnson
2e6fd505d2 Use epicsSnprintf() for old MSVC compilers 2023-12-14 11:31:36 -06:00
Andrew Johnson
5ecf7d18a8 Clean up Clang 15 sprintf() warnings in libcom and ca 2023-12-13 13:34:25 -06:00
AlexWells
6dec68554c iocsh: Add underline separator between help outputs
Also tweaks the overall format of the message a bit.
Add tests for new help output format
2023-10-22 17:42:36 -07:00
Jeremy Lorelli
60fa2d31da libCom: Fix buggy pointer dereference in postfix() 2023-09-26 09:52:13 -07:00
Emilio Perez
8c08c57247 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

error: statically allocate error symbol hash table

This will allow calling errSymbolAdd before errSymBld, therefore, a
function adding error symbols can now be run before iocInit or errlogInit

error: add a constant for the minimum module number

Make adding an identical error symbol not fail

A test case was also added which test that adding an error symbol
with same error code and message as one added before will not fail

Add locking to error symbol table

This protects the cases of:
- simultaneously adding and requesting of an error symbol
- simultaneously adding many error symbols

Update release notes regarding adding error symbols
2023-09-22 08:20:19 -07:00
Zainab Olalekan
7fd690e53e Fix libcom test failure on RTEMS 2023-08-28 14:17:00 +02:00
AlexWells
f488765631 Add tests for PR#310
Also add missing NULL/empty checks
2023-07-22 08:28:25 -07:00
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
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
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
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