Add some functional tests for tftpd(8)

tftpd(8) is difficult to test in isolation due to its relationship with
inetd.  Create a test program that mimics the behavior of tftp(1) and
inetd(8) and verifies tftpd's response in several different scenarios.

These test cases cover all of the basic TFTP protocol, but not the optional
parts.

PR:		157700
PR:		225996
PR:		226004
PR:		226005
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D14310
This commit is contained in:
asomers 2018-03-09 15:30:20 +00:00
parent 7c90b0bbf2
commit 054a344d95
3 changed files with 1023 additions and 0 deletions

View File

@ -14,4 +14,7 @@ CFLAGS+= -DLIBWRAP
LIBADD= wrap
.endif
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
.include <bsd.prog.mk>

View File

@ -0,0 +1,14 @@
# $FreeBSD$
.include <bsd.own.mk>
# Skip on GCC 4.2, because it lacks __COUNTER__
.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40300
ATF_TESTS_C= functional
TEST_METADATA.functional+= timeout=15
.endif
LIBADD= util
WARNS?= 6
.include <bsd.test.mk>

File diff suppressed because it is too large Load Diff