On Wed, Jul 27, 2022 at 06:18:30PM -0400, selva.n...@gmail.com wrote: > From: Selva Nair <selva.n...@gmail.com> > > v2: also fix building test_provider > - ifdefs in test_provider.c > - include integer.h for min_int as manage.h > may not always pull it in
FTR, buildbot is happy now with these changes. uncrustify is not, see below, but that can probably be fixed on apply. Acked-By: Frank Lichtenheld <fr...@lichtenheld.com> > diff --git a/tests/unit_tests/openvpn/test_provider.c > b/tests/unit_tests/openvpn/test_provider.c > index 47e7e395..d146af62 100644 > --- a/tests/unit_tests/openvpn/test_provider.c > +++ b/tests/unit_tests/openvpn/test_provider.c > @@ -30,6 +30,7 @@ > > #include "syshead.h" > #include "manage.h" > +#include "integer.h" > #include "xkey_common.h" > > #ifdef HAVE_XKEY_PROVIDER > @@ -127,7 +128,9 @@ init_test() > /* set default propq matching what we use in ssl_openssl.c */ > EVP_set_default_properties(NULL, "?provider!=ovpn.xkey"); > > +#ifdef ENABLE_MANAGEMENT > management = test_calloc(sizeof(*management), 1); > +#endif > } > > static void > @@ -272,6 +275,7 @@ done: > return sig; > } > > +#ifdef ENABLE_MANAGEMENT > /* Check loading of management external key and have sign callback exercised > * for RSA and EC keys with and without digest support in management client. > * Sha256 digest used for both cases with pss padding for RSA. > @@ -310,6 +314,7 @@ again: > EVP_PKEY_free(privkey); > } > } > +#endif uncrustify wants this --- "b/tests/unit_tests/openvpn/test_provider.c" 2022-07-29 11:34:20.067492200 +0200 +++ "a/tests/unit_tests/openvpn/test_provider.c" 2022-07-29 11:34:20.054239000 +0200 @@ -314,7 +314,7 @@ EVP_PKEY_free(privkey); } } -#endif +#endif /* ifdef ENABLE_MANAGEMENT */ /* helpers for testing generic key load and sign */ static int xkey_free_called; > /* helpers for testing generic key load and sign */ > static int xkey_free_called; > @@ -409,7 +414,9 @@ main(void) > > const struct CMUnitTest tests[] = { > cmocka_unit_test(xkey_provider_test_fetch), > +#ifdef ENABLE_MANAGEMENT > cmocka_unit_test(xkey_provider_test_mgmt_sign_cb), > +#endif > cmocka_unit_test(xkey_provider_test_generic_sign_cb), > }; -- Frank Lichtenheld _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel