mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 01:30:12 +01:00
lldp/tests: make assertion in _test_recv_fixture_setup() clearer
... to print the errno value on failure.
This commit is contained in:
parent
d21bb697ad
commit
54feadd2c1
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue