Index: etc/mtree/BSD.tests.dist =================================================================== --- etc/mtree/BSD.tests.dist +++ etc/mtree/BSD.tests.dist @@ -836,6 +836,8 @@ .. sys .. + tcptestsuite + .. vfs .. vm Index: tests/sys/Makefile =================================================================== --- tests/sys/Makefile +++ tests/sys/Makefile @@ -25,6 +25,7 @@ TESTS_SUBDIRS+= opencrypto TESTS_SUBDIRS+= posixshm TESTS_SUBDIRS+= sys +TESTS_SUBDIRS+= tcptestsuite TESTS_SUBDIRS+= vfs TESTS_SUBDIRS+= vm Index: tests/sys/tcptestsuite/Makefile =================================================================== --- /dev/null +++ tests/sys/tcptestsuite/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +PACKAGE= tests +TESTSDIR= ${TESTSBASE}/sys/tcptestsuite +${PACKAGE}FILESDIR= ${TESTSDIR} + +ATF_TESTS_SH+= tcptestsuite_test +${PACKAGE}FILES+= blacklist + +.include Index: tests/sys/tcptestsuite/tcptestsuite_test.sh =================================================================== --- /dev/null +++ tests/sys/tcptestsuite/tcptestsuite_test.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env atf-sh +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2019 Dell Inc. +# +# Written by: Eric van Gyzen +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +tcptestsuite_path=/usr/local/share/tcptestsuite +packetdrill_path=/usr/local/bin/packetdrill + +make_script() { + if [ ! -d $tcptestsuite_path ]; then + # Generate a stub test that fails. + cat < $all_tests + + while read Torig; do + Tunder=$(basename $Torig | tr - _) + cat < $atf_script +. $atf_script +rm $atf_script