From 2dc9cc08f15c1bdc0d3f04739b9e401c96aaa6c3 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Sun, 6 Aug 2023 22:16:15 +0200 Subject: [PATCH] tests: add missing return value check One of the line-request test cases is missing the return value check after the call to gpiod_line_request_set_values_subset(). Add it. Signed-off-by: Bartosz Golaszewski --- tests/tests-line-request.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/tests-line-request.c b/tests/tests-line-request.c index 1a58275..7bba078 100644 --- a/tests/tests-line-request.c +++ b/tests/tests-line-request.c @@ -574,6 +574,7 @@ GPIOD_TEST_CASE(request_lines_with_unordered_offsets) g_autoptr(struct_gpiod_line_request) request = NULL; enum gpiod_line_value values[4]; guint set_offsets[4]; + gint ret; chip = gpiod_test_open_chip_or_fail(g_gpiosim_chip_get_dev_path(sim)); settings = gpiod_test_create_line_settings_or_fail(); @@ -596,7 +597,9 @@ GPIOD_TEST_CASE(request_lines_with_unordered_offsets) set_offsets[1] = 1; set_offsets[2] = 6; set_offsets[3] = 0; - gpiod_line_request_set_values_subset(request, 4, set_offsets, values); + ret = gpiod_line_request_set_values_subset(request, 4, set_offsets, values); + g_assert_cmpint(ret, ==, 0); + gpiod_test_return_if_failed(); g_assert_cmpint(g_gpiosim_chip_get_value(sim, 0), ==, G_GPIOSIM_VALUE_INACTIVE); -- 2.30.2