From nobody Tue Sep 10 18:34:38 2024 X-Original-To: dev-commits-src-all@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 4X3C6Q6xYYz5WPRq; Tue, 10 Sep 2024 18:34:38 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X3C6Q6Qxcz4PJB; Tue, 10 Sep 2024 18:34:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725993278; 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=w2f/TM3L5eSdSqRzhn9ifs41kFh+VxOpCm+76l+9xmo=; b=gXdNasSD9JUREOme/i5/cAtb48Mgmh5L7fahGDhp0OJ2DhN4hGY8ourpo4JVlAuXruk8Bp 0fh7uHSfqAZi6VzSNaPooRHVBmEQolQ5JiUtm3X92JHYdYZu356c/1NKw0vOEyj+Aiw2EX hlWOT73dwqxY88e8YLmbQtyHJFjE3MWOzBaZ01QntdkVEvfRLkySo6+/TUnbT2yHPsvyrq n5oYLl6x/WkDRjp0iOUA3/J6exc1t4gxWQEXAT4D3f3iUzmQ8OP+lvTzu3xAbWdJTA/J50 nTO5nvIskjo9TOb3UoLAkT8tER7V7JVbzMX9TrqeVqANJ1YBEclwxWs/AMt/Pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725993278; a=rsa-sha256; cv=none; b=XjHNOYQqqe+k/RtTRh7asNM2udTu6d9HQHgiW9Qwdg7JpNnv2MJmdhaw7bbv5vZqysClra cvOQf3UvuypTqvT64+DMdus62fv9JlyqOdBJ0Vp2qqt02K31Y858PSfVAr6pUM73AYNTlv XqZDDwmlTOUlINvXYew/CDP75+nSNaGVN+5ZWKZvvqZ76qKaa9ptp2XqHfeT3aVOBIjxXx JF7Wsmz2idFc7lfRnXPfJxFW7bdvbK4nnK+CC4+ZPJ3hy/tbuZJUZskF33ccW5TSZvVF11 JlMoWK+IyLARmeqCa0vHp3qFJzEiuHq1C5cjVXh+h4gAHHH9uHlbVK77fiKamw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725993278; 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=w2f/TM3L5eSdSqRzhn9ifs41kFh+VxOpCm+76l+9xmo=; b=gGWoXPObjJ0bgLjT3AQ6uL0dAVVU9GmL85UcCHVcEU0WDlv7xAJBMxRPJ9rK1fr8Qhe/KN xkBYWA6aCcCe1XBQx2zm9s0l+6U0o5oKY2cn0RMCS62cmkE/sBanLgqYrlGASFSHfJ2RKY Lw3Z/hCQYDDypazMk884HQLj1jfvNoahKgEMk3zHJOMR0zFn3ZLZMq62tUgHQtUv2e6+SE jpURILmY3htZBLVRg2mJKdJPLop1k3JPyg4yw3YhLDn2dH0CWLwWioTEDZMzXHgV3LffwC ZtlnNlokwF/BoqNDmMdDg+oGIypiM0cb1ssi3bCLDRZlXW3zAJNbHYCQOWHbxQ== 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 4X3C6Q61W8zxmj; Tue, 10 Sep 2024 18:34:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48AIYc8c055814; Tue, 10 Sep 2024 18:34:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48AIYcZE055811; Tue, 10 Sep 2024 18:34:38 GMT (envelope-from git) Date: Tue, 10 Sep 2024 18:34:38 GMT Message-Id: <202409101834.48AIYcZE055811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 136b8134a4b5 - main - if_ovpn tests: destroy an if_ovpn interface before it's been used List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 136b8134a4b5a7efacf4109c2f89d6db94785774 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=136b8134a4b5a7efacf4109c2f89d6db94785774 commit 136b8134a4b5a7efacf4109c2f89d6db94785774 Author: Kristof Provost AuthorDate: 2024-09-09 12:33:31 +0000 Commit: Kristof Provost CommitDate: 2024-09-10 18:34:23 +0000 if_ovpn tests: destroy an if_ovpn interface before it's been used Ensure that we correctly clean up even if the interface never gets a socket assigned. Reviewed by: markj Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46617 --- tests/sys/net/if_ovpn/if_ovpn.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh index 77007c967333..ea1eed88de9e 100644 --- a/tests/sys/net/if_ovpn/if_ovpn.sh +++ b/tests/sys/net/if_ovpn/if_ovpn.sh @@ -1048,6 +1048,27 @@ gcm_128_cleanup() ovpn_cleanup } +atf_test_case "destroy_unused" "cleanup" +destroy_unused_head() +{ + atf_set descr 'Destroy an if_ovpn interface before it is used' + atf_set require.user root +} + +destroy_unused_body() +{ + ovpn_init + + intf=$(ifconfig ovpn create) + atf_check -s exit:0 \ + ifconfig ${intf} destroy +} + +destroy_unused_cleanup() +{ + ovpn_cleanup +} + atf_init_test_cases() { atf_add_test_case "4in4" @@ -1062,4 +1083,5 @@ atf_init_test_cases() atf_add_test_case "ra" atf_add_test_case "chacha" atf_add_test_case "gcm_128" + atf_add_test_case "destroy_unused" }