tests: bridge: Use unique names for bindings
This makes debugging easier.
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
Change-Id: I43d225434e0724244fef3faaf5ab95b7094cca84
diff --git a/tests/test_bridge.c b/tests/test_bridge.c
index a37fbd0..c710617 100644
--- a/tests/test_bridge.c
+++ b/tests/test_bridge.c
@@ -59,13 +59,13 @@
mctp_bus_rx(&binding->binding, pkt);
}
-static struct mctp_binding_bridge *mctp_binding_bridge_init(void)
+static struct mctp_binding_bridge *mctp_binding_bridge_init(char *name)
{
struct mctp_binding_bridge *binding;
binding = __mctp_alloc(sizeof(*binding));
memset(binding, 0, sizeof(*binding));
- binding->binding.name = "test";
+ binding->binding.name = name;
binding->binding.version = 1;
binding->binding.tx = mctp_binding_bridge_tx;
binding->binding.pkt_size = MCTP_PACKET_SIZE(MCTP_BTU);
@@ -79,9 +79,9 @@
struct test_ctx _ctx, *ctx = &_ctx;
ctx->mctp = mctp_init();
- ctx->bindings[0] = mctp_binding_bridge_init();
- ctx->bindings[1] = mctp_binding_bridge_init();
+ ctx->bindings[0] = mctp_binding_bridge_init("binding0");
+ ctx->bindings[1] = mctp_binding_bridge_init("binding1");
mctp_bridge_busses(ctx->mctp, &ctx->bindings[0]->binding,
&ctx->bindings[1]->binding);