From 54feadd2c1989af865d36abdfb5f20b8a7bbf91e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 12 Jan 2021 21:25:50 +0100 Subject: [PATCH] lldp/tests: make assertion in _test_recv_fixture_setup() clearer ... to print the errno value on failure. --- src/devices/tests/test-lldp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/devices/tests/test-lldp.c b/src/devices/tests/test-lldp.c index 2fc237fccc..7762ce93d7 100644 --- a/src/devices/tests/test-lldp.c +++ b/src/devices/tests/test-lldp.c @@ -813,10 +813,13 @@ _test_recv_fixture_setup(TestRecvFixture *fixture, gconstpointer user_data) } else { int s; struct ifreq ifr = {}; + int r; ifr.ifr_flags = IFF_TAP | IFF_NO_PI; nm_utils_ifname_cpy(ifr.ifr_name, TEST_IFNAME); - g_assert(ioctl(fd, TUNSETIFF, &ifr) >= 0); + + r = ioctl(fd, TUNSETIFF, &ifr); + g_assert_cmpint(r, >=, 0); /* Bring the interface up */ s = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);