From 45e77a3680c53c5f48657972a2d718079778fbb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Thu, 12 Jul 2018 13:35:10 +0200 Subject: [PATCH 1/6] Add "-f" to command line arguments for autoreconf in autogen.sh Depending on tool versions used, "autoreconf -i" may not update all Autoconf-generated files, which in turn may result in build errors. Make autogen.sh call autoreconf with the "-f" command line argument to ensure all Autoconf-generated files are updated when autogen.sh is run. --- autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 7add8eabc1..583b00d870 100755 --- a/autogen.sh +++ b/autogen.sh @@ -10,4 +10,4 @@ # information regarding copyright ownership. # Run this script after modifying configure.in to generate configure -autoreconf -i +autoreconf -f -i From 12df6829d17925f03ab752872cd93ad228f69e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Thu, 12 Jul 2018 13:35:10 +0200 Subject: [PATCH 2/6] Update ATF path in the ./configure invocation used during CI The Docker images used for CI install ATF to /usr, not /usr/local. Update the ./configure invocation in .gitlab-ci.yml accordingly in order to prevent confusion. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c05aae1d1..450bc22d0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -100,7 +100,7 @@ stages: - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}" - ./autogen.sh script: - - ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr/local --with-libidn2 + - ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr --with-libidn2 - make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1 artifacts: expire_in: '1 hour' From cc0e8cda71fb60dee58ff8f91d49bb851e648dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Thu, 12 Jul 2018 13:35:10 +0200 Subject: [PATCH 3/6] Include conf.sh from all prereq.sh scripts Every prereq.sh script must include bin/tests/system/conf.sh, otherwise if some prerequisite is not met, errors about echo_i not being found will be printed instead of actual error messages. --- bin/tests/system/ixfr/prereq.sh | 3 +++ bin/tests/system/statistics/prereq.sh | 3 +++ bin/tests/system/statschannel/prereq.sh | 3 +++ bin/tests/system/upforwd/prereq.sh | 3 +++ bin/tests/system/xfer/prereq.sh | 3 +++ 5 files changed, 15 insertions(+) diff --git a/bin/tests/system/ixfr/prereq.sh b/bin/tests/system/ixfr/prereq.sh index affe54bfcf..0e299f4db8 100644 --- a/bin/tests/system/ixfr/prereq.sh +++ b/bin/tests/system/ixfr/prereq.sh @@ -9,6 +9,9 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +SYSTEMTESTTOP=.. +. $SYSTEMTESTTOP/conf.sh + if $PERL -e 'use Net::DNS;' 2>/dev/null then : diff --git a/bin/tests/system/statistics/prereq.sh b/bin/tests/system/statistics/prereq.sh index 9bca4f871d..ec3fefe08a 100644 --- a/bin/tests/system/statistics/prereq.sh +++ b/bin/tests/system/statistics/prereq.sh @@ -9,6 +9,9 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +SYSTEMTESTTOP=.. +. $SYSTEMTESTTOP/conf.sh + if $PERL -e 'use Net::DNS;' 2>/dev/null then if $PERL -e 'use Net::DNS; die if ($Net::DNS::VERSION >= 0.76 && $Net::DNS::VERSION <= 0.77);' 2>/dev/null diff --git a/bin/tests/system/statschannel/prereq.sh b/bin/tests/system/statschannel/prereq.sh index ef052f5580..f3d4fd17a6 100644 --- a/bin/tests/system/statschannel/prereq.sh +++ b/bin/tests/system/statschannel/prereq.sh @@ -9,6 +9,9 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +SYSTEMTESTTOP=.. +. $SYSTEMTESTTOP/conf.sh + fail=0 if $PERL -e 'use File::Fetch;' 2>/dev/null diff --git a/bin/tests/system/upforwd/prereq.sh b/bin/tests/system/upforwd/prereq.sh index affe54bfcf..0e299f4db8 100644 --- a/bin/tests/system/upforwd/prereq.sh +++ b/bin/tests/system/upforwd/prereq.sh @@ -9,6 +9,9 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +SYSTEMTESTTOP=.. +. $SYSTEMTESTTOP/conf.sh + if $PERL -e 'use Net::DNS;' 2>/dev/null then : diff --git a/bin/tests/system/xfer/prereq.sh b/bin/tests/system/xfer/prereq.sh index daa3d5d86c..b8982d610c 100644 --- a/bin/tests/system/xfer/prereq.sh +++ b/bin/tests/system/xfer/prereq.sh @@ -9,6 +9,9 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +SYSTEMTESTTOP=.. +. $SYSTEMTESTTOP/conf.sh + if $PERL -e 'use Net::DNS;' 2>/dev/null then if $PERL -e 'use Net::DNS; die if ($Net::DNS::VERSION >= 0.69 && $Net::DNS::VERSION <= 0.74);' 2>/dev/null From fd30a03f2b3e7e96598aab3b28e011911fd8a679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Thu, 12 Jul 2018 13:35:10 +0200 Subject: [PATCH 4/6] Remove IDN subtest from the "digdelv" system test The output of certain "dig +idnout" invocations may be locale-dependent. Remove the "dig +idnout" subtest from the "digdelv" system test as IDN support is already thoroughly tested by the "idna" system test. --- bin/tests/system/digdelv/tests.sh | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index fa80a91019..6cd321e79f 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -443,23 +443,6 @@ if [ -x ${DIG} ] ; then if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` - n=`expr $n + 1` - if $FEATURETEST --with-idn - then - echo_i "checking dig +idnout ($n)" - ret=0 - $DIG $DIGOPTS @10.53.0.3 +noidnout xn--caf-dma.example. > dig.out.1.test$n 2>&1 || ret=1 - $DIG $DIGOPTS @10.53.0.3 +idnout xn--caf-dma.example. > dig.out.2.test$n 2>&1 || ret=1 - grep "^xn--caf-dma.example" dig.out.1.test$n > /dev/null || ret=1 - grep "^xn--caf-dma.example" dig.out.2.test$n > /dev/null && ret=1 - grep 10.1.2.3 dig.out.1.test$n > /dev/null || ret=1 - grep 10.1.2.3 dig.out.2.test$n > /dev/null || ret=1 - if [ $ret != 0 ]; then echo_i "failed"; fi - status=`expr $status + $ret` - else - echo_i "skipping 'dig +idnout' as IDN support is not enabled ($n)" - fi - n=`expr $n + 1` echo_i "checking that dig warns about .local queries ($n)" ret=0 From 2be97feb4642746660dd793beed54b193579db0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Thu, 12 Jul 2018 13:35:10 +0200 Subject: [PATCH 5/6] Do not spam console if "git status --ignored" fails during tests The "git status" command in Git versions before 1.7.2 does not support the "--ignored" option. Prevent spamming the console when running system tests from a Git repository on a host with an ancient Git version installed. --- bin/tests/system/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tests/system/run.sh b/bin/tests/system/run.sh index 600cacd5c8..0e7632ffbf 100755 --- a/bin/tests/system/run.sh +++ b/bin/tests/system/run.sh @@ -194,7 +194,7 @@ else $SHELL clean.sh $runall $systest "$@" if test -d ../../../.git then - git status -su --ignored $systest | \ + git status -su --ignored $systest 2>/dev/null | \ sed -n -e 's|^?? \(.*\)|I:file \1 not removed|p' \ -e 's|^!! \(.*/named.run\)$|I:file \1 not removed|p' \ -e 's|^!! \(.*/named.memstats\)$|I:file \1 not removed|p' From f0966d1485816c95bf312e41e7796a374b2b0fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Thu, 12 Jul 2018 13:35:10 +0200 Subject: [PATCH 6/6] Add CentOS 6/7 to CI Modify .gitlab-ci.yml so that every CI pipeline also builds and tests BIND on CentOS versions 6 and 7. Use --disable-warn-error on CentOS 6 since it uses GCC 4.4.7 which suffers from bugs causing bogus warnings to be generated, e.g.: sigs_test.c: In function 'compare_tuples': sigs_test.c:75: warning: declaration of 'index' shadows a global declaration /usr/include/string.h:489: warning: shadowed declaration is here sigs_test.c: In function 'updatesigs_test': sigs_test.c:193: warning: declaration of 'index' shadows a global declaration /usr/include/string.h:489: warning: shadowed declaration is here --- .gitlab-ci.yml | 55 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 450bc22d0a..d4ca60e3f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,20 @@ stages: - build - test +.centos-centos6-amd64: ¢os_centos6_amd64_image + image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64" + tags: + - linux + - docker + - amd64 + +.centos-centos7-amd64: ¢os_centos7_amd64_image + image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64" + tags: + - linux + - docker + - amd64 + .debian-jessie-amd64: &debian_jessie_amd64_image image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64" tags: @@ -100,7 +114,7 @@ stages: - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}" - ./autogen.sh script: - - ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr --with-libidn2 + - ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr --with-libidn2 "${EXTRA_CONFIGURE}" - make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1 artifacts: expire_in: '1 hour' @@ -178,6 +192,21 @@ precheck:debian:sid:amd64: # <<: *ubuntu_xenial_i386_image # <<: *build_job +build:centos:centos6:amd64: + variables: + CC: gcc + CFLAGS: "-Wall -Wextra -O2 -g" + EXTRA_CONFIGURE: "--disable-warn-error" + <<: *centos_centos6_amd64_image + <<: *build_job + +build:centos:centos7:amd64: + variables: + CC: gcc + CFLAGS: "-Wall -Wextra -O2 -g" + <<: *centos_centos7_amd64_image + <<: *build_job + build:clang:debian:sid:amd64: variables: CC: clang-6.0 @@ -206,6 +235,18 @@ build:debian:sid:i386: <<: *debian_sid_i386_image <<: *build_job +unittest:centos:centos6:amd64: + <<: *centos_centos6_amd64_image + <<: *unit_test_job + dependencies: + - build:centos:centos6:amd64 + +unittest:centos:centos7:amd64: + <<: *centos_centos7_amd64_image + <<: *unit_test_job + dependencies: + - build:centos:centos7:amd64 + unittest:debian:sid:amd64: <<: *debian_sid_amd64_image <<: *unit_test_job @@ -224,6 +265,18 @@ unittest:debian:sid:i386: dependencies: - build:debian:sid:i386 +systemtest:centos:centos6:amd64: + <<: *centos_centos6_amd64_image + <<: *system_test_job + dependencies: + - build:centos:centos6:amd64 + +systemtest:centos:centos7:amd64: + <<: *centos_centos7_amd64_image + <<: *system_test_job + dependencies: + - build:centos:centos7:amd64 + systemtest:debian:sid:amd64: <<: *debian_sid_amd64_image <<: *system_test_job