From 043aa641ad4373e96fd748deb1e7fab3cb579a07 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 09:46:09 +0200 Subject: Merging upstream version 2.1.7. Signed-off-by: Daniel Baumann --- lib/common/tests/agents/Makefile.am | 12 ++++++------ lib/common/tests/agents/crm_parse_agent_spec_test.c | 18 +++++++++++++----- 2 files changed, 19 insertions(+), 11 deletions(-) (limited to 'lib/common/tests/agents') diff --git a/lib/common/tests/agents/Makefile.am b/lib/common/tests/agents/Makefile.am index 7a54b7d..b3837d7 100644 --- a/lib/common/tests/agents/Makefile.am +++ b/lib/common/tests/agents/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2020-2022 the Pacemaker project contributors +# Copyright 2020-2023 the Pacemaker project contributors # # The version control history for this file may have further details. # @@ -11,10 +11,10 @@ include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. -check_PROGRAMS = crm_generate_ra_key_test \ - crm_parse_agent_spec_test \ - pcmk__effective_rc_test \ - pcmk_get_ra_caps_test \ - pcmk_stonith_param_test +check_PROGRAMS = crm_generate_ra_key_test \ + crm_parse_agent_spec_test \ + pcmk__effective_rc_test \ + pcmk_get_ra_caps_test \ + pcmk_stonith_param_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/agents/crm_parse_agent_spec_test.c b/lib/common/tests/agents/crm_parse_agent_spec_test.c index cfd75f0..1d44459 100644 --- a/lib/common/tests/agents/crm_parse_agent_spec_test.c +++ b/lib/common/tests/agents/crm_parse_agent_spec_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2022 the Pacemaker project contributors + * Copyright 2022-2023 the Pacemaker project contributors * * The version control history for this file may have further details. * @@ -22,14 +22,22 @@ all_params_null(void **state) { static void no_prov_or_type(void **state) { - assert_int_equal(crm_parse_agent_spec("ocf", NULL, NULL, NULL), -EINVAL); - assert_int_equal(crm_parse_agent_spec("ocf:", NULL, NULL, NULL), -EINVAL); - assert_int_equal(crm_parse_agent_spec("ocf::", NULL, NULL, NULL), -EINVAL); + char *std = NULL; + char *prov = NULL; + char *ty = NULL; + + assert_int_equal(crm_parse_agent_spec("ocf", &std, &prov, &ty), -EINVAL); + assert_int_equal(crm_parse_agent_spec("ocf:", &std, &prov, &ty), -EINVAL); + assert_int_equal(crm_parse_agent_spec("ocf::", &std, &prov, &ty), -EINVAL); } static void no_type(void **state) { - assert_int_equal(crm_parse_agent_spec("ocf:pacemaker:", NULL, NULL, NULL), -EINVAL); + char *std = NULL; + char *prov = NULL; + char *ty = NULL; + + assert_int_equal(crm_parse_agent_spec("ocf:pacemaker:", &std, &prov, &ty), -EINVAL); } static void -- cgit v1.2.3