Index: tests/sys/sys/Makefile =================================================================== --- tests/sys/sys/Makefile +++ tests/sys/sys/Makefile @@ -4,7 +4,7 @@ TESTSDIR= ${TESTSBASE}/sys/sys -ATF_TESTS_C= arb_test bitstring_test qmath_test rb_test splay_test +ATF_TESTS_C= arb_test bitstring_test qmath_test rb_test splay_test sysctl_h_self .if ${COMPILER_TYPE} == "gcc" CFLAGS.bitstring_test= -fno-strict-overflow Index: tests/sys/sys/sysctl_h_self.c =================================================================== --- /dev/null +++ tests/sys/sys/sysctl_h_self.c @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2021 Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * Tests to make sure that sys/sysctl.h can be included by itself. + */ + +#include + +#include + +ATF_TC(sysctl_h_self); +ATF_TC_HEAD(sysctl_h_self, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test that is standalone"); +} + +ATF_TC_BODY(sysctl_h_self, tc) +{ + /* Always succeeds -- this is a build test. */ +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, sysctl_h_self); + + return atf_no_error(); +}