Commit graph

229 commits

Author SHA1 Message Date
Philip Prindeville
220ad29269 Cleanup for snmp tests 2023-10-03 23:41:47 +02:00
Philip Prindeville
3a2ffd4233 Run tests as appropriate group
Need to add "groupadd" and "groupdel" for Alpine. See:

https://github.com/gliderlabs/docker-alpine/issues/326
2023-10-03 23:41:47 +02:00
Philip Prindeville
62401b72d0 Always use variable substition for command
Can't do a sudo inside an expect so we run the expect inside the sudo.
2023-10-03 23:41:47 +02:00
Olof hagsand
2b6bd4fb5c test: cleaned up stty get/set in tests 2023-09-22 13:43:27 +02:00
Olof hagsand
246fd81f57 Test: updated perf tests that have been broken for some time 2023-05-23 15:24:42 +02:00
Olof hagsand
e7c9f3d075 Unified netconf input function
First for external use, later internal
2023-04-20 21:28:01 +02:00
Olof Hagsand
ecd60fbcfe
Merge pull request #418 from kernelkit/kkit
Misc. build fixes encountered when cross-compiling
2023-02-17 09:52:42 +01:00
Olof hagsand
204c704b3a Test: moved unsetting of vars to endtest 2023-02-15 13:59:21 +01:00
Joachim Wiberg
e36a4e3016 test: temporary fixes DROP BE BEFORE PUSH
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-14 15:39:23 +01:00
Olof hagsand
56f15aeefd SNMP mem tests: increase timeout for walk and table, use single snmp tools macro 2023-02-06 12:46:55 +01:00
Olof hagsand
8ebab16c4c Add proper error message if namespace not found in module-set header 2022-11-28 13:50:41 +01:00
jiangxiaoming
4839a633e3 add regex unicode match support 2022-11-23 11:35:41 +08:00
Olof hagsand
d84c529ff1 [Code formatting: Change indentation style to space](https://github.com/clicon/clixon/issues/379)
* Applies to all c/h/y/l/sh files and .editorconfig
2022-10-27 14:21:17 +02:00
Phil Heller
8abcda6f85 confirmed-commit fixes, tests
- fixed typo preventing evaluation of confirmed-commit logic in backend_startup
- fixed uninitialized variable warnings
- added details to CHANGELOG.MD
- added capabilities advertisement for confirmed-commit 1.0 and 1.1
- added xml hello message that uses only eom framing, for simplicity in asynch tests
- add stty restore after wait_restconf to fix console corruption in tests
- adjust test_confirmed_commit to drop perms and run as the invoking user.  This will require running user to have permissions on /usr/local/var/example
- added CLI tests
2022-10-03 21:47:09 -06:00
Olof hagsand
e3f3d772c7 Fixed: [message-id present on netconf app "hello"](https://github.com/clicon/clixon/issues/369) 2022-09-28 15:04:11 +02:00
Olof hagsand
3b58d010a3 Test: expecteof_netconf use fix string grep, fix err funciton call-by-value 2022-09-19 14:58:16 +02:00
Olof hagsand
ddf01503c6 libressl requires -new to openssl commands, thanks krihal 2022-09-06 12:49:08 +02:00
Olof hagsand
5e2643c382 Test: remove testdir also if skip test 2022-09-03 13:07:26 +02:00
Olof hagsand
71fc85af0b restconf: removed try to reply on http on https error, fails on openssl 3
test: pipe background restconf to /dev/null
2022-09-02 19:44:53 +02:00
Olof hagsand
2eb9c6cda1 Refactored YANG min/max validation code, created new clixon_validate_minmax.[ch]
Added new recursive minmax check for non-presence containers
This makes validation checks stricter, including check of incoming RPCs
Renamed xml_yang_check_list_unique_minmax() to xml_yang_minmax_recurse()
Fixed again: [YANG min-elements within non-presence container does not work](https://github.com/clicon/clixon/issues/355)
2022-09-01 18:29:17 +02:00
Olof hagsand
7e783952eb Restconf callhome: Added YANG connection-type, test: added NACM 2022-08-12 15:05:18 +02:00
Olof hagsand
e724dd7f40 Test: Added detail env var to sum.sh, Changed make test to include detailed test 2022-07-21 09:08:18 +02:00
Olof hagsand
49d19b263c SNMP: Internal cache handling for rowstatus
Test: prefix SN=0 instead of CS=0 for override clixon_snmp start
2022-07-11 10:07:48 +02:00
Kristofer Hallin
ebf251455f Bugfix. 2022-06-26 11:30:29 +02:00
Kristofer Hallin
5962852e9f More table tests for IF-MIB. 2022-06-26 11:30:29 +02:00
Kristofer Hallin
5194514993 New type, Timeticks. 2022-06-26 11:30:29 +02:00
Kristofer Hallin
cb3aef450d More tests for ENTITY-MIB. 2022-06-26 11:29:40 +02:00
Olof hagsand
ef640772df SNMP Frontend, fix handling of snmpd down and memory leaks
If snmpd is down, clixon_snmp does not start
If snmpd stops, clixon_snmp quits
Mem leaks fixed
2022-06-26 11:29:40 +02:00
Kristofer Hallin
a3d0b74e4b Validate both numerical and lexical OIDs. 2022-06-26 11:29:40 +02:00
Kristofer Hallin
2e529290ea Added snmpbulkget. 2022-06-26 11:29:40 +02:00
Kristofer Hallin
44d7d898bb snmpset tests re-written. 2022-06-26 11:29:40 +02:00
Kristofer Hallin
9be8cc51b3 Moved generic SNMP functions to lib.sh 2022-06-26 11:29:40 +02:00
Olof hagsand
eb8d0c0b3a SNMP frontend: added -z zap command-line option and pid-file exclusive check, fixed mem check 2022-06-26 11:28:42 +02:00
Olof hagsand
42f21a309a SNMP frontend: conflict typos, snmp pidfile 2022-06-26 11:28:42 +02:00
Olof hagsand
62a32faf9c SNMP frontend. New snmp_lib.[ch] and rearranged code into lib
Test: renamed WITH_SNMP -> ENABLE_SNMP
2022-06-26 11:28:42 +02:00
Kristofer Hallin
bbcea8b780 Don't rely on the pid-file to see if snmpd is running or not. 2022-06-26 11:28:42 +02:00
Olof hagsand
214b7cc0c7 SNMP frontend test changes
Added a CS variable, set to 0 if you started clixon_snmp yourself (eg in gdb)
Also added BE (backend) with the same purpose for backend
2022-06-26 11:28:42 +02:00
Kristofer Hallin
5a09dcbf13 Change dockerfiles and start scripts to install Net-SNMP, configure snmpd properly
and make sure it is started. This is needed for the SNMP tests (test_snm*) to run properly.
Since we can't rely on systemd in Alpine we start snmpd from the startsystem-scripts.
2022-06-26 11:28:42 +02:00
Olof hagsand
df687f7180 Clixon SNMP frontend
Added two new config options to clixon-config.yang: `CLICON_HTTP_DATA_ROOT`
Added new files: apps/snmp/snmp_mib_yang.[ch] for generic MIB/YANG handling
Test: killall quiet
Test: added specific MIB for generic code: <CLICON_SNMP_MIB>NET-SNMP-EXAMPLES-MIB</CLICON_SNMP_MIB>
2022-06-26 11:28:42 +02:00
Kristofer Hallin
ee06652e86 SNMP tests: Don't start snmpd, check if the system have snmpd started otherwise present instructions for how to configure and start it. 2022-06-26 11:28:42 +02:00
Kristofer Hallin
366b1cb42f Valgrind tests for clixon_snmp. 2022-06-26 11:27:54 +02:00
Olof hagsand
28514c6750 Clixon SNMP frontend update
* Integration of testhandler.c gives proper callback handling
* YANG `clixon-config@2022-03-21.yang` changes:
    * Added option:
      * `CLICON_SNMP_AGENT_SOCK`
2022-06-26 11:27:54 +02:00
Olof hagsand
33c77c8a09 Cleanup, debug stmts, diff vars and obsolete compile options 2022-06-23 15:40:47 +02:00
Olof hagsand
87c65c3541 Fixed: [RPC edit-config payloads are not fully validated](https://github.com/clicon/clixon/issues/337) 2022-06-20 15:08:50 +02:00
Olof hagsand
7065d6f760 Test: restconf CN variable, strip curl newline
Fixed a few compile warnings
2022-05-12 09:40:12 +02:00
Olof hagsand
28bd146e5c Added clixon_netconf command-line option -0and changed -H to -1
* `-0` means dont send hello, but fix netconf base version to 0 and use EOM framing
    * `-1` means dont send hello, but fix netconf base version to 1 and use chunked framing
2022-04-29 19:07:12 +02:00
Olof hagsand
84d88c8ad8 Restconf http-data server updates
Check data paths for .., ~ and soft links
Changed semantics of `CLICON_HTTP_DATA_PATH` and `_ROOT`
Change URI catch-all to 404 instead of 400
Fixed some memory leaks
2022-04-26 17:42:53 +02:00
Olof hagsand
e0100a6e3c Fixed: YANG if-feature in config file did not work, was always on
Test: unset test variables
2022-04-23 16:49:09 +02:00
Olof hagsand
404d05950a HTTP data server updates
Check of enable-http-data config option
HTTP/2 Return 400 bad request if no path match
Test: updated yang file revisions, extended restconf config with http-data
2022-04-22 15:23:38 +02:00
Olof hagsand
e1bec5f6dd Test: Ensured HVER/RCPROTO work as envvars to test and documented it 2022-04-20 15:16:17 +02:00