From nobody Thu Jan 27 05:09:35 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0A25719738CD; Thu, 27 Jan 2022 05:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JkpYC6TnZz4V7R; Thu, 27 Jan 2022 05:09:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643260176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g8ac+oZgv3hiKLIvHQYt6zwEPdxOd2WdqARbrH4iNiU=; b=ISfzu6OgPPtd/2lEGPQN9eY+eL4NiNClxQwgfUpeMLI9tNP4X+KKghdfIO3HdxN2fSm0PV BIrn0RBv/kCgS97h0gWEm2e9eN4AF+NtdIS0jPJKbnFa8igG8t372VaCnp3dWiCp1ToxHi I8HNbf3Jg7dlLT0fosBW6ZVzceOGnkwXudlsw5erwQzecZ4BCjY+ym3IYH68a2ne4U3Qpt GfBFheSnIoCR5Ru8435A/oILV0Jno5m9DWPdHmzQoeQd2DKdfM6K4yVl13yzfEQhiDJU3N +ucUeKdkuXHTQaSjr9k5r8cHQalrv+6AyjeJxVyXyemO8ojgrX7VpUB504w9qA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C01AB10B0E; Thu, 27 Jan 2022 05:09:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20R59Z4Z090344; Thu, 27 Jan 2022 05:09:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20R59ZcL090343; Thu, 27 Jan 2022 05:09:35 GMT (envelope-from git) Date: Thu, 27 Jan 2022 05:09:35 GMT Message-Id: <202201270509.20R59ZcL090343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 942d05e3b898 - main - tests/sys/net/epair: don't leak the interface after the test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 942d05e3b8988c3b78a00d81f8fc7ea668455caa Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643260175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g8ac+oZgv3hiKLIvHQYt6zwEPdxOd2WdqARbrH4iNiU=; b=VEN8haLH4vgFoel8uMOUlGNnVYr4dbV6SE5EWr+FqzjApSVlWgC3xUrNvO2zud2yHARQb5 L+s+amLwGsyXztufr3PJVtEhVvP0oKg5qUciOc8UQ9no1ci85wDTDndaYr09McKyOlWBbB JxBzs8c5qS+Q5wk3Rb3a30IA3wat/JZOuGz8DC6r0PcIpKX8vEKXsaBedaCEvBFGvXppva ok0X3Xe6NDgU7mXEGRaAweT560tgJog6GAlf6Uey9WocAjnSrD7sw+MOWcNruOf6RrEqBc nRAIXZZv+1zEW7YHHwQ/WnUVbsLuXIc/Q5MfCdRmAprq4HEd3+Kkko4RxtdXpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643260176; a=rsa-sha256; cv=none; b=DhF6S0Swatj3LX/93/LqqnuNCKInOLBsRvKq4Z25Y0GHIzHK+7gqHPLUMnQQCPfQkl105+ GmKJCitCp8ysQ5SyJN6zHhBcfyWJmE2r3I7+/1r0OYB0zZJlSheyRTz0VWGUX8m0/dpfv/ gKQuShiXH5rjvQAyVp1lIz/ZGUg5IvFNKt0u0q9EOEAAsntrYw5kmPfj4lXcvCQJgMVJp8 +zLVsU/qpNuPLudcxV6rSWNWJhukWyzESSa02Q5OmF5w2DeuynNmz4MZqCbfK93D97cbzb h15wJarRN3+EwDRd9pbblrF6DTa3q2ZVUDwQkaXeMMCErNtNBGumMm87jFmmvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=942d05e3b8988c3b78a00d81f8fc7ea668455caa commit 942d05e3b8988c3b78a00d81f8fc7ea668455caa Author: Gleb Smirnoff AuthorDate: 2022-01-27 05:08:50 +0000 Commit: Gleb Smirnoff 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)