+ append_test_event(&test_event);
+}
+
+static
+enum bt_notification_iterator_status common_consume(
+ struct bt_notification_iterator *notif_iter,
+ bool is_output_port_notif_iter)
+{
+ enum bt_notification_iterator_status ret;
+ bt_notification_array notifications = NULL;
+ uint64_t count = 0;
+ struct test_event test_event = { 0 };
+ uint64_t i;
+
+ BT_ASSERT(notif_iter);
+
+ if (is_output_port_notif_iter) {
+ ret = bt_output_port_notification_iterator_next(notif_iter,
+ ¬ifications, &count);
+ } else {
+ ret = bt_private_connection_notification_iterator_next(
+ notif_iter, ¬ifications, &count);
+ }
+
+ if (ret < 0) {
+ goto end;
+ }
+
+ switch (ret) {
+ case BT_NOTIFICATION_ITERATOR_STATUS_END:
+ test_event.type = TEST_EV_TYPE_END;