libamxs  0.6.0
Data Model Synchronization C API
test_amxs_sync_start.c
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** SPDX-License-Identifier: BSD-2-Clause-Patent
4 **
5 ** SPDX-FileCopyrightText: Copyright (c) 2023 SoftAtHome
6 **
7 ** Redistribution and use in source and binary forms, with or without modification,
8 ** are permitted provided that the following conditions are met:
9 **
10 ** 1. Redistributions of source code must retain the above copyright notice,
11 ** this list of conditions and the following disclaimer.
12 **
13 ** 2. Redistributions in binary form must reproduce the above copyright notice,
14 ** this list of conditions and the following disclaimer in the documentation
15 ** and/or other materials provided with the distribution.
16 **
17 ** Subject to the terms and conditions of this license, each copyright holder
18 ** and contributor hereby grants to those receiving rights under this license
19 ** a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
20 ** (except for failure to satisfy the conditions of this license) patent license
21 ** to make, have made, use, offer to sell, sell, import, and otherwise transfer
22 ** this software, where such license applies only to those patent claims, already
23 ** acquired or hereafter acquired, licensable by such copyright holder or contributor
24 ** that are necessarily infringed by:
25 **
26 ** (a) their Contribution(s) (the licensed copyrights of copyright holders and
27 ** non-copyrightable additions of contributors, in source or binary form) alone;
28 ** or
29 **
30 ** (b) combination of their Contribution(s) with the work of authorship to which
31 ** such Contribution(s) was added by such copyright holder or contributor, if,
32 ** at the time the Contribution is added, such addition causes such combination
33 ** to be necessarily infringed. The patent license shall not apply to any other
34 ** combinations which include the Contribution.
35 **
36 ** Except as expressly stated above, no rights or licenses from any copyright
37 ** holder or contributor is granted under this license, whether expressly, by
38 ** implication, estoppel or otherwise.
39 **
40 ** DISCLAIMER
41 **
42 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
43 ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
44 ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
45 ** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
46 ** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
47 ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
48 ** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
49 ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
50 ** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
51 ** USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
52 **
53 ****************************************************************************/
54 
55 #include <stdlib.h>
56 #include <stdarg.h>
57 #include <stddef.h>
58 #include <string.h>
59 #include <unistd.h>
60 #include <setjmp.h>
61 #include <cmocka.h>
62 
63 #include <amxc/amxc_variant.h>
64 #include <amxc/amxc_htable.h>
65 #include <amxc/amxc_lqueue.h>
66 
67 #include <amxp/amxp_signal.h>
68 #include <amxp/amxp_slot.h>
69 
70 #include <amxd/amxd_dm.h>
71 
72 #include <amxo/amxo.h>
73 
74 #include <amxs/amxs.h>
75 
76 #include <amxc/amxc_macros.h>
77 
78 #include "test_amxs_sync_start.h"
79 #include "dummy_be.h"
80 
81 static amxb_bus_ctx_t* bus_ctx = NULL;
82 
83 int test_amxs_sync_setup(UNUSED void** state) {
84  assert_int_equal(test_register_dummy_be(), 0);
85  assert_int_equal(amxb_connect(&bus_ctx, "dummy:/tmp/dummy.sock"), 0);
86  assert_int_equal(test_load_dummy_remote("a.odl"), 0);
87  assert_int_equal(test_load_dummy_remote("b.odl"), 0);
88 
89  return 0;
90 }
91 
92 int test_amxs_sync_teardown(UNUSED void** state) {
93  amxb_disconnect(bus_ctx);
94  amxb_free(&bus_ctx);
95  assert_int_equal(test_unregister_dummy_be(), 0);
96 
97  return 0;
98 }
99 
100 void test_amxs_sync_start_args(UNUSED void** state) {
101  amxs_sync_ctx_t* ctx = NULL;
102 
103  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
104  assert_int_not_equal(amxs_sync_ctx_start_sync(NULL), 0);
105  assert_int_not_equal(amxs_sync_ctx_start_sync(ctx), 0);
106  amxs_sync_ctx_delete(&ctx);
107 }
108 
109 void test_amxs_sync_stop_args(UNUSED void** state) {
110  amxs_sync_ctx_t* ctx = NULL;
111 
112  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
116  amxs_sync_ctx_delete(&ctx);
117 }
118 
119 void test_amxs_sync_start_param(UNUSED void** state) {
120  amxs_sync_ctx_t* ctx = NULL;
121 
122  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
123  assert_int_equal(amxs_sync_ctx_add_new_param(ctx, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
124  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
125  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 2);
127  amxs_sync_ctx_delete(&ctx);
128 
129  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT | AMXS_SYNC_INIT_B), 0);
130  assert_int_equal(amxs_sync_ctx_add_new_param(ctx, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
131  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
132  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 2);
134  amxs_sync_ctx_delete(&ctx);
135 
136  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", NULL, AMXS_SYNC_ONLY_A_TO_B), 0);
137  assert_int_equal(amxs_sync_ctx_add_new_param(ctx, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
138  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
139  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 1);
141  amxs_sync_ctx_delete(&ctx);
142 
143  assert_int_equal(amxs_sync_ctx_new(&ctx, NULL, "B.", AMXS_SYNC_ONLY_B_TO_A | AMXS_SYNC_INIT_B), 0);
144  assert_int_equal(amxs_sync_ctx_add_new_param(ctx, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
145  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
146  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 1);
148  amxs_sync_ctx_delete(&ctx);
149 
150  assert_int_equal(amxs_sync_ctx_new(&ctx, NULL, NULL, AMXS_SYNC_ONLY_B_TO_A | AMXS_SYNC_INIT_B), 3);
151  assert_null(ctx);
152 }
153 
154 void test_amxs_sync_start_object(UNUSED void** state) {
155  amxs_sync_ctx_t* ctx = NULL;
156  amxs_sync_object_t* object = NULL;
157 
158  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
159  assert_int_equal(amxs_sync_object_new(&object, "object_A.", "object_B.", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
160  assert_int_equal(amxs_sync_object_add_new_param(object, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
161  assert_int_equal(amxs_sync_ctx_add_object(ctx, object), 0);
162  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
163  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 4);
165  amxs_sync_ctx_delete(&ctx);
166 
167  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
168  assert_int_equal(amxs_sync_object_new(&object, "object_A.", "object_B.", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
169  assert_int_equal(amxs_sync_object_add_new_param(object, "param_A", "param_B", AMXS_SYNC_ONLY_A_TO_B, NULL, NULL, NULL), 0);
170  assert_int_equal(amxs_sync_ctx_add_object(ctx, object), 0);
171  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
172  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 3);
174  amxs_sync_ctx_delete(&ctx);
175 
176  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
177  assert_int_equal(amxs_sync_object_new(&object, "object_A.", "object_B.", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
178  assert_int_equal(amxs_sync_object_add_new_param(object, "param_A", "param_B", AMXS_SYNC_ONLY_B_TO_A | AMXS_SYNC_INIT_B, NULL, NULL, NULL), 0);
179  assert_int_equal(amxs_sync_ctx_add_object(ctx, object), 0);
180  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
181  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 3);
183  amxs_sync_ctx_delete(&ctx);
184 
185  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
186  assert_int_equal(amxs_sync_object_new(&object, "object_A.", "object_B.", AMXS_SYNC_ONLY_A_TO_B, NULL, NULL, NULL), 0);
187  assert_int_equal(amxs_sync_object_add_new_param(object, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
188  assert_int_equal(amxs_sync_ctx_add_object(ctx, object), 0);
189  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
190  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 2);
192  amxs_sync_ctx_delete(&ctx);
193 
194  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
195  assert_int_equal(amxs_sync_object_new(&object, "object_A.", "object_B.", AMXS_SYNC_ONLY_B_TO_A | AMXS_SYNC_INIT_B, NULL, NULL, NULL), 0);
196  assert_int_equal(amxs_sync_object_add_new_param(object, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
197  assert_int_equal(amxs_sync_ctx_add_object(ctx, object), 0);
198  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
199  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 2);
201  amxs_sync_ctx_delete(&ctx);
202 }
203 
204 void test_amxs_sync_start_template_object(UNUSED void** state) {
205  amxs_sync_ctx_t* ctx = NULL;
206  amxs_sync_object_t* object = NULL;
207 
208  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
209  assert_int_equal(amxs_sync_object_new(&object, "A_template.", "B_template.", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
210  assert_int_equal(amxs_sync_object_add_new_param(object, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
211  assert_int_equal(amxs_sync_ctx_add_object(ctx, object), 0);
212  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
213  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 4);
215  amxs_sync_ctx_delete(&ctx);
216 
217  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
218  assert_int_equal(amxs_sync_object_new(&object, "A_template.", "B_template.", AMXS_SYNC_ONLY_A_TO_B, NULL, NULL, NULL), 0);
219  assert_int_equal(amxs_sync_object_add_new_param(object, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
220  assert_int_equal(amxs_sync_ctx_add_object(ctx, object), 0);
221  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
222  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 2);
224  amxs_sync_ctx_delete(&ctx);
225 
226  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
227  assert_int_equal(amxs_sync_object_new(&object, "A_template.", "B_template.", AMXS_SYNC_ONLY_B_TO_A | AMXS_SYNC_INIT_B, NULL, NULL, NULL), 0);
228  assert_int_equal(amxs_sync_object_add_new_param(object, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
229  assert_int_equal(amxs_sync_ctx_add_object(ctx, object), 0);
230  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
231  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 2);
233  amxs_sync_ctx_delete(&ctx);
234 }
235 
236 void test_amxs_sync_start_multiple_objects(UNUSED void** state) {
237  amxs_sync_ctx_t* ctx = NULL;
238  amxs_sync_object_t* object = NULL;
239 
240  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
241  assert_int_equal(amxs_sync_ctx_add_new_param(ctx, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
242  assert_int_equal(amxs_sync_object_new(&object, "A_template.", "B_template.", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
243  assert_int_equal(amxs_sync_object_add_new_param(object, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
244  assert_int_equal(amxs_sync_ctx_add_object(ctx, object), 0);
245  assert_int_equal(amxs_sync_object_new(&object, "object_A.", "object_B.", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
246  assert_int_equal(amxs_sync_object_add_new_param(object, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
247  assert_int_equal(amxs_sync_ctx_add_object(ctx, object), 0);
248  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
249  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 10);
251  amxs_sync_ctx_delete(&ctx);
252 }
253 
255  amxs_sync_ctx_t* ctx = NULL;
256 
257  assert_int_equal(amxs_sync_ctx_new(&ctx,
258  "A.A_template.[param_A == 1337].",
259  "B.B_template.[param_B == 42].",
261  0);
262  assert_int_equal(amxs_sync_ctx_add_new_param(ctx, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
263  assert_int_equal(amxs_sync_ctx_start_sync(ctx), 0);
264  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 2);
265  assert_string_equal(ctx->a, "A.A_template.1.");
266  assert_string_equal(ctx->b, "B.B_template.1.");
268  amxs_sync_ctx_delete(&ctx);
269 
270  assert_int_equal(amxs_sync_ctx_new(&ctx,
271  "A.A_template.[nonexistent == 1337].",
272  "B.B_template.[param_B == 42].",
274  0);
275  assert_int_equal(amxs_sync_ctx_add_new_param(ctx, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
277  assert_int_equal(amxc_llist_size(&ctx->subscriptions), 0);
279  amxs_sync_ctx_delete(&ctx);
280 }
281 
282 void test_amxs_sync_start_copied(UNUSED void** state) {
283  amxs_sync_ctx_t* ctx = NULL;
284  amxs_sync_ctx_t* copy_ctx = NULL;
285  amxs_sync_object_t* object = NULL;
286 
287  assert_int_equal(amxs_sync_ctx_new(&ctx, "A.", "B.", AMXS_SYNC_DEFAULT), 0);
288  assert_int_equal(amxs_sync_ctx_add_new_param(ctx, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
289  assert_int_equal(amxs_sync_object_new(&object, "A_template.", "B_template.", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
290  assert_int_equal(amxs_sync_object_add_new_param(object, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
291  assert_int_equal(amxs_sync_ctx_add_object(ctx, object), 0);
292  assert_int_equal(amxs_sync_object_new(&object, "object_A.", "object_B.", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
293  assert_int_equal(amxs_sync_object_add_new_param(object, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
294  assert_int_equal(amxs_sync_ctx_add_object(ctx, object), 0);
295 
296  assert_int_equal(amxs_sync_ctx_copy(&copy_ctx, ctx, NULL), 0);
297 
298  assert_int_equal(amxs_sync_ctx_start_sync(copy_ctx), 0);
299  assert_true(amxs_sync_ctx_is_started(copy_ctx));
300  amxs_sync_ctx_stop_sync(copy_ctx);
301  assert_false(amxs_sync_ctx_is_started(copy_ctx));
302 
303  amxs_sync_ctx_delete(&ctx);
304  amxs_sync_ctx_delete(&copy_ctx);
305 }
306 
307 void test_amxs_sync_start_copied_change_paths(UNUSED void** state) {
308  amxs_sync_ctx_t* ctx = NULL;
309  amxs_sync_ctx_t* copy_ctx = NULL;
310 
311  assert_int_equal(amxs_sync_ctx_new(&ctx,
312  "A.A_template.{i}.",
313  "B.B_template.{i}.",
315  0);
316  assert_int_equal(amxs_sync_ctx_add_new_param(ctx, "param_A", "param_B", AMXS_SYNC_DEFAULT, NULL, NULL, NULL), 0);
317 
318  assert_int_equal(amxs_sync_ctx_copy(&copy_ctx, ctx, NULL), 0);
319  assert_int_equal(amxs_sync_ctx_set_paths(copy_ctx,
320  "A.A_template.[param_A == 1337].",
321  "B.B_template.[param_B == 42]."), 0);
322 
323  assert_int_equal(amxs_sync_ctx_start_sync(copy_ctx), 0);
324  assert_true(amxs_sync_ctx_is_started(copy_ctx));
325  amxs_sync_ctx_stop_sync(copy_ctx);
326  assert_false(amxs_sync_ctx_is_started(copy_ctx));
327 
328  amxs_sync_ctx_delete(&ctx);
329  amxs_sync_ctx_delete(&copy_ctx);
330 }
@ amxs_status_object_not_found
Definition: amxs_types.h:93
int test_unregister_dummy_be(void)
Definition: dummy_be.c:249
int test_load_dummy_remote(const char *odl)
Definition: dummy_be.c:254
int test_register_dummy_be(void)
Definition: dummy_be.c:244
amxs_status_t amxs_sync_object_new(amxs_sync_object_t **object, const char *object_a, const char *object_b, int attributes, amxs_translation_cb_t translation_cb, amxs_action_cb_t action_cb, void *priv)
Synchronization object constructor function.
amxs_status_t amxs_sync_object_add_new_param(amxs_sync_object_t *object, const char *param_a, const char *param_b, int attributes, amxs_translation_cb_t translation_cb, amxs_action_cb_t action_cb, void *priv)
Creates and adds a synchronization parameter to a synchronization object.
#define AMXS_SYNC_DEFAULT
Default synchronization attributes.
Definition: amxs_types.h:190
#define AMXS_SYNC_INIT_B
Take the initial values from object B.
Definition: amxs_types.h:205
#define AMXS_SYNC_ONLY_B_TO_A
Only synchronize from object B to object A.
Definition: amxs_types.h:195
#define AMXS_SYNC_ONLY_A_TO_B
Only synchronize from object A to object B.
Definition: amxs_types.h:200
amxs_status_t amxs_sync_ctx_new(amxs_sync_ctx_t **ctx, const char *object_a, const char *object_b, int attributes)
Synchronization context constructor function.
amxs_status_t amxs_sync_ctx_copy(amxs_sync_ctx_t **dest, amxs_sync_ctx_t *src, void *priv)
Copies an existing synchronization context to a new synchronization context.
amxs_status_t amxs_sync_ctx_add_new_param(amxs_sync_ctx_t *ctx, const char *param_a, const char *param_b, int attributes, amxs_translation_cb_t translation_cb, amxs_action_cb_t action_cb, void *priv)
Creates and adds a synchronization parameter to a synchronization context.
amxs_status_t amxs_sync_ctx_start_sync(amxs_sync_ctx_t *ctx)
Starts the object synchronization.
void amxs_sync_ctx_delete(amxs_sync_ctx_t **ctx)
Synchronization context destructor function.
static bool amxs_sync_ctx_is_started(const amxs_sync_ctx_t *const ctx)
Checks is the synchronization context is running.
amxs_status_t amxs_sync_ctx_add_object(amxs_sync_ctx_t *ctx, amxs_sync_object_t *object)
Adds a synchronization object to a synchronization context.
void amxs_sync_ctx_stop_sync(amxs_sync_ctx_t *ctx)
Stops the object synchronization.
amxs_status_t amxs_sync_ctx_set_paths(amxs_sync_ctx_t *const ctx, const char *object_a, const char *object_b)
Updates the object paths of the synchronization context.
Definition: amxs_types.h:161
char * a
Definition: amxs_types.h:163
amxc_llist_t subscriptions
Definition: amxs_types.h:173
char * b
Definition: amxs_types.h:164
void test_amxs_sync_stop_args(UNUSED void **state)
void test_amxs_sync_start_args(UNUSED void **state)
void test_amxs_sync_start_instance_object_search_path(UNUSED void **state)
void test_amxs_sync_start_multiple_objects(UNUSED void **state)
int test_amxs_sync_teardown(UNUSED void **state)
void test_amxs_sync_start_param(UNUSED void **state)
int test_amxs_sync_setup(UNUSED void **state)
static amxb_bus_ctx_t * bus_ctx
void test_amxs_sync_start_object(UNUSED void **state)
void test_amxs_sync_start_template_object(UNUSED void **state)
void test_amxs_sync_start_copied(UNUSED void **state)
void test_amxs_sync_start_copied_change_paths(UNUSED void **state)