diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6566c2d4fe..beec448aef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -450,6 +450,7 @@ misc: - test ! -f CHANGES.SE || sh util/check-line-length.sh CHANGES.SE - rm CHANGES.tmp - sh util/check-categories.sh + - sh util/check-gitignore.sh - if git grep SYSTEMTESTTOP -- ':!.gitlab-ci.yml'; then echo 'Please use relative paths instead of $SYSTEMTESTTOP.'; exit 1; fi - bash util/unused-headers.sh - bash util/xmllint-html.sh diff --git a/bin/tests/system/rpzrecurse/.gitignore b/bin/tests/system/rpzrecurse/.gitignore index 3132239b3c..5d4371d852 100644 --- a/bin/tests/system/rpzrecurse/.gitignore +++ b/bin/tests/system/rpzrecurse/.gitignore @@ -4,7 +4,6 @@ /ns3/named.conf /ns3/named2.conf /ns4/named.conf -/ans5/ans.pl /ans5/ans.pid /dnsrps-secondary.conf /dnsrps.conf diff --git a/bin/tests/system/rpzrecurse/ns2/.gitignore b/bin/tests/system/rpzrecurse/ns2/.gitignore index db4f2c3d45..69f6f6cee2 100644 --- a/bin/tests/system/rpzrecurse/ns2/.gitignore +++ b/bin/tests/system/rpzrecurse/ns2/.gitignore @@ -1,3 +1,8 @@ /*.local /*.queries -/*.conf +/named.1*.conf +/named.2*.conf +/named.3*.conf +/named.4*.conf +/named.5*.conf +/named.6*.conf diff --git a/bin/tests/system/rrsetorder/dig.out.fixed.good b/bin/tests/system/rrsetorder/reference.dig.out.fixed.good similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.fixed.good rename to bin/tests/system/rrsetorder/reference.dig.out.fixed.good diff --git a/bin/tests/system/rrsetorder/dig.out.random.good1 b/bin/tests/system/rrsetorder/reference.dig.out.random.good1 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good1 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good1 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good10 b/bin/tests/system/rrsetorder/reference.dig.out.random.good10 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good10 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good10 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good11 b/bin/tests/system/rrsetorder/reference.dig.out.random.good11 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good11 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good11 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good12 b/bin/tests/system/rrsetorder/reference.dig.out.random.good12 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good12 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good12 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good13 b/bin/tests/system/rrsetorder/reference.dig.out.random.good13 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good13 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good13 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good14 b/bin/tests/system/rrsetorder/reference.dig.out.random.good14 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good14 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good14 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good15 b/bin/tests/system/rrsetorder/reference.dig.out.random.good15 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good15 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good15 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good16 b/bin/tests/system/rrsetorder/reference.dig.out.random.good16 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good16 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good16 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good17 b/bin/tests/system/rrsetorder/reference.dig.out.random.good17 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good17 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good17 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good18 b/bin/tests/system/rrsetorder/reference.dig.out.random.good18 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good18 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good18 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good19 b/bin/tests/system/rrsetorder/reference.dig.out.random.good19 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good19 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good19 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good2 b/bin/tests/system/rrsetorder/reference.dig.out.random.good2 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good2 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good2 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good20 b/bin/tests/system/rrsetorder/reference.dig.out.random.good20 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good20 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good20 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good21 b/bin/tests/system/rrsetorder/reference.dig.out.random.good21 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good21 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good21 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good22 b/bin/tests/system/rrsetorder/reference.dig.out.random.good22 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good22 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good22 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good23 b/bin/tests/system/rrsetorder/reference.dig.out.random.good23 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good23 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good23 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good24 b/bin/tests/system/rrsetorder/reference.dig.out.random.good24 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good24 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good24 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good3 b/bin/tests/system/rrsetorder/reference.dig.out.random.good3 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good3 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good3 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good4 b/bin/tests/system/rrsetorder/reference.dig.out.random.good4 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good4 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good4 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good5 b/bin/tests/system/rrsetorder/reference.dig.out.random.good5 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good5 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good5 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good6 b/bin/tests/system/rrsetorder/reference.dig.out.random.good6 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good6 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good6 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good7 b/bin/tests/system/rrsetorder/reference.dig.out.random.good7 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good7 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good7 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good8 b/bin/tests/system/rrsetorder/reference.dig.out.random.good8 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good8 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good8 diff --git a/bin/tests/system/rrsetorder/dig.out.random.good9 b/bin/tests/system/rrsetorder/reference.dig.out.random.good9 similarity index 100% rename from bin/tests/system/rrsetorder/dig.out.random.good9 rename to bin/tests/system/rrsetorder/reference.dig.out.random.good9 diff --git a/bin/tests/system/rrsetorder/tests.sh b/bin/tests/system/rrsetorder/tests.sh index c2d94d8bd6..524efd984f 100644 --- a/bin/tests/system/rrsetorder/tests.sh +++ b/bin/tests/system/rrsetorder/tests.sh @@ -41,7 +41,7 @@ if $test_fixed; then for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 do dig_cmd @10.53.0.1 fixed.example > dig.out.fixed || ret=1 - diff dig.out.fixed dig.out.fixed.good >/dev/null || ret=1 + diff dig.out.fixed reference.dig.out.fixed.good >/dev/null || ret=1 done if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret)) @@ -133,7 +133,7 @@ do match=0 for j in $GOOD_RANDOM do - eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1" + eval "diff dig.out.random reference.dig.out.random.good$j >/dev/null && match$j=1 match=1" if [ $match -eq 1 ]; then break; fi done if [ $match -eq 0 ]; then ret=1; fi @@ -172,7 +172,7 @@ if $test_fixed; then for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 do dig_cmd @10.53.0.2 fixed.example > dig.out.fixed || ret=1 - diff dig.out.fixed dig.out.fixed.good || ret=1 + diff dig.out.fixed reference.dig.out.fixed.good || ret=1 done if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret)) @@ -242,7 +242,7 @@ do match=0 for j in $GOOD_RANDOM do - eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1" + eval "diff dig.out.random reference.dig.out.random.good$j >/dev/null && match$j=1 match=1" if [ $match -eq 1 ]; then break; fi done if [ $match -eq 0 ]; then ret=1; fi @@ -297,7 +297,7 @@ if $test_fixed; then for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 do dig_cmd @10.53.0.2 fixed.example > dig.out.fixed || ret=1 - diff dig.out.fixed dig.out.fixed.good || ret=1 + diff dig.out.fixed reference.dig.out.fixed.good || ret=1 done if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret)) @@ -367,7 +367,7 @@ do match=0 for j in $GOOD_RANDOM do - eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1" + eval "diff dig.out.random reference.dig.out.random.good$j >/dev/null && match$j=1 match=1" if [ $match -eq 1 ]; then break; fi done if [ $match -eq 0 ]; then ret=1; fi @@ -406,7 +406,7 @@ if $test_fixed; then for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 do dig_cmd @10.53.0.3 fixed.example > dig.out.fixed || ret=1 - diff dig.out.fixed dig.out.fixed.good || ret=1 + diff dig.out.fixed reference.dig.out.fixed.good || ret=1 done if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret)) @@ -480,7 +480,7 @@ do match=0 for j in $GOOD_RANDOM do - eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1" + eval "diff dig.out.random reference.dig.out.random.good$j >/dev/null && match$j=1 match=1" if [ $match -eq 1 ]; then break; fi done if [ $match -eq 0 ]; then ret=1; fi @@ -522,7 +522,7 @@ do match=0 for j in $GOOD_RANDOM do - eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1" + eval "diff dig.out.random reference.dig.out.random.good$j >/dev/null && match$j=1 match=1" if [ $match -eq 1 ]; then break; fi done if [ $match -eq 0 ]; then ret=1; fi diff --git a/bin/tests/system/serve-stale/.gitignore b/bin/tests/system/serve-stale/.gitignore index 3d3bc7f474..518f051e4b 100644 --- a/bin/tests/system/serve-stale/.gitignore +++ b/bin/tests/system/serve-stale/.gitignore @@ -1,5 +1,4 @@ /ans2/ans.pid -/ans2/ans.pl /ns1/named.conf /ns3/named.conf /ns3/root.bk diff --git a/contrib/dlz/modules/mysqldyn/.gitignore b/contrib/dlz/modules/mysqldyn/.gitignore deleted file mode 100644 index f3c7a7c5da..0000000000 --- a/contrib/dlz/modules/mysqldyn/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Makefile diff --git a/util/check-gitignore.sh b/util/check-gitignore.sh new file mode 100755 index 0000000000..d273dd464e --- /dev/null +++ b/util/check-gitignore.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# SPDX-License-Identifier: MPL-2.0 +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, you can obtain one at https://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +ignored_yet_tracked="$(git ls-files --cached --ignored --exclude-standard | git check-ignore --verbose --stdin --no-index)" + +if [ -n "${ignored_yet_tracked}" ]; then + echo "The following .gitignore files contain patterns matching tracked files:" + echo + echo "${ignored_yet_tracked}" + echo + echo "Please adjust the contents of the above .gitignore files and/or the names of the tracked files." + exit 1 +fi