From c78585cf832fba85289419a842d5d4e7dce1e4a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 28 Apr 2021 13:16:12 -0400 Subject: [PATCH] Tests: notification: fail on trigger unregistration failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau Change-Id: I474c92f34604100081676dda484513cc8a950c73 --- tests/regression/tools/notification/notification.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/regression/tools/notification/notification.c b/tests/regression/tools/notification/notification.c index 66cef82a0..bdea55921 100644 --- a/tests/regression/tools/notification/notification.c +++ b/tests/regression/tools/notification/notification.c @@ -1220,7 +1220,8 @@ static void test_subscription_twice(const char *session_name, domain_type, BUFFER_USAGE_TYPE_LOW, 0.99, &condition, &action, &trigger); if (ret) { - fail("Setup error on trigger registration"); + fail("Setup error on trigger registration in %s()", + __FUNCTION__); goto end; } @@ -1245,7 +1246,11 @@ static void test_subscription_twice(const char *session_name, "Subscribe to a condition for which subscription was already done"); end: - lttng_unregister_trigger(trigger); + ret = lttng_unregister_trigger(trigger); + if (ret) { + fail("Failed to unregister trigger in %s()", __FUNCTION__); + } + lttng_trigger_destroy(trigger); lttng_notification_channel_destroy(notification_channel); lttng_action_destroy(action); -- 2.34.1