sysctl: tests: fix a couple issues

The function that sets test case metadata is actually named ${tc}_head
rather than ${tc}, so add the suffix.

While we're here, hook the tests up to the infrastructure so that they
do get run.

Sponsored by:	Klara, Inc.
This commit is contained in:
Kyle Evans 2023-03-01 14:35:52 -06:00
parent 3f47391177
commit 0c42886449
3 changed files with 13 additions and 6 deletions

View File

@ -466,6 +466,8 @@
..
route
..
sysctl
..
..
secure
lib

View File

@ -1,10 +1,15 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
.include <src.opts.mk>
PACKAGE=runtime
CONFS= sysctl.conf
PROG= sysctl
WARNS?= 3
MAN= sysctl.8
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
.include <bsd.prog.mk>

View File

@ -38,7 +38,7 @@ sysctl_by_name_body()
atf_test_case sysctl_nflag
sysctl_nflag()
sysctl_nflag_head()
{
atf_set "descr" "Verify -n argument"
}
@ -49,7 +49,7 @@ sysctl_nflag_body()
atf_test_case sysctl_eflag
sysctl_eflag()
sysctl_eflag_head()
{
atf_set "descr" "Verify -e argument"
}
@ -60,7 +60,7 @@ sysctl_eflag_body()
atf_test_case sysctl_tflag
sysctl_tflag()
sysctl_tflag_head()
{
atf_set "descr" "Verify -t argument"
}
@ -71,7 +71,7 @@ sysctl_tflag_body()
atf_test_case sysctl_dflag
sysctl_dflag()
sysctl_dflag_head()
{
atf_set "descr" "Verify -d argument"
}
@ -82,7 +82,7 @@ sysctl_dflag_body()
atf_test_case sysctl_tflag_dflag
sysctl_tflag_dflag()
sysctl_tflag_dflag_head()
{
atf_set "descr" "Verify -t -d arguments"
}
@ -94,7 +94,7 @@ sysctl_tflag_dflag_body()
atf_test_case sysctl_nflag_tflag_dflag
sysctl_nflag_tflag_dflag()
sysctl_nflag_tflag_dflag_head()
{
atf_set "descr" "Verify -n -t -d arguments"
}