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>
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: 09047d2bf6 ("pceplib: add json string option to subgroup counter")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
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>
`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>
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>