git: a7ba32e6bcb9 - main - tun tests: Fix cleanup definitions

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Thu, 16 Mar 2023 17:51:51 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=a7ba32e6bcb99176fdb042b9f26b2e1158d33d12

commit a7ba32e6bcb99176fdb042b9f26b2e1158d33d12
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-03-16 16:52:54 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-03-16 17:27:24 +0000

    tun tests: Fix cleanup definitions
    
    Without this, vnet jails for the tests don't get torn down.
    
    Fixes:  fe701c39e8aa ("if_tun: Add basic connectivity test with nc tun support")
---
 tests/sys/net/if_tun_test.sh | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/tests/sys/net/if_tun_test.sh b/tests/sys/net/if_tun_test.sh
index 5f05ac7c5eff..0e9812efddb3 100755
--- a/tests/sys/net/if_tun_test.sh
+++ b/tests/sys/net/if_tun_test.sh
@@ -2,13 +2,12 @@
 
 . $(atf_get_srcdir)/../common/vnet.subr
 
-atf_test_case "235704" "basic" "cleanup"
+atf_test_case "235704" "cleanup"
 235704_head()
 {
 	atf_set descr "Test PR #235704"
 	atf_set require.user root
 }
-
 235704_body()
 {
 	vnet_init
@@ -18,18 +17,17 @@ atf_test_case "235704" "basic" "cleanup"
 	jexec one ifconfig ${tun} name foo
 	atf_check -s exit:0 jexec one ifconfig foo destroy
 }
-
 235704_cleanup()
 {
 	vnet_cleanup
 }
 
+atf_test_case "basic" "cleanup"
 basic_head()
 {
 	atf_set descr "Test if_tun using nc"
 	atf_set require.user root
 }
-
 basic_body()
 {
 	vnet_init
@@ -54,8 +52,7 @@ basic_body()
 	atf_check -s exit:0 -o ignore \
 		jexec bass ping -c 1 10.100.0.1
 }
-
-basic_clean()
+basic_cleanup()
 {
 	vnet_cleanup
 }