struct bt_self_component_port_input_message_iterator *iterator =
(void *) self_iterator;
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
return iterator->user_data;
}
struct bt_self_component_port_input_message_iterator *iterator =
(void *) self_iterator;
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
iterator->user_data = data;
BT_LIB_LOGD("Set message iterator's user data: "
"%!+i, user-data-addr=%p", iterator, data);
* time.
*/
-BT_ASSERT_POST_FUNC
+BT_ASSERT_POST_DEV_FUNC
static
bool clock_snapshots_are_monotonic_one(
struct bt_self_component_port_input_message_iterator *iterator,
return result;
}
-BT_ASSERT_POST_FUNC
+BT_ASSERT_POST_DEV_FUNC
static
bool clock_snapshots_are_monotonic(
struct bt_self_component_port_input_message_iterator *iterator,
* stream is compatible with what we've seen before.
*/
-BT_ASSERT_POST_FUNC
+BT_ASSERT_POST_DEV_FUNC
static
bool clock_classes_are_compatible_one(struct bt_self_component_port_input_message_iterator *iterator,
const struct bt_message *msg)
case CLOCK_EXPECTATION_NONE:
if (clock_class) {
- BT_ASSERT_POST_MSG("Expecting no clock class, got one: %![cc-]+K",
+ BT_ASSERT_POST_DEV_MSG(
+ "Expecting no clock class, got one: %![cc-]+K",
clock_class);
result = false;
goto end;
case CLOCK_EXPECTATION_ORIGIN_UNIX:
if (!clock_class) {
- BT_ASSERT_POST_MSG("Expecting a clock class, got none.");
+ BT_ASSERT_POST_DEV_MSG(
+ "Expecting a clock class, got none.");
result = false;
goto end;
}
if (!bt_clock_class_origin_is_unix_epoch(clock_class)) {
- BT_ASSERT_POST_MSG("Expecting a clock class with Unix epoch origin: %![cc-]+K",
+ BT_ASSERT_POST_DEV_MSG(
+ "Expecting a clock class with Unix epoch origin: %![cc-]+K",
clock_class);
result = false;
goto end;
case CLOCK_EXPECTATION_ORIGIN_OTHER_UUID:
if (!clock_class) {
- BT_ASSERT_POST_MSG("Expecting a clock class, got none.");
+ BT_ASSERT_POST_DEV_MSG(
+ "Expecting a clock class, got none.");
result = false;
goto end;
}
if (bt_clock_class_origin_is_unix_epoch(clock_class)) {
- BT_ASSERT_POST_MSG("Expecting a clock class without Unix epoch origin: %![cc-]+K",
+ BT_ASSERT_POST_DEV_MSG(
+ "Expecting a clock class without Unix epoch origin: %![cc-]+K",
clock_class);
result = false;
goto end;
}
if (!clock_class_uuid) {
- BT_ASSERT_POST_MSG("Expecting a clock class with UUID: %![cc-]+K",
+ BT_ASSERT_POST_DEV_MSG(
+ "Expecting a clock class with UUID: %![cc-]+K",
clock_class);
result = false;
goto end;
}
if (bt_uuid_compare(iterator->clock_expectation.uuid, clock_class_uuid)) {
- BT_ASSERT_POST_MSG("Expecting a clock class with UUID, got one "
+ BT_ASSERT_POST_DEV_MSG(
+ "Expecting a clock class with UUID, got one "
"with a different UUID: %![cc-]+K, expected-uuid=%!u",
clock_class, iterator->clock_expectation.uuid);
result = false;
case CLOCK_EXPECTATION_ORIGIN_OTHER_NO_UUID:
if (!clock_class) {
- BT_ASSERT_POST_MSG("Expecting a clock class, got none.");
+ BT_ASSERT_POST_DEV_MSG(
+ "Expecting a clock class, got none.");
result = false;
goto end;
}
if (bt_clock_class_origin_is_unix_epoch(clock_class)) {
- BT_ASSERT_POST_MSG("Expecting a clock class without Unix epoch origin: %![cc-]+K",
+ BT_ASSERT_POST_DEV_MSG(
+ "Expecting a clock class without Unix epoch origin: %![cc-]+K",
clock_class);
result = false;
goto end;
}
if (clock_class_uuid) {
- BT_ASSERT_POST_MSG("Expecting a clock class without UUID: %![cc-]+K",
+ BT_ASSERT_POST_DEV_MSG(
+ "Expecting a clock class without UUID: %![cc-]+K",
clock_class);
result = false;
goto end;
return result;
}
-BT_ASSERT_POST_FUNC
+BT_ASSERT_POST_DEV_FUNC
static
bool clock_classes_are_compatible(
struct bt_self_component_port_input_message_iterator *iterator,
bt_common_func_status_string(status), *user_count);
if (status == BT_FUNC_STATUS_OK) {
- BT_ASSERT_POST(clock_classes_are_compatible(iterator, msgs, *user_count),
+ BT_ASSERT_POST_DEV(clock_classes_are_compatible(iterator, msgs, *user_count),
"Clocks are not compatible");
- BT_ASSERT_POST(clock_snapshots_are_monotonic(iterator, msgs, *user_count),
+ BT_ASSERT_POST_DEV(clock_snapshots_are_monotonic(iterator, msgs, *user_count),
"Clock snapshots are not monotonic");
}
{
enum bt_message_iterator_next_status status = BT_FUNC_STATUS_OK;
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
- BT_ASSERT_PRE_NON_NULL(msgs, "Message array (output)");
- BT_ASSERT_PRE_NON_NULL(user_count, "Message count (output)");
- BT_ASSERT_PRE(iterator->state ==
+ BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_NON_NULL(msgs, "Message array (output)");
+ BT_ASSERT_PRE_DEV_NON_NULL(user_count, "Message count (output)");
+ BT_ASSERT_PRE_DEV(iterator->state ==
BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE,
"Message iterator's \"next\" called, but "
"message iterator is in the wrong state: %!+i", iterator);
BT_ASSERT(iterator->upstream_component);
BT_ASSERT(iterator->upstream_component->class);
- BT_ASSERT_PRE(
+ BT_ASSERT_PRE_DEV(
bt_component_borrow_graph(iterator->upstream_component)->config_state !=
BT_GRAPH_CONFIGURATION_STATE_CONFIGURING,
"Graph is not configured: %!+g",
switch (status) {
case BT_FUNC_STATUS_OK:
- BT_ASSERT_POST(*user_count <= MSG_BATCH_SIZE,
+ BT_ASSERT_POST_DEV(*user_count <= MSG_BATCH_SIZE,
"Invalid returned message count: greater than "
"batch size: count=%" PRIu64 ", batch-size=%u",
*user_count, MSG_BATCH_SIZE);
enum bt_message_iterator_next_status status;
int graph_status;
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
- BT_ASSERT_PRE_NON_NULL(msgs_to_user, "Message array (output)");
- BT_ASSERT_PRE_NON_NULL(count_to_user, "Message count (output)");
+ BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_NON_NULL(msgs_to_user, "Message array (output)");
+ BT_ASSERT_PRE_DEV_NON_NULL(count_to_user, "Message count (output)");
BT_LIB_LOGD("Getting next output port message iterator's messages: "
"%!+i", iterator);
graph_status = bt_graph_consume_sink_no_check(iterator->graph,
bt_self_component_port_input_message_iterator_borrow_component(
struct bt_self_component_port_input_message_iterator *iterator)
{
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
return iterator->upstream_component;
}
bt_self_component_port_input_message_iterator_borrow_component_const(
const struct bt_self_component_port_input_message_iterator *iterator)
{
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
return iterator->upstream_component;
}
struct bt_self_component_port_input_message_iterator *iterator =
(void *) self_iterator;
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
return (void *) iterator->upstream_component;
}
struct bt_self_component_port_input_message_iterator *iterator =
(void *) self_iterator;
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
return (void *) iterator->upstream_port;
}
(const void *) msg;
clk_snapshot = event_msg->default_cs;
- BT_ASSERT_POST(clk_snapshot,
+ BT_ASSERT_POST_DEV(clk_snapshot,
"Event message has no default clock snapshot: %!+n",
event_msg);
break;
(const void *) msg;
clk_snapshot = packet_msg->default_cs;
- BT_ASSERT_POST(clk_snapshot,
+ BT_ASSERT_POST_DEV(clk_snapshot,
"Packet message has no default clock snapshot: %!+n",
packet_msg);
break;
struct bt_message_discarded_items *msg_disc_items =
(void *) msg;
- BT_ASSERT_POST(msg_disc_items->default_begin_cs &&
+ BT_ASSERT_POST_DEV(msg_disc_items->default_begin_cs &&
msg_disc_items->default_end_cs,
"Discarded events/packets message has no default clock snapshots: %!+n",
msg_disc_items);
switch (status) {
case BT_FUNC_STATUS_OK:
- BT_ASSERT_POST(user_count <= MSG_BATCH_SIZE,
+ BT_ASSERT_POST_DEV(user_count <= MSG_BATCH_SIZE,
"Invalid returned message count: greater than "
"batch size: count=%" PRIu64 ", batch-size=%u",
user_count, MSG_BATCH_SIZE);