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:
parent
7c90b0bbf2
commit
054a344d95
@ -14,4 +14,7 @@ CFLAGS+= -DLIBWRAP
|
||||
LIBADD= wrap
|
||||
.endif
|
||||
|
||||
HAS_TESTS=
|
||||
SUBDIR.${MK_TESTS}+= tests
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
14
libexec/tftpd/tests/Makefile
Normal file
14
libexec/tftpd/tests/Makefile
Normal 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>
|
1006
libexec/tftpd/tests/functional.c
Normal file
1006
libexec/tftpd/tests/functional.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user