The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=942d05e3b8988c3b78a00d81f8fc7ea668455caa
commit 942d05e3b8988c3b78a00d81f8fc7ea668455caa Author: Gleb Smirnoff <[email protected]> AuthorDate: 2022-01-27 05:08:50 +0000 Commit: Gleb Smirnoff <[email protected]> CommitDate: 2022-01-27 05:08:50 +0000 tests/sys/net/epair: don't leak the interface after the test --- tests/sys/net/if_epair.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/sys/net/if_epair.c b/tests/sys/net/if_epair.c index e6864d3ebf93..f38e469b4200 100644 --- a/tests/sys/net/if_epair.c +++ b/tests/sys/net/if_epair.c @@ -64,7 +64,11 @@ ATF_TC_BODY(params, tc) ifr.ifr_data = (caddr_t)-1; (void) strlcpy(ifr.ifr_name, "epair", sizeof(ifr.ifr_name)); - ioctl(s, SIOCIFCREATE2, &ifr); + if (ioctl(s, SIOCIFCREATE2, &ifr) < 0) + atf_tc_fail("Failed to create interface"); + + if (ioctl(s, SIOCIFDESTROY, &ifr) < 0) + atf_tc_fail("Failed to destroy interface"); } ATF_TP_ADD_TCS(tp)
