summaryrefslogtreecommitdiffstats
path: root/pceplib/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #15215 from donaldsharp/pceplib_fixupDonatas Abraitis2024-01-257-115/+112
|\ | | | | Compile issue fixups
| * pceplib: Fix code not building properlyDonald Sharp2024-01-247-115/+112
| | | | | | | | | | | | | | | | | | | | The series of pceplib tests are not being run at the moment due to them not even building. Apparently adding the `libcunit1` debian package is enough to get them to build in our system. While weird, let's get this building at least for people that have this and `--enable-werror` turned on. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | pceplib: Fix some new coverity issues that trickled inDonald Sharp2024-01-252-24/+9
|/ | | | | | | | Several new issues came in because the coverity build system was not building the test infrastrucuture for the pceplib. Now we do, so we fixed it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* pceplib: fix compilation errorPhilippe Guibert2024-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The following compilation error happens, with pcep test files. > In file included from pceplib/test/pcep_utils_counters_test.c:31: > pceplib/test/pcep_utils_counters_test.c: In function 'test_create_subgroup_counter': > pceplib/test/pcep_utils_counters_test.c:127:25: error: too few arguments to function 'create_subgroup_counter' > 127 | CU_ASSERT_FALSE(create_subgroup_counter(subgroup, counter_id + 1, > | ^~~~~~~~~~~~~~~~~~~~~~~ > In file included from pceplib/test/pcep_utils_counters_test.c:33: > ./pceplib/pcep_utils_counters.h:163:6: note: declared here > 163 | bool create_subgroup_counter(struct counters_subgroup *subgroup, > | ^~~~~~~~~~~~~~~~~~~~~~~ > Makefile:10948: recipe for target 'pceplib/test/pceplib_test_pcep_utils_tests-pcep_utils_counters_test.o' failed > make[3]: *** [pceplib/test/pceplib_test_pcep_utils_tests-pcep_utils_counters_test.o] Error 1 > make[3]: *** Waiting for unfinished jobs.... There is a missing parameter. Fixes: 09047d2bf614 ("pceplib: add json string option to subgroup counter") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* pceplib: add json string option to subgroup counterPhilippe Guibert2024-01-181-11/+13
| | | | | | | | | | | | | | The created counters in pceplib library are structures with a string attribute which is used for further display. This string information is not formatted for json output. Add a second option in the create_subgroup_counter() creation API to provide the json attribute output. Create a json naming compatible with caml format for each subgroup counter used. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-0942-546/+42
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: Fix doesnt spelling mistakesDonald Sharp2022-05-071-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* pceplib: Fix uninited data in test vehicleDonald Sharp2022-02-221-1/+1
| | | | | | Coverity SA found this. Fix Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* pceplib: fix style issuesQuentin Young2021-12-063-34/+30
| | | | | | | | | | run clang-format run clang-format run clang-format run clang-format run clang-format Signed-off-by: Quentin Young <qlyoung@nvidia.com>
* tests: clean up temp files in libpcep testsMark Stapp2021-11-022-13/+53
| | | | | | Clean up temp files used by some libpcep unit tests. Signed-off-by: Mark Stapp <mstapp@nvidia.com>
* pceplib: Extract fields needed for PcInitiated with Cisco pce. (1/4)Javier Garcia2021-06-221-2/+2
| | | | | | | | | 1.- Unknown/non-standard tlv where cisco sends BSID. 2.- Non-standard Vendor Info object where cisco sends color. Co-authored-by: Javier Garcia <javier.garcia@voltanet.io> Signed-off-by: Sebastien Merle <sebastien@netdef.org> Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
* pceplib: Clean scan-build static analyzer messages.Javier Garcia2021-05-0513-0/+188
| | | | Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
* *: make sure `config.h` or `zebra.h` is firstDavid Lamparter2021-04-2323-0/+92
| | | | | | | | | | | | `config.h` has all the defines from autoconf, which may include things that switch behavior of other included headers (e.g. _GNU_SOURCE enabling prototypes for additional functions.) So, the first include in any `.c` file must be either `config.h` (with the appropriate guard) or `zebra.h` (which includes `config.h` first thing.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: properly split CFLAGS from AC_CFLAGSDavid Lamparter2021-04-211-2/+2
| | | | | | | | `CFLAGS` is a "user variable", not intended to be controlled by configure itself. Let's put all the "important" stuff in AC_CFLAGS and only leave debug/optimization controls in CFLAGS. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pceplib: add missing endian.h and config.hDavid Lamparter2021-04-091-0/+9
| | | | | | | | | | | | | endian.h supplies be*toh() and htobe*() functions. This fixes the build on musl libc. On other systems it seems endian.h comes in transitively from some other header. (Also, all .c files should have config.h or zebra.h as the first include, even if it works without that it's b0rked and only works due to luck.) Tested-by: Lucian Cristian <lucian.cristian@gmail.com> Signed-off-by: David Lamparter <equinox@diac24.net>
* pceplib: Fixing coverity messages.Javier Garcia2021-03-205-4/+105
| | | | Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
* pceplib: Integrate pcelib into frrJavier Garcia2021-03-0550-0/+9395
Signed-off-by: Brady Johnson <brady@voltanet.io> Co-authored-by: Javier Garcia <javier.garcia@voltanet.io> Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>