+
+ printf("Received event notification from trigger %s\n",
+ expected_trigger_name);
+ notification_count++;
+ if (end_trigger_name == NULL &&
+ expected_notifications == notification_count) {
+ /*
+ * Here the loop exit is controlled by the number of
+ * notification and not by the reception of the end
+ * event trigger notification. This represent the
+ * default behavior.
+ *
+ */
+ goto evaluate_success;
+ }
+ }
+
+evaluate_success:
+ if (expected_notifications == notification_count) {
+ /* Success */
+ ret = 0;
+ } else {
+ fprintf(stderr, "Expected %d notification got %d\n",
+ expected_notifications, notification_count);
+ ret = 1;