+ enum bt_clock_correlation_validator_error_type type;
+ bt_uuid expected_uuid;
+ const bt_clock_class *actual_clock_cls;
+ const bt_clock_class *expected_clock_cls;
+
+ if (!bt_clock_correlation_validator_validate_message(
+ iterator->correlation_validator, msg, &type,
+ &expected_uuid, &actual_clock_cls,
+ &expected_clock_cls)) {
+ switch (type) {
+ case BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_NO_CLOCK_CLASS_GOT_ONE:
+ BT_ASSERT_POST_DEV(NEXT_METHOD_NAME,
+ "stream-class-has-no-clock-class", false,
+ "Expecting no clock class, got one.");
+ case BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UNIX_GOT_NONE:
+ BT_ASSERT_POST_DEV(NEXT_METHOD_NAME,
+ "stream-class-has-clock-class-with-unix-epoch-origin", false,
+ "Expecting a clock class, got none.");
+ case BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UNIX_GOT_OTHER:
+ BT_ASSERT_POST_DEV(NEXT_METHOD_NAME,
+ "clock-class-has-unix-epoch-origin", false,
+ "Expecting a clock class with Unix epoch origin: %![cc-]+K",
+ actual_clock_cls);
+ case BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UUID_GOT_NONE:
+ BT_ASSERT_POST_DEV(NEXT_METHOD_NAME,
+ "stream-class-has-clock-class-with-uuid", false,
+ "Expecting a clock class, got none.");
+ case BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UUID_GOT_UNIX:
+ BT_ASSERT_POST_DEV(NEXT_METHOD_NAME,
+ "clock-class-has-non-unix-epoch-origin", false,
+ "Expecting a clock class without Unix epoch origin: %![cc-]+K",
+ actual_clock_cls);
+ case BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UUID_GOT_NO_UUID:
+ BT_ASSERT_POST_DEV(NEXT_METHOD_NAME,
+ "clock-class-has-uuid", false,
+ "Expecting a clock class with UUID: %![cc-]+K",
+ actual_clock_cls);
+ case BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UUID_GOT_OTHER_UUID:
+ BT_ASSERT_POST_DEV(NEXT_METHOD_NAME,
+ "clock-class-has-expected-uuid", false,
+ "Expecting a clock class with UUID, got one with a different UUID: %![cc-]+K, expected-uuid=%!u",
+ actual_clock_cls, expected_uuid);
+
+ case BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_NO_UUID_GOT_NONE:
+ BT_ASSERT_POST_DEV(NEXT_METHOD_NAME,
+ "stream-class-has-clock-class", false,
+ "Expecting a clock class, got none.");
+ case BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_NO_UUID_GOT_OTHER:
+ BT_ASSERT_POST_DEV(NEXT_METHOD_NAME,
+ "clock-class-is-expected", false,
+ "Unexpected clock class: %![expected-cc-]+K, %![actual-cc-]+K",
+ expected_clock_cls, actual_clock_cls);
+ }