From c3cf61242574599392774b6119fe4d93d307e5b1 Mon Sep 17 00:00:00 2001 From: Petr Sklenar Date: Tue, 1 Feb 2022 08:52:32 +0000 Subject: [PATCH 001/165] Update Smoke/IpaInstallAndStart/test.sh --- Smoke/IpaInstallAndStart/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 20d0a2f..a01613a 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -7,6 +7,7 @@ # Author: Petr Sklenar # test based on original Petr Mensik's tests # +# # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 57d80fe8c1ca80abf10ed58e8b4e8cdb111f50fc Mon Sep 17 00:00:00 2001 From: Petr Sklenar Date: Tue, 1 Feb 2022 10:00:30 +0100 Subject: [PATCH 002/165] x --- Smoke/IpaInstallAndStart/main.fmf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index 50ee2f0..21c2082 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -1,3 +1,5 @@ summary: Ipa install, Start and basic usage test: ./test.sh framework: beakerlib +component: + - bind From b272549544d9b7e81c4f9b25ed554814e50dc508 Mon Sep 17 00:00:00 2001 From: Petr Sklenar Date: Tue, 1 Feb 2022 10:58:07 +0100 Subject: [PATCH 003/165] time adjust --- Smoke/IpaInstallAndStart/main.fmf | 1 + Smoke/IpaInstallAndStart/test.sh | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index 21c2082..f9ed755 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -1,5 +1,6 @@ summary: Ipa install, Start and basic usage test: ./test.sh framework: beakerlib +duration: 66m component: - bind diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 20d0a2f..6c8a33e 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -25,7 +25,6 @@ fetch_local_ipv4() prepareIpaServer() { - rlRun "dnf -y module install idm:DL1" rlRun "dnf -y install freeipa-server-dns" HOSTNAME=`hostname` if echo $HOSTNAME | grep '\.' @@ -68,7 +67,6 @@ NSUPDATE rlJournalStart rlPhaseStartSetup - rlAssertRpm $PACKAGE rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "TestDir=`pwd`" 0 "Saving test directory" rlRun "pushd $TmpDir" @@ -91,19 +89,19 @@ rlJournalStart rlRun "kinit -kt /etc/krb5.keytab" 0 "Login machine into kerberos" rlRun "klist" 0 "Ensure some ticket is there" rlRun "make_update > update" - rlRun "cp $TestDir/update.gdb update.gdb" + rlRun "/usr/bin/nsupdate -g -d update" rlPhaseEnd - rlPhaseStartCleanup - ipa-server-install --uninstall --unattended - killall bind - systemctl daemon-reload - rlServiceStop - rlRun "rm -f $rlRun_LOG" - rlRun "popd" - rlRun "hostname ${ORIG_HOSTNAME}" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd +# rlPhaseStartCleanup +# ipa-server-install --uninstall --unattended +# killall bind +# systemctl daemon-reload +# rlServiceStop +# rlRun "rm -f $rlRun_LOG" +# rlRun "popd" +# rlRun "hostname ${ORIG_HOSTNAME}" +# rlRun "rm -r $TmpDir" 0 "Removing tmp directory" +# rlPhaseEnd rlJournalPrintText rlJournalEnd From bf030a963e64439d123b25a296ba18cf74ac76a6 Mon Sep 17 00:00:00 2001 From: Petr Sklenar Date: Tue, 1 Feb 2022 11:11:52 +0100 Subject: [PATCH 004/165] debug --- Smoke/IpaInstallAndStart/test.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 6c8a33e..cd9b4a1 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -89,19 +89,22 @@ rlJournalStart rlRun "kinit -kt /etc/krb5.keytab" 0 "Login machine into kerberos" rlRun "klist" 0 "Ensure some ticket is there" rlRun "make_update > update" - rlRun "/usr/bin/nsupdate -g -d update" + #rlRun "/usr/bin/nsupdate -g -d update" + echo "===============DEBUG" + /usr/bin/nsupdate -g -d update + echo "=============== END of DEBUG" rlPhaseEnd -# rlPhaseStartCleanup -# ipa-server-install --uninstall --unattended -# killall bind -# systemctl daemon-reload -# rlServiceStop -# rlRun "rm -f $rlRun_LOG" -# rlRun "popd" -# rlRun "hostname ${ORIG_HOSTNAME}" -# rlRun "rm -r $TmpDir" 0 "Removing tmp directory" -# rlPhaseEnd + rlPhaseStartCleanup + ipa-server-install --uninstall --unattended + killall bind + systemctl daemon-reload + rlServiceStop + rlRun "rm -f $rlRun_LOG" + rlRun "popd" + rlRun "hostname ${ORIG_HOSTNAME}" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd rlJournalPrintText rlJournalEnd From eb1fc037c08ff1e309ab8a41674b9679138bde7a Mon Sep 17 00:00:00 2001 From: Petr Sklenar Date: Tue, 1 Feb 2022 11:19:21 +0100 Subject: [PATCH 005/165] more time --- Smoke/IpaInstallAndStart/main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index f9ed755..06a47d8 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -1,6 +1,6 @@ summary: Ipa install, Start and basic usage test: ./test.sh framework: beakerlib -duration: 66m +duration: 67m component: - bind From c8ecdd51bcbb4585f2321ffa14d454d0e5aeb73e Mon Sep 17 00:00:00 2001 From: Petr Sklenar Date: Tue, 1 Feb 2022 11:32:48 +0100 Subject: [PATCH 006/165] contact --- Smoke/IpaInstallAndStart/main.fmf | 1 + 1 file changed, 1 insertion(+) diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index 06a47d8..d34c78c 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -2,5 +2,6 @@ summary: Ipa install, Start and basic usage test: ./test.sh framework: beakerlib duration: 67m +contact: Petr Sklenar component: - bind From 52aed227571a437f998344f9e5bc74f87190e444 Mon Sep 17 00:00:00 2001 From: Petr Sklenar Date: Tue, 1 Feb 2022 11:54:19 +0100 Subject: [PATCH 007/165] test debug --- Smoke/IpaInstallAndStart/test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index cd9b4a1..60c2104 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -77,7 +77,7 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest - for i in `seq 5 6`;do + for i in `seq 5 10`;do rlRun "ipactl restart" sleep $i rlRun "systemctl restart named.service" @@ -91,6 +91,9 @@ rlJournalStart rlRun "make_update > update" #rlRun "/usr/bin/nsupdate -g -d update" echo "===============DEBUG" + echo "file update" + cat update + echo "nsupdate -g -d update" /usr/bin/nsupdate -g -d update echo "=============== END of DEBUG" rlPhaseEnd From ead58772188654d914dc7a6339994591d1a58535 Mon Sep 17 00:00:00 2001 From: Petr Sklenar Date: Tue, 1 Feb 2022 10:59:50 +0000 Subject: [PATCH 008/165] Update Smoke/IpaInstallAndStart/main.fmf --- Smoke/IpaInstallAndStart/main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index d34c78c..28b4f57 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -1,7 +1,7 @@ summary: Ipa install, Start and basic usage test: ./test.sh framework: beakerlib -duration: 67m +duration: 68m contact: Petr Sklenar component: - bind From a22c89f57786ea38bf24dc01b1d0684f577065d2 Mon Sep 17 00:00:00 2001 From: Petr Sklenar Date: Tue, 1 Feb 2022 12:05:13 +0100 Subject: [PATCH 009/165] bind version --- Smoke/IpaInstallAndStart/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 60c2104..fe2034c 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -67,6 +67,7 @@ NSUPDATE rlJournalStart rlPhaseStartSetup + rlLog "`rpm -qa | grep bind`" rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "TestDir=`pwd`" 0 "Saving test directory" rlRun "pushd $TmpDir" From 40c4349cbbf6ef9cd626c6305046cc920bca92c2 Mon Sep 17 00:00:00 2001 From: Petr Sklenar Date: Tue, 1 Feb 2022 12:24:57 +0100 Subject: [PATCH 010/165] bind version --- Smoke/IpaInstallAndStart/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index fe2034c..710450f 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -92,9 +92,9 @@ rlJournalStart rlRun "make_update > update" #rlRun "/usr/bin/nsupdate -g -d update" echo "===============DEBUG" - echo "file update" + echo "file update\n----------" cat update - echo "nsupdate -g -d update" + echo "nsupdate -g -d update\n---------" /usr/bin/nsupdate -g -d update echo "=============== END of DEBUG" rlPhaseEnd From 58843581175896e11565ed4dc60d3e9ad6c4fa3b Mon Sep 17 00:00:00 2001 From: Petr Sklenar Date: Tue, 1 Feb 2022 13:26:47 +0100 Subject: [PATCH 011/165] pkgs version --- Smoke/IpaInstallAndStart/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 710450f..3bdcafc 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -67,7 +67,6 @@ NSUPDATE rlJournalStart rlPhaseStartSetup - rlLog "`rpm -qa | grep bind`" rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "TestDir=`pwd`" 0 "Saving test directory" rlRun "pushd $TmpDir" @@ -75,6 +74,8 @@ rlJournalStart rlPhaseStartSetup "Prepare IPA" prepareIpaServer + rpm -qa | grep bind > pkgs + rlLog "`cat pkgs`" rlPhaseEnd rlPhaseStartTest From 63eedc2dc18c285b964414572011ae83c62afb3e Mon Sep 17 00:00:00 2001 From: Petr Sklenar Date: Wed, 20 Apr 2022 09:33:25 +0200 Subject: [PATCH 012/165] bind should work now. --- Smoke/IpaInstallAndStart/test.sh | 5 +++++ main.fmf | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 main.fmf diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 3bdcafc..1514cef 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -25,6 +25,11 @@ fetch_local_ipv4() prepareIpaServer() { + if rlIsRHEL >= 8 + then + rlRun "dnf -y module install idm:DL1" + fi + rlRun "dnf -y install freeipa-server-dns" HOSTNAME=`hostname` if echo $HOSTNAME | grep '\.' diff --git a/main.fmf b/main.fmf new file mode 100644 index 0000000..41e2fab --- /dev/null +++ b/main.fmf @@ -0,0 +1,2 @@ +# QE owner +contact: Petr Sklenar From 8092bee1d39087d58c440bf88514a76cf3d7246b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Thu, 4 Aug 2022 12:38:41 +0200 Subject: [PATCH 013/165] Remove dnssec-enabled yes statement It is not supported since 9.16+ and is always enabled. It is also enabled by default on earlier 9.11. There is no reason it has to be present, except maybe for very old 9.8 or 9.9 versions. --- Sanity/geoip-support/named.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/Sanity/geoip-support/named.conf b/Sanity/geoip-support/named.conf index d44d64d..9918c15 100644 --- a/Sanity/geoip-support/named.conf +++ b/Sanity/geoip-support/named.conf @@ -32,7 +32,6 @@ options { */ recursion yes; - dnssec-enable yes; dnssec-validation yes; /* Path to ISC DLV key */ From 556e3d028cabe9bc2f13b9caaefbe32fa8d84c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 9 Sep 2022 15:33:22 +0200 Subject: [PATCH 014/165] Get Back internal test suite Imported back from commit 45a1f718bf309dab278267e028f8bd196c0abd51 --- Sanity/Run-internal-BIND-test-suite/Makefile | 74 +++++++ Sanity/Run-internal-BIND-test-suite/PURPOSE | 6 + .../bind-systest-filter.sh | 47 +++++ .../Run-internal-BIND-test-suite/knownerror | 2 + Sanity/Run-internal-BIND-test-suite/main.fmf | 41 ++++ .../Run-internal-BIND-test-suite/runtest.sh | 184 ++++++++++++++++++ .../setup-named-softhsm.sh | 123 ++++++++++++ 7 files changed, 477 insertions(+) create mode 100644 Sanity/Run-internal-BIND-test-suite/Makefile create mode 100644 Sanity/Run-internal-BIND-test-suite/PURPOSE create mode 100755 Sanity/Run-internal-BIND-test-suite/bind-systest-filter.sh create mode 100644 Sanity/Run-internal-BIND-test-suite/knownerror create mode 100644 Sanity/Run-internal-BIND-test-suite/main.fmf create mode 100755 Sanity/Run-internal-BIND-test-suite/runtest.sh create mode 100755 Sanity/Run-internal-BIND-test-suite/setup-named-softhsm.sh diff --git a/Sanity/Run-internal-BIND-test-suite/Makefile b/Sanity/Run-internal-BIND-test-suite/Makefile new file mode 100644 index 0000000..45ce719 --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/Makefile @@ -0,0 +1,74 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of tests/Run-internal-BIND-test-suite +# Description: Run internal BIND test suite +# Author: Martin Cermak +# Author: Petr Mensik +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2010 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/bind/Sanity/Run-internal-BIND-test-suite +export TESTVERSION=1.3 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE knownerror* setup-named-softhsm.sh bind-systest-filter.sh + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +$(METADATA): Makefile + @echo "Owner: Martin Cermak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Run internal BIND test suite" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 8h" >> $(METADATA) + @echo "RunFor: bind" >> $(METADATA) + @echo "Requires: bind rpm-build bind-utils" >> $(METADATA) + @echo "Requires: perl-Net-DNS perl-Net-DNS-Nameserver" >> $(METADATA) + @echo "Requires: perl-Time-HiRes" >> $(METADATA) + @echo "Requires: bind-pkcs11 bind-pkcs11-utils softhsm" >> $(METADATA) + @echo "Requires: openssl-devel libtool autoconf" >> $(METADATA) +# Try to satisfy all build dependencies from here + @echo "Requires: bind-devel" >> $(METADATA) + @echo "Requires: net-tools" >> $(METADATA) + @echo "Requires: dnf-utils" >> $(METADATA) + @echo "Requires: kyua" >> $(METADATA) + @echo "Requires: libcmocka-devel" >> $(METADATA) +# Obsolete, uses cmocka +# @echo "Requires: libatf-c gcc-c++" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 642970" >> $(METADATA) + diff --git a/Sanity/Run-internal-BIND-test-suite/PURPOSE b/Sanity/Run-internal-BIND-test-suite/PURPOSE new file mode 100644 index 0000000..754ba2a --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/PURPOSE @@ -0,0 +1,6 @@ +PURPOSE of tests/Run-internal-BIND-test-suite +Description: Run internal BIND test suite +Author: Martin Cermak +Bug summary: Run internal BIND test suite +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=642970 + diff --git a/Sanity/Run-internal-BIND-test-suite/bind-systest-filter.sh b/Sanity/Run-internal-BIND-test-suite/bind-systest-filter.sh new file mode 100755 index 0000000..8a153a1 --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/bind-systest-filter.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This script will filter out output from BINDs tests +# It supports form from BIND 9.9 and BIND 9.11 +# Its purpose is to display only failed tests from list of all tests + +CURRENT_TEST= +CURRENT_OUTPUT= +STATUS_ONLY= + +for P; do + case "$P" in + -s|--status) STATUS_ONLY=yes; shift ;; + esac +done + +cat $@ | while read LINE; do + if [ "${LINE#S:}" != "$LINE" ]; then + CURRENT_TEST=`echo $LINE | cut -d: -f2` + CURRENT_OUTPUT="$LINE"$'\n' + elif [ "${LINE#R:}" != "$LINE" ]; then + # echo "$CURRENT_TEST $LINE" + if [ "${LINE/#R:*:*}" != "$LINE" ]; then + # more recent results contain test name + # R:dlz:FAIL + CURRENT_TEST="${LINE#R:}" + CURRENT_TEST="${CURRENT_TEST/%:*}" + RESULT="${LINE/#*:}" + else + # S:dlz:time + # R:FAIL + RESULT="${LINE/#R*:/}" + fi + if [ "$RESULT" != "PASS" ]; then + if [ -n "$STATUS_ONLY" ]; then + echo "$RESULT $CURRENT_TEST" + else + CURRENT_OUTPUT+="$LINE" + echo "$CURRENT_OUTPUT" + echo + fi + fi + CURRENT_OUTPUT= + else + CURRENT_OUTPUT+="$LINE"$'\n' + fi +done diff --git a/Sanity/Run-internal-BIND-test-suite/knownerror b/Sanity/Run-internal-BIND-test-suite/knownerror new file mode 100644 index 0000000..2d0c8e9 --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/knownerror @@ -0,0 +1,2 @@ +A:System test dlz +A:System test idna diff --git a/Sanity/Run-internal-BIND-test-suite/main.fmf b/Sanity/Run-internal-BIND-test-suite/main.fmf new file mode 100644 index 0000000..5ca945c --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/main.fmf @@ -0,0 +1,41 @@ +summary: Run internal BIND test suite +description: |+ + Bug summary: Run internal BIND test suite + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=642970 + +contact: Petr Sklenar +component: +- bind +test: ./runtest.sh +require: +- bind +- rpm-build +- bind-utils +- perl-Net-DNS +- perl-Net-DNS-Nameserver +- perl-Time-HiRes +- bind-pkcs11 +- bind-pkcs11-utils +- softhsm +- openssl-devel +- libtool +- autoconf +- bind-devel +- net-tools +- dnf-utils +- kyua +- libcmocka-devel +duration: 8h +enabled: true +tag: +- CI-Tier-1 +- TIPfail +- buildroot +- notier +- notip +- rhel8-buildroot +- source +- build +extra-summary: /CoreOS/bind/Sanity/Run-internal-BIND-test-suite +extra-task: /CoreOS/bind/Sanity/Run-internal-BIND-test-suite +extra-nitrate: TC#0126580 diff --git a/Sanity/Run-internal-BIND-test-suite/runtest.sh b/Sanity/Run-internal-BIND-test-suite/runtest.sh new file mode 100755 index 0000000..cd845f0 --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/runtest.sh @@ -0,0 +1,184 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of tests/Run-internal-BIND-test-suite +# Description: Run internal BIND test suite +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2010 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include rhts environment +. /usr/lib/beakerlib/beakerlib.sh + +PACKAGE="bind" + +# Set those variables to n to skip tests on variants +#DEFAULT_VARIANTS="normal pkcs11 sdb" +DEFAULT_VARIANTS="normal" +#TEST_VARIANTS="normal" + +# +# Runs test suite and checks known errors +# Prepared to be repeated with another variants +run_testsuite() +{ + local RESULT_TEXT="$TMPDIR/test${NAMED_VARIANT}.txt" + local FOUNDERROR=`mktemp found-XXXXXXXX.err` + local KNOWNERROR=/dev/null + + if [ -f "$ORIG/knownerror${NAMED_VARIANT}.$TAG" ]; then + KNOWNERROR=`readlink -f $ORIG/knownerror.$TAG` + elif [ -f "$ORIG/knownerror${NAMED_VARIANT}" ]; then + KNOWNERROR=`readlink -f $ORIG/knownerror` + fi + + # Sometime it can fail. Report just failures that are not known + rlRun "make test -j${CORES:-1} &> $RESULT_TEXT" 0-255 "Perform the test." + rlRun "grep -C 10 FAIL $RESULT_TEXT" 0-255 "Quickly show the test error (if any)." + + rlRun "$FILTER $RESULT_TEXT" 0 "Showing unsuccessful tests" + rlRun "$FILTER -s $RESULT_TEXT > $FOUNDERROR" 0 + rlRun "ls $KNOWNERROR $FOUNDERROR $RESULT_TEXT" 0 'check if there is needed files' + rlLog "`cat $FOUNDERROR`" + + rlAssertLesserOrEqual "Checking number of found errors is in limits" "$(grep '^FAIL' $FOUNDERROR | wc -l)" "$(wc -l <$KNOWNERROR)" + cat $FOUNDERROR | while read STATUS TEST ; do + if [ "$STATUS" = FAIL ]; then + rlRun "grep '$TEST' $KNOWNERROR" 0 "Check $TEST failure is expected" + else + rlLog "$STATUS $TEST" + fi + done +} + +rlJournalStart + rlPhaseStartSetup + # package assertions + rlAssertRpm $PACKAGE + rlAssertRpm rpm-build + rlAssertRpm perl-Net-DNS-Nameserver + + #pwd + ORIG=`pwd` + SETUP_SOFTHSM=`readlink -f setup-named-softhsm.sh` + FILTER=`readlink -f bind-systest-filter.sh` + CORES=`grep 'processor\s*:' /proc/cpuinfo | wc -l` + + TAG=generic + if [ -f /etc/os-release ]; then + # extract platform tag + TAG=`(source /etc/os-release && echo ${PLATFORM_ID#platform:})` + fi + + #tempdir + rlRun "TMPDIR=\`mktemp -d\`" 0 "Creating tmp directory" + rlRun "pushd $TMPDIR" + + # topdir + TOPDIR=`rpm -E '%{_topdir}'` + + # cleanup in topdir + mkdir -p $TOPDIR/{BUILD,SOURCES,SPECS} + rm -rf $TOPDIR/{BUILD,SOURCES,SPECS}/* + + # download src rpm + if ! ls bind*.src.rpm; then + rlRun "dnf --enablerepo='*-source' download --source bind" 0 "Fetch source from repository" + rlRun "rpm -i bind*.src.rpm" + fi + + rlRun "rpm --define '_topdir $TOPDIR' -Uvh *rpm &> $TMPDIR/install.txt" + rlRun "cd $TOPDIR/SPECS" + + rlRun "dnf -y builddep *.spec" + + # stop bind if it is running + rlServiceStop named + rlPhaseEnd + + rlPhaseStartTest + # rebuild from source + rlRun "rpmbuild -ba *.spec &> $TMPDIR/build.txt" + + # the test + rlRun "cd $TOPDIR/BUILD/bind*" + + rlLogInfo "Test takes place in `pwd`" + + rlRun "chown -R root ." + + if [ -x "$SETUP_SOFTHSM" ] && [ -n "$(type -p pkcs11-tokens)" ]; then + rlRun "eval \"$(bash $SETUP_SOFTHSM -A)\"" 0 "Preparing PKCS#11 token slot" + rlRun "pkcs11-tokens" 0 "Testing token slot availability" + else + rlLog "PKCS#11 not initialized" + fi + + if [ -d build ]; then + BUILD=build + else + BUILD=. + fi + + rlRun "./bin/tests/system/ifconfig.sh up" 0 "Setup fake network interfaces." + + # required by idna test + export LC_ALL=en_US.UTF-8 + + rlRun "pushd $BUILD" + + if echo "${TEST_VARIANTS:-$DEFAULT_VARIANTS}" | grep -q normal; then + rlLog "Running normal variant" + export NAMED_VARIANT= DNSSEC_VARIANT= + run_testsuite + rlLog "Finished normal variant" + fi + + if echo "${TEST_VARIANTS:-$DEFAULT_VARIANTS}" | grep -q sdb; then + rlLog "Running sdb variant" + export NAMED_VARIANT=-sdb DNSSEC_VARIANT= + run_testsuite + rlLog "Finished sdb variant" + fi + + if echo "${TEST_VARIANTS:-$DEFAULT_VARIANTS}" | grep -q pkcs11; then + rlLog "Running pkcs11 variant" + # Unfortunately, PKCS11 variant uses shared key storage + # It cannot use more threads for that reason + export NAMED_VARIANT=-pkcs11 DNSSEC_VARIANT=-pkcs11 + CORES=1 run_testsuite + rlLog "Finished pkcs11 variant" + fi + + rlRun "popd" + + rlRun "./bin/tests/system/ifconfig.sh down" 0 "Remove fake network interfaces." + + rlPhaseEnd + + rlPhaseStartCleanup + rlBundleLogs "BUILD_LOGS" "$TMPDIR/install.txt" "$TMPDIR/builddeps.txt" "$TMPDIR/build.txt" + rlBundleLogs "TEST_LOGS" "$TMPDIR"/test*.txt + rlRun "popd" + rlRun "rm -r $TMPDIR" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalEnd diff --git a/Sanity/Run-internal-BIND-test-suite/setup-named-softhsm.sh b/Sanity/Run-internal-BIND-test-suite/setup-named-softhsm.sh new file mode 100755 index 0000000..a13c91e --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/setup-named-softhsm.sh @@ -0,0 +1,123 @@ +#!/bin/sh +# +# This script will initialise token storage of softhsm PKCS11 provider +# in custom location. Is useful to store tokens in non-standard location. +# +# Output can be evaluated from bash, it will prepare it for usage of temporary tokens. +# Recommended use: +# eval $(bash setup-named-softhsm.sh -A) +# + +SOFTHSM2_CONF="$1" +TOKENPATH="$2" +GROUPNAME="$3" +# Do not use this script for real keys worth protection +# This is intended for crypto accelerators using PKCS11 interface. +# Uninitialized token would fail any crypto operation. +PIN=1234 +SO_PIN=1234 +LABEL=rpm + +set -e + +echo_i() +{ + echo "#" $@ +} + +random() +{ + if [ -x "$(which openssl 2>/dev/null)" ]; then + openssl rand -base64 $1 + else + dd if=/dev/urandom bs=1c count=$1 | base64 + fi +} + +usage() +{ + echo "Usage: $0 -A [token directory] [group]" + echo " or: $0 [group]" +} + +if [ "$SOFTHSM2_CONF" = "-A" -a -z "$TOKENPATH" ]; then + TOKENPATH=$(mktemp -d /var/tmp/softhsm-XXXXXX) +fi + +if [ -z "$SOFTHSM2_CONF" -o -z "$TOKENPATH" ]; then + usage >&2 + exit 1 +fi + +if [ "$SOFTHSM2_CONF" = "-A" ]; then + # Automagic mode instead + MODE=secure + SOFTHSM2_CONF="$TOKENPATH/softhsm2.conf" + PIN_SOURCE="$TOKENPATH/pin" + SOPIN_SOURCE="$TOKENPATH/so-pin" + TOKENPATH="$TOKENPATH/tokens" +else + MODE=legacy +fi + +[ -d "$TOKENPATH" ] || mkdir -p "$TOKENPATH" + +umask 0022 + +if ! [ -f "$SOFTHSM2_CONF" ]; then +cat << SED > "$SOFTHSM2_CONF" +# SoftHSM v2 configuration file + +directories.tokendir = ${TOKENPATH} +objectstore.backend = file + +# ERROR, WARNING, INFO, DEBUG +log.level = ERROR + +# If CKF_REMOVABLE_DEVICE flag should be set +slots.removable = false +SED +else + echo_i "Config file $SOFTHSM2_CONF already exists" >&2 +fi + +if [ -n "$PIN_SOURCE" ]; then + touch "$PIN_SOURCE" "$SOPIN_SOURCE" + chmod 0600 "$PIN_SOURCE" "$SOPIN_SOURCE" + if [ -n "$GROUPNAME" ]; then + chgrp "$GROUPNAME" "$PIN_SOURCE" "$SOPIN_SOURCE" + chmod g+r "$PIN_SOURCE" "$SOPIN_SOURCE" + fi +fi + +export SOFTHSM2_CONF + +if softhsm2-util --show-slots | grep 'Initialized:[[:space:]]*yes' > /dev/null +then + echo_i "Token in ${TOKENPATH} is already initialized" >&2 + + [ -f "$PIN_SOURCE" ] && PIN=$(cat "$PIN_SOURCE") + [ -f "$SOPIN_SOURCE" ] && SO_PIN=$(cat "$SOPIN_SOURCE") +else + PIN=$(random 6) + SO_PIN=$(random 18) + if [ -n "$PIN_SOURCE" ]; then + echo -n "$PIN" > "$PIN_SOURCE" + echo -n "$SO_PIN" > "$SOPIN_SOURCE" + fi + + echo_i "Initializing tokens to ${TOKENPATH}..." + softhsm2-util --init-token --free --label "$LABEL" --pin "$PIN" --so-pin "$SO_PIN" | sed -e 's/^/# /' + + if [ -n "$GROUPNAME" ]; then + chgrp -R -- "$GROUPNAME" "$TOKENPATH" + chmod -R -- g=rX,o= "$TOKENPATH" + fi +fi + +echo "export SOFTHSM2_CONF=\"$SOFTHSM2_CONF\"" +echo "export PIN_SOURCE=\"$PIN_SOURCE\"" +echo "export SOPIN_SOURCE=\"$SOPIN_SOURCE\"" +# These are intentionaly not exported +echo "PIN=\"$PIN\"" +echo "SO_PIN=\"$SO_PIN\"" From 85d8ed427922fe421413676ab6763c7bbafad7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 9 Sep 2022 17:30:26 +0200 Subject: [PATCH 015/165] Update to RHEL test variant --- Sanity/Run-internal-BIND-test-suite/Makefile | 31 +- Sanity/Run-internal-BIND-test-suite/PURPOSE | 2 +- .../Run-internal-BIND-test-suite/knownerror | 1 - Sanity/Run-internal-BIND-test-suite/main.fmf | 92 ++++-- .../Run-internal-BIND-test-suite/runtest.sh | 266 ++++++++++++------ 5 files changed, 263 insertions(+), 129 deletions(-) diff --git a/Sanity/Run-internal-BIND-test-suite/Makefile b/Sanity/Run-internal-BIND-test-suite/Makefile index 45ce719..49f400a 100644 --- a/Sanity/Run-internal-BIND-test-suite/Makefile +++ b/Sanity/Run-internal-BIND-test-suite/Makefile @@ -1,9 +1,10 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# Makefile of tests/Run-internal-BIND-test-suite +# Makefile of /CoreOS/bind/Sanity/Run-internal-BIND-test-suite # Description: Run internal BIND test suite # Author: Martin Cermak # Author: Petr Mensik +# Author: Petr Sklenar # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # @@ -26,7 +27,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export TEST=/CoreOS/bind/Sanity/Run-internal-BIND-test-suite -export TESTVERSION=1.3 +export TESTVERSION=1.7 BUILT_FILES= @@ -44,31 +45,31 @@ clean: rm -f *~ $(BUILT_FILES) +include /usr/share/rhts/lib/rhts-make.include + $(METADATA): Makefile - @echo "Owner: Martin Cermak " > $(METADATA) + @echo "Owner: Petr Sklenar " > $(METADATA) @echo "Name: $(TEST)" >> $(METADATA) @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) @echo "Path: $(TEST_DIR)" >> $(METADATA) @echo "Description: Run internal BIND test suite" >> $(METADATA) @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 8h" >> $(METADATA) + @echo "TestTime: 14h" >> $(METADATA) @echo "RunFor: bind" >> $(METADATA) @echo "Requires: bind rpm-build bind-utils" >> $(METADATA) - @echo "Requires: perl-Net-DNS perl-Net-DNS-Nameserver" >> $(METADATA) - @echo "Requires: perl-Time-HiRes" >> $(METADATA) @echo "Requires: bind-pkcs11 bind-pkcs11-utils softhsm" >> $(METADATA) @echo "Requires: openssl-devel libtool autoconf" >> $(METADATA) -# Try to satisfy all build dependencies from here - @echo "Requires: bind-devel" >> $(METADATA) - @echo "Requires: net-tools" >> $(METADATA) - @echo "Requires: dnf-utils" >> $(METADATA) - @echo "Requires: kyua" >> $(METADATA) - @echo "Requires: libcmocka-devel" >> $(METADATA) -# Obsolete, uses cmocka -# @echo "Requires: libatf-c gcc-c++" >> $(METADATA) + @echo "Requires: perl perl(Net::DNS) perl(Net::DNS::Nameserver) perl(Time::HiRes)" >> $(METADATA) + @echo "Requires: perl(IO::Socket::INET6)" >> $(METADATA) + @echo "Requires: libcap-devel libidn-devel libxml2-devel kyua" >> $(METADATA) + @echo "Requires: openldap-devel postgresql-devel" >> $(METADATA) + @echo "Requires: sqlite-devel krb5-devel net-tools iproute" >> $(METADATA) + @echo "Requires: yum-utils dnf-utils rng-tools" >> $(METADATA) + @echo "Requires: gcc-c++" >> $(METADATA) @echo "Priority: Normal" >> $(METADATA) @echo "License: GPLv2" >> $(METADATA) @echo "Confidential: no" >> $(METADATA) @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 642970" >> $(METADATA) + @echo "Bug: 642970 1832812 1869502 1956777" >> $(METADATA) + rhts-lint $(METADATA) diff --git a/Sanity/Run-internal-BIND-test-suite/PURPOSE b/Sanity/Run-internal-BIND-test-suite/PURPOSE index 754ba2a..3fcf82b 100644 --- a/Sanity/Run-internal-BIND-test-suite/PURPOSE +++ b/Sanity/Run-internal-BIND-test-suite/PURPOSE @@ -1,4 +1,4 @@ -PURPOSE of tests/Run-internal-BIND-test-suite +PURPOSE of /CoreOS/bind/Sanity/Run-internal-BIND-test-suite Description: Run internal BIND test suite Author: Martin Cermak Bug summary: Run internal BIND test suite diff --git a/Sanity/Run-internal-BIND-test-suite/knownerror b/Sanity/Run-internal-BIND-test-suite/knownerror index 2d0c8e9..f9618b6 100644 --- a/Sanity/Run-internal-BIND-test-suite/knownerror +++ b/Sanity/Run-internal-BIND-test-suite/knownerror @@ -1,2 +1 @@ A:System test dlz -A:System test idna diff --git a/Sanity/Run-internal-BIND-test-suite/main.fmf b/Sanity/Run-internal-BIND-test-suite/main.fmf index 5ca945c..c9f25d5 100644 --- a/Sanity/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/Run-internal-BIND-test-suite/main.fmf @@ -1,41 +1,73 @@ summary: Run internal BIND test suite -description: |+ +description: | Bug summary: Run internal BIND test suite Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=642970 + contact: Petr Sklenar component: -- bind + - bind test: ./runtest.sh -require: -- bind -- rpm-build -- bind-utils -- perl-Net-DNS -- perl-Net-DNS-Nameserver -- perl-Time-HiRes -- bind-pkcs11 -- bind-pkcs11-utils -- softhsm -- openssl-devel -- libtool -- autoconf -- bind-devel -- net-tools -- dnf-utils -- kyua -- libcmocka-devel -duration: 8h +framework: beakerlib +recommend: + - bind + - rpm-build + - bind-utils + - bind-pkcs11 + - bind-pkcs11-utils + - softhsm + - openssl-devel + - libtool + - autoconf + - perl + - perl(Net::DNS) + - perl(Net::DNS::Nameserver) + - perl(Time::HiRes) + - perl(IO::Socket::INET6) + - libcap-devel + - libidn-devel + - libxml2-devel + - kyua + - openldap-devel + - postgresql-devel + - sqlite-devel + - krb5-devel + - net-tools + - iproute + - yum-utils + - dnf-utils + - rng-tools + - gcc-c++ +duration: 14h enabled: true tag: -- CI-Tier-1 -- TIPfail -- buildroot -- notier -- notip -- rhel8-buildroot -- source -- build + - CI-Tier-1 + - TIPfail + - buildroot + - notier + - notip + - rhel-buildroot + - rhel8-buildroot +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=642970 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1832812 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1869502 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1956777 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=672514 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=703494 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1704328 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1876492 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=623122 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1679766 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1882040 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1683009 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=643012 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1683015 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=906312 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1679307 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1664863 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1832814 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=653817 +extra-nitrate: TC#0126580 extra-summary: /CoreOS/bind/Sanity/Run-internal-BIND-test-suite extra-task: /CoreOS/bind/Sanity/Run-internal-BIND-test-suite -extra-nitrate: TC#0126580 diff --git a/Sanity/Run-internal-BIND-test-suite/runtest.sh b/Sanity/Run-internal-BIND-test-suite/runtest.sh index cd845f0..4e743c3 100755 --- a/Sanity/Run-internal-BIND-test-suite/runtest.sh +++ b/Sanity/Run-internal-BIND-test-suite/runtest.sh @@ -2,9 +2,9 @@ # vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# runtest.sh of tests/Run-internal-BIND-test-suite +# runtest.sh of /CoreOS/bind/Sanity/Run-internal-BIND-test-suite # Description: Run internal BIND test suite -# Author: Martin Cermak +# Authors: pemensik@redhat.com psklenar@redhat.com mcermak@redhat.com # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # @@ -25,99 +25,149 @@ # Boston, MA 02110-1301, USA. # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Usable variables: +# override make target to start testing on more threads +# MAKE_TEST='-j4 test' +# Do not clean existing build if already built +# REUSE_BUILD=y +# Make retest faster, skip build if possible +# QUICK=y # Include rhts environment -. /usr/lib/beakerlib/beakerlib.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="bind" - -# Set those variables to n to skip tests on variants -#DEFAULT_VARIANTS="normal pkcs11 sdb" -DEFAULT_VARIANTS="normal" -#TEST_VARIANTS="normal" - -# -# Runs test suite and checks known errors -# Prepared to be repeated with another variants -run_testsuite() -{ - local RESULT_TEXT="$TMPDIR/test${NAMED_VARIANT}.txt" - local FOUNDERROR=`mktemp found-XXXXXXXX.err` - local KNOWNERROR=/dev/null - - if [ -f "$ORIG/knownerror${NAMED_VARIANT}.$TAG" ]; then - KNOWNERROR=`readlink -f $ORIG/knownerror.$TAG` - elif [ -f "$ORIG/knownerror${NAMED_VARIANT}" ]; then - KNOWNERROR=`readlink -f $ORIG/knownerror` - fi - - # Sometime it can fail. Report just failures that are not known - rlRun "make test -j${CORES:-1} &> $RESULT_TEXT" 0-255 "Perform the test." - rlRun "grep -C 10 FAIL $RESULT_TEXT" 0-255 "Quickly show the test error (if any)." - - rlRun "$FILTER $RESULT_TEXT" 0 "Showing unsuccessful tests" - rlRun "$FILTER -s $RESULT_TEXT > $FOUNDERROR" 0 - rlRun "ls $KNOWNERROR $FOUNDERROR $RESULT_TEXT" 0 'check if there is needed files' - rlLog "`cat $FOUNDERROR`" - - rlAssertLesserOrEqual "Checking number of found errors is in limits" "$(grep '^FAIL' $FOUNDERROR | wc -l)" "$(wc -l <$KNOWNERROR)" - cat $FOUNDERROR | while read STATUS TEST ; do - if [ "$STATUS" = FAIL ]; then - rlRun "grep '$TEST' $KNOWNERROR" 0 "Check $TEST failure is expected" - else - rlLog "$STATUS $TEST" - fi - done -} +PACKAGE="" +USER="user$RANDOM" +CORES=1 +rpm -q bind && PACKAGE="bind" +rpm -q bind97 && PACKAGE="bind97" rlJournalStart rlPhaseStartSetup + rlRun "useradd $USER" + rlLog "Available entropy: $(cat /proc/sys/kernel/random/entropy_avail)" + rpm -q perl-Net-DNS-Nameserver || yum install -y perl-Net-DNS-Nameserver + rlLog "`rpm -q perl-Net-DNS-Nameserver`" # package assertions rlAssertRpm $PACKAGE rlAssertRpm rpm-build - rlAssertRpm perl-Net-DNS-Nameserver + rlServiceStart "rngd" + rngd -r /dev/urandom -o /dev/random + sleep 60 + rlLog "Available entropy: $(cat /proc/sys/kernel/random/entropy_avail)" #pwd ORIG=`pwd` + FOUNDERROR=`mktemp` SETUP_SOFTHSM=`readlink -f setup-named-softhsm.sh` FILTER=`readlink -f bind-systest-filter.sh` - CORES=`grep 'processor\s*:' /proc/cpuinfo | wc -l` TAG=generic if [ -f /etc/os-release ]; then # extract platform tag + VERSION_ID=`(source /etc/os-release && echo ${ID}-${VERSION_ID})` TAG=`(source /etc/os-release && echo ${PLATFORM_ID#platform:})` + else + rlIsRHEL '6' && TAG=el6 + fi + + if [ -f "knownerror.$VERSION_ID" ]; then + KNOWNERROR=`readlink -f knownerror.$VERSION_ID` + elif [ -f "knownerror.$TAG" ]; then + KNOWNERROR=`readlink -f knownerror.$TAG` + elif [ -f "knownerror" ]; then + KNOWNERROR=`readlink -f knownerror` + fi + + if [ -z "$CORES" ]; then + rlRun "CORES=$(grep '^processor\s*:' /proc/cpuinfo | wc -l)" 0 "Count available CPU cores" + fi + + if [ -n "$QUICK" ]; then + REUSE_BUILD=y + MAKE_TEST="test -j$CORES" fi #tempdir rlRun "TMPDIR=\`mktemp -d\`" 0 "Creating tmp directory" rlRun "pushd $TMPDIR" + if rlIsRHEL 8 && dnf config-manager --help >/dev/null; then + # Some build dependencies are not in repositories enabled + # by default: libidn2-devel, softshm + dnf config-manager --set-enabled rhel-buildroot + dnf config-manager --set-enabled rhel-CRB + dnf config-manager --set-enabled beaker-CRB + dnf config-manager --set-enabled beaker-buildroot + #not checking return code: 1mt and beaker uses different names for repo + fi + # topdir - TOPDIR=`rpm -E '%{_topdir}'` + if rlIsRHEL 3 || rlIsRHEL 4 || rlIsRHEL 5; then + TOPDIR="/usr/src/redhat" + else + TOPDIR="/root/rpmbuild" + fi # cleanup in topdir mkdir -p $TOPDIR/{BUILD,SOURCES,SPECS} - rm -rf $TOPDIR/{BUILD,SOURCES,SPECS}/* + if [ "$REUSE_BUILD" != y ] + then + rlRun "rm -rf $TOPDIR/{BUILD,SOURCES,SPECS}/*" + else + rlLog "Not cleaning previous build" + fi # download src rpm - if ! ls bind*.src.rpm; then - rlRun "dnf --enablerepo='*-source' download --source bind" 0 "Fetch source from repository" - rlRun "rpm -i bind*.src.rpm" + BINDVER=$(rpm -q bind) + SRPM="${BINDVER%%.$(arch)}.src.rpm" + if [ -f "$ORIG/$SRPM" ]; then + rlLog "Found predownloaded package $ORIG/$SRPM" + rlRun "rpm -i \"$ORIG/$SRPM\"" + else + rlFetchSrcForInstalled "$PACKAGE" + if ! ls bind*.src.rpm; then + rlRun "yumdownloader --source bind" 0 "Trying alternative fetch from repository" + rlRun "rpm -i bind*.src.rpm" + fi fi rlRun "rpm --define '_topdir $TOPDIR' -Uvh *rpm &> $TMPDIR/install.txt" rlRun "cd $TOPDIR/SPECS" - rlRun "dnf -y builddep *.spec" + # softhsm is no longer in normal repository. Enable idm module on RHEL8 to make softhsm module available + if rlIsRHEL 8 + then + rlLog "this can fail at rhel8 zstream as no module in profiles" + dnf module reset idm:DL1 -y + rlRun "dnf -y module enable idm:DL1" + fi + if dnf builddep --help >/dev/null; then + rlRun "dnf -y builddep --nobest *.spec --enablerepo=\* --skip-unavailable" + elif which yum-builddep; then + rlRun "yum-builddep -y *.spec" + else + rlWarn "there is nor yum-utils neither dnf-utils for install dependencies, ENJOY!" + fi + +#DEBUG smtg + rpm -q softshm || yum install softshm -y --enablerepo=\* + rpm -q kyua || yum install softshm -y --enablerepo=\* + rpm -q perl-IO-Socket-INET6 || yum install -y 'perl(IO::Socket::INET6)' --enablerepo=\* # stop bind if it is running - rlServiceStop named + service named stop rlPhaseEnd rlPhaseStartTest - # rebuild from source - rlRun "rpmbuild -ba *.spec &> $TMPDIR/build.txt" + if [ "$REUSE_BUILD" = y ] && ls -1 "$TOPDIR/BUILD"/bind* > /dev/null + then + rlLog "Skipping bind build" + else + # rebuild from source + rlRun "rpmbuild -ba *.spec &> $TMPDIR/build.txt" 0 "Building bind" + fi # the test rlRun "cd $TOPDIR/BUILD/bind*" @@ -126,8 +176,8 @@ rlJournalStart rlRun "chown -R root ." - if [ -x "$SETUP_SOFTHSM" ] && [ -n "$(type -p pkcs11-tokens)" ]; then - rlRun "eval \"$(bash $SETUP_SOFTHSM -A)\"" 0 "Preparing PKCS#11 token slot" + if [ -x "$SETUP_SOFTHSM" ] && type -p pkcs11-tokens; then + rlRun "eval $(bash $SETUP_SOFTHSM -A)" 0 "Preparing PKCS#11 token slot" rlRun "pkcs11-tokens" 0 "Testing token slot availability" else rlLog "PKCS#11 not initialized" @@ -139,46 +189,98 @@ rlJournalStart BUILD=. fi - rlRun "./bin/tests/system/ifconfig.sh up" 0 "Setup fake network interfaces." + HOMEPERM=$(stat --printf='%a' "$HOME") + if [ "$HOMEPERM" != "${HOMEPERM%0}" ]; then + # runtime tests under root requires access for nobody user + rlLog "Enabling access to $HOME" + rlRun "chmod o+x \"$HOME\"" + fi # required by idna test export LC_ALL=en_US.UTF-8 rlRun "pushd $BUILD" + rlRun "./bin/tests/system/ifconfig.sh up" 0 "Setup fake network interfaces." - if echo "${TEST_VARIANTS:-$DEFAULT_VARIANTS}" | grep -q normal; then - rlLog "Running normal variant" - export NAMED_VARIANT= DNSSEC_VARIANT= - run_testsuite - rlLog "Finished normal variant" + # keep separate results on 9.11+ + rlRun "sed -e 's/testsummary.sh/& -n/' -i bin/tests/system/Makefile" 0 "Modify to keep results" + # dlz test is broken because specific build way we use. It is supported only by named-sdb + # but that is not even tested by testsuite + rlRun "sed -e 's/ dlz / /' -i bin/tests/system/Makefile" 0 "Skip always failing dlz test" + + ###### T:cds:1:A ../conf.sh: line 40: DNSSEC_VARIANT: unbound variable + ###### remove later (today 2021 Aug) + sed -ie 's/set -eu/set -e/' bin/tests/system/cds/setup.sh + + # Try to fix tssgsig failures on some machines, do not use system kerberos configuration + export KRB5_CONFIG=/dev/null + chmod a+rw -R /root #running as a USER + RHEL9HACK="sudo -u $USER" + rlRun "${RHEL9HACK} make ${MAKE_TEST:-test -j$CORES} &> $TMPDIR/test.txt" 0-255 "Perform the test, --init-task=/distribution/install/rhel-buildroot is needed" + export -n KRB5_CONFIG + + # This would catch just errors on 9.11+ + if [ -f bin/tests/system/testsummary.sh ]; then + FAILED_TESTS=`grep '^R:[a-z0-9_-][a-z0-9_-]*:FAIL' $TMPDIR/test.txt | cut -d':' -f2 | sort | xargs echo` + if [ -n "$FAILED_TESTS" ]; then + rlLog "Failed tests: $FAILED_TESTS" + rlRun "tar czf $TMPDIR/failed-artifacts.tar.gz -C bin/tests/system $FAILED_TESTS" 0 "Archiving failed artifacts in tests" + else + rlLog "No failed tests" + fi + else + FAILED_TESTS=:any: + rlRun "tar czf $TMPDIR/failed-artifacts.tar.gz bin/tests/system" 0 "Archiving all system tests" fi - if echo "${TEST_VARIANTS:-$DEFAULT_VARIANTS}" | grep -q sdb; then - rlLog "Running sdb variant" - export NAMED_VARIANT=-sdb DNSSEC_VARIANT= - run_testsuite - rlLog "Finished sdb variant" - fi - - if echo "${TEST_VARIANTS:-$DEFAULT_VARIANTS}" | grep -q pkcs11; then - rlLog "Running pkcs11 variant" - # Unfortunately, PKCS11 variant uses shared key storage - # It cannot use more threads for that reason - export NAMED_VARIANT=-pkcs11 DNSSEC_VARIANT=-pkcs11 - CORES=1 run_testsuite - rlLog "Finished pkcs11 variant" - fi - - rlRun "popd" - rlRun "./bin/tests/system/ifconfig.sh down" 0 "Remove fake network interfaces." + rlRun "popd" + rlRun "grep -C 10 FAIL $TMPDIR/test.txt" 0-255 "Quickly show the test error (if any)." + + #list of failures: + rlRun "$FILTER $TMPDIR/test.txt" 0 "Showing unsuccessful tests" + rlRun "$FILTER -s $TMPDIR/test.txt > $FOUNDERROR" 0 + rlRun "ls $KNOWNERROR $FOUNDERROR $TMPDIR/test.txt" 0 'check if there are needed files' + rlLog "`echo list;cat $FOUNDERROR`" + + FAILED_FOUND="$(grep '^FAIL' $FOUNDERROR | wc -l)" + FAILED_KNOWN="$(wc -l <$KNOWNERROR)" + rlAssertLesserOrEqual "Checking number of found errors is in limits" "$FAILED_FOUND" "$FAILED_KNOWN" + cat $FOUNDERROR | while read STATUS TEST ; do + if [ "$STATUS" = FAIL ]; then + rlRun "grep '$TEST' $KNOWNERROR" 0 "Check $TEST failure is expected" + else + rlLog "$STATUS $TEST" + fi + done + + if [ "$FAILED_TESTS" = ':any:' ] && [ "$FAILED_FOUND" -le "$FAILED_KNOWN" ] + then + # Newer version produces archive only when some error occured + rlLog "No error found, not uploading artifacts" + rm -f "$TMPDIR/failed-artifacts.tar.gz" + fi + if [ "$HOMEPERM" != "${HOMEPERM%0}" ]; then + rlLog "Restoring home access rights to $HOMEPERM" + rlRun "chmod 0${HOMEPERM} \"$HOME\"" + fi rlPhaseEnd + rlPhaseStartCleanup "`echo Cores:$CORES;echo ' RESULT_' ;cat $FOUNDERROR|grep 'FAIL'`" + #this phase is only due to report to webUI without needs of open file + rlLog "`echo RESULT_ ;cat $FOUNDERROR|grep FAIL`" + rlPhaseEnd + rlPhaseStartCleanup - rlBundleLogs "BUILD_LOGS" "$TMPDIR/install.txt" "$TMPDIR/builddeps.txt" "$TMPDIR/build.txt" - rlBundleLogs "TEST_LOGS" "$TMPDIR"/test*.txt + rlBundleLogs "TEST_LOGS" "$TMPDIR/install.txt" "$TMPDIR/builddeps.txt" "$TMPDIR/build.txt" "$TMPDIR/test.txt" + if [ -r "$TMPDIR/failed-artifacts.tar.gz" ]; then + rlFileSubmit "$TMPDIR/failed-artifacts.tar.gz" failed-artifacts.tar.gz + fi rlRun "popd" + rlServiceRestore "rngd" rlRun "rm -r $TMPDIR" 0 "Removing tmp directory" + rlRun "rm -rf $FOUNDERROR" + rlRun "userdel -f -r $USER" rlPhaseEnd rlJournalEnd From 2da9e653c85febe4a8a757704d730af796052250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Sun, 29 Jan 2023 14:02:50 +0100 Subject: [PATCH 016/165] Adapt test to run even for different than bind pkg We already have multiple packages with different versions of bind. They can be in RHEL or Fedora. Attempt to support even alternative packages run by overriding PACKAGE environment variable to different base SRPM name. --- Sanity/Run-internal-BIND-test-suite/Makefile | 7 +++--- .../Run-internal-BIND-test-suite/runtest.sh | 25 +++++++++++-------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/Sanity/Run-internal-BIND-test-suite/Makefile b/Sanity/Run-internal-BIND-test-suite/Makefile index 49f400a..4c84b47 100644 --- a/Sanity/Run-internal-BIND-test-suite/Makefile +++ b/Sanity/Run-internal-BIND-test-suite/Makefile @@ -32,6 +32,7 @@ export TESTVERSION=1.7 BUILT_FILES= FILES=$(METADATA) runtest.sh Makefile PURPOSE knownerror* setup-named-softhsm.sh bind-systest-filter.sh +PACKAGE?=bind .PHONY: all install download clean @@ -55,9 +56,9 @@ $(METADATA): Makefile @echo "Description: Run internal BIND test suite" >> $(METADATA) @echo "Type: Sanity" >> $(METADATA) @echo "TestTime: 14h" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind rpm-build bind-utils" >> $(METADATA) - @echo "Requires: bind-pkcs11 bind-pkcs11-utils softhsm" >> $(METADATA) + @echo "RunFor: $(PACKAGE)" >> $(METADATA) + @echo "Requires: $(PACKAGE) rpm-build $(PACKAGE)-utils $(PACKAGE)-devel" >> $(METADATA) + @echo "Requires: $(PACKAGE)-pkcs11 $(PACKAGE)-pkcs11-utils softhsm" >> $(METADATA) @echo "Requires: openssl-devel libtool autoconf" >> $(METADATA) @echo "Requires: perl perl(Net::DNS) perl(Net::DNS::Nameserver) perl(Time::HiRes)" >> $(METADATA) @echo "Requires: perl(IO::Socket::INET6)" >> $(METADATA) diff --git a/Sanity/Run-internal-BIND-test-suite/runtest.sh b/Sanity/Run-internal-BIND-test-suite/runtest.sh index 4e743c3..59f830e 100755 --- a/Sanity/Run-internal-BIND-test-suite/runtest.sh +++ b/Sanity/Run-internal-BIND-test-suite/runtest.sh @@ -37,11 +37,13 @@ # Include rhts environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="" +: ${PACKAGE:=bind} USER="user$RANDOM" CORES=1 -rpm -q bind && PACKAGE="bind" -rpm -q bind97 && PACKAGE="bind97" +for PACKAGE in $PACKAGE bind bind97 bind9.16 bind9-next +do + rpm -q "$PACKAGE" && break +done rlJournalStart rlPhaseStartSetup @@ -52,6 +54,7 @@ rlJournalStart # package assertions rlAssertRpm $PACKAGE rlAssertRpm rpm-build + rlRun "rpm -q $PACKAGE-devel || yum install -y $PACKAGE-devel $PACKAGE-utils" rlServiceStart "rngd" rngd -r /dev/urandom -o /dev/random sleep 60 @@ -120,16 +123,16 @@ rlJournalStart fi # download src rpm - BINDVER=$(rpm -q bind) + BINDVER=$(rpm -q $PACKAGE) SRPM="${BINDVER%%.$(arch)}.src.rpm" if [ -f "$ORIG/$SRPM" ]; then rlLog "Found predownloaded package $ORIG/$SRPM" rlRun "rpm -i \"$ORIG/$SRPM\"" else rlFetchSrcForInstalled "$PACKAGE" - if ! ls bind*.src.rpm; then - rlRun "yumdownloader --source bind" 0 "Trying alternative fetch from repository" - rlRun "rpm -i bind*.src.rpm" + if ! ls ${PACKAGE}*.src.rpm; then + rlRun "yumdownloader --source ${PACKAGE}" 0 "Trying alternative fetch from repository" + rlRun "rpm -i ${PACKAGE}*.src.rpm" fi fi @@ -153,8 +156,8 @@ rlJournalStart fi #DEBUG smtg - rpm -q softshm || yum install softshm -y --enablerepo=\* - rpm -q kyua || yum install softshm -y --enablerepo=\* + rpm -q softhsm || yum install softhsm -y --enablerepo=\* + rpm -q kyua || yum install kyua -y --enablerepo=\* rpm -q perl-IO-Socket-INET6 || yum install -y 'perl(IO::Socket::INET6)' --enablerepo=\* # stop bind if it is running service named stop @@ -163,10 +166,10 @@ rlJournalStart rlPhaseStartTest if [ "$REUSE_BUILD" = y ] && ls -1 "$TOPDIR/BUILD"/bind* > /dev/null then - rlLog "Skipping bind build" + rlLog "Skipping $PACKAGE build" else # rebuild from source - rlRun "rpmbuild -ba *.spec &> $TMPDIR/build.txt" 0 "Building bind" + rlRun "rpmbuild -ba --noclean *.spec &> $TMPDIR/build.txt" 0 "Building $PACKAGE" fi # the test From ecafc60535e698ad05e9812a8107bed0d4c03d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 30 Jan 2023 17:48:52 +0100 Subject: [PATCH 017/165] Try conditionalizing tests Accept both component bind or bind9-next. Expects component is set from CI plan specified per component, but from shared tests/bind repository. --- Sanity/Run-internal-BIND-test-suite/main.fmf | 30 ++++++++++++++------ Sanity/delv-smoke-test/main.fmf | 16 +++++++++-- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/Sanity/Run-internal-BIND-test-suite/main.fmf b/Sanity/Run-internal-BIND-test-suite/main.fmf index c9f25d5..2c1d918 100644 --- a/Sanity/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/Run-internal-BIND-test-suite/main.fmf @@ -5,16 +5,10 @@ description: | contact: Petr Sklenar -component: - - bind test: ./runtest.sh framework: beakerlib recommend: - - bind - rpm-build - - bind-utils - - bind-pkcs11 - - bind-pkcs11-utils - softhsm - openssl-devel - libtool @@ -25,9 +19,8 @@ recommend: - perl(Time::HiRes) - perl(IO::Socket::INET6) - libcap-devel - - libidn-devel + - libidn2-devel - libxml2-devel - - kyua - openldap-devel - postgresql-devel - sqlite-devel @@ -38,6 +31,27 @@ recommend: - dnf-utils - rng-tools - gcc-c++ +adjust: + - recommend+: + - bind + - bind-utils + - bind-pkcs11 + - bind-pkcs11-utils + environment+: + PACKAGE: bind + when: component == bind + - recommend+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next + - recommend+: + - kyua + when: distro < fedora-37 or distro <= rhel-9 or distro <= centos-9 + - recommend+: + - libidn-devel + when: distro < rhel-8 or distro < centos-8 duration: 14h enabled: true tag: diff --git a/Sanity/delv-smoke-test/main.fmf b/Sanity/delv-smoke-test/main.fmf index 9a35246..2da7795 100644 --- a/Sanity/delv-smoke-test/main.fmf +++ b/Sanity/delv-smoke-test/main.fmf @@ -3,8 +3,6 @@ description: | Bug summary: [RFE] Provide delv functionality Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 contact: Petr Sklenar -component: - - bind test: ./runtest.sh framework: beakerlib recommend: @@ -20,8 +18,20 @@ tag: link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 adjust: + - recommend+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component == bind + - recommend+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next - enabled: false - when: distro == rhel-4, rhel-5 + when: distro == rhel-4, rhel-5, rhel-6 continue: false extra-nitrate: TC#0600760 extra-summary: /CoreOS/bind/Sanity/delv-smoke-test From 4e305a97d5d90d74098af7eaa2e92701df7d3e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 30 Jan 2023 18:37:34 +0100 Subject: [PATCH 018/165] Adjust also geoip test Only this test is enabled at the moment. --- Sanity/geoip-support/main.fmf | 12 ++++++++---- Sanity/geoip-support/runtest.sh | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Sanity/geoip-support/main.fmf b/Sanity/geoip-support/main.fmf index afa9ebd..11f656f 100644 --- a/Sanity/geoip-support/main.fmf +++ b/Sanity/geoip-support/main.fmf @@ -2,17 +2,13 @@ summary: it tries more ip address from more locations tier: '1' description: '' contact: Petr Sklenar -component: - - bind test: ./runtest.sh framework: beakerlib recommend: - - bind - libmaxminddb - libmaxminddb-devel - geolite2-country - geolite2-city - - bind-utils duration: 66m enabled: true tag: @@ -23,6 +19,14 @@ tag: link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1564443 adjust: + - recommend+: + - bind + - bind-utils + when: component == bind + - recommend+: + - bind9-next + - bind9-next-utils + when: component == bind9-next - enabled: false when: distro < rhel-8 continue: false diff --git a/Sanity/geoip-support/runtest.sh b/Sanity/geoip-support/runtest.sh index 229f2e2..f49b9fb 100755 --- a/Sanity/geoip-support/runtest.sh +++ b/Sanity/geoip-support/runtest.sh @@ -28,7 +28,7 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="bind" +: ${PACKAGE:="bind"} rlJournalStart rlPhaseStartSetup From c9d17c4eb0457790a68c74a50bfd0228f2d1d0c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 30 Jan 2023 19:00:01 +0100 Subject: [PATCH 019/165] Correct reproducer to pass Skip inclusion of TCP control port, which makes the test failing. It is not wanted in the test anyway. --- .../reproducer.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/reproducer.sh b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/reproducer.sh index 28b3cc6..f554637 100644 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/reproducer.sh +++ b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/reproducer.sh @@ -5,7 +5,7 @@ # Pause bind on loading this file mkfifo _bind.nta -named -g -c <(echo "options { port 5300; listen-on { any; }; listen-on-v6 { any; }; };") -n 1 & +named -g -c <(echo "options { port 5300; listen-on { any; }; listen-on-v6 { any; }; }; controls {};") -n 1 & NAMED_PID=$! sleep 2 @@ -20,6 +20,19 @@ TCP=$(lsof -n -p ${NAMED_PID} | grep 'TCP 127.0.0.' | wc -l) UDP=$(lsof -n -p ${NAMED_PID} | grep 'UDP 127.0.0.' | wc -l) echo "TCP: $TCP UDP: $UDP" +if [ "$DEBUG" = y ]; then + TCPL=$(lsof -n -p ${NAMED_PID} | grep 'TCP 127.0.0.') + UDPL=$(lsof -n -p ${NAMED_PID} | grep 'UDP 127.0.0.') + + cat << EOF +TCP: +${TCPL} + +UDP: +${UDPL} +EOF +fi + sleep 5 #echo "Done adding addresses, press ENTER to terminate." #read From d9f5b1efa6a19661604be78a837d94389011f9e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 30 Jan 2023 20:21:50 +0100 Subject: [PATCH 020/165] fixup! Try conditionalizing tests --- Sanity/Run-internal-BIND-test-suite/main.fmf | 1 + 1 file changed, 1 insertion(+) diff --git a/Sanity/Run-internal-BIND-test-suite/main.fmf b/Sanity/Run-internal-BIND-test-suite/main.fmf index 2c1d918..61ba6dd 100644 --- a/Sanity/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/Run-internal-BIND-test-suite/main.fmf @@ -49,6 +49,7 @@ adjust: - recommend+: - kyua when: distro < fedora-37 or distro <= rhel-9 or distro <= centos-9 + because: only bind <=9.16 uses kyua for unit tests - recommend+: - libidn-devel when: distro < rhel-8 or distro < centos-8 From 928e44fe35bc3bb12651152270ad74d1715f117e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 25 Aug 2023 12:43:02 +0200 Subject: [PATCH 021/165] First attempt to support multiple components --- Sanity/delv-smoke-test/main.fmf | 9 ++------- Sanity/delv-smoke-test/runtest.sh | 7 +++---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Sanity/delv-smoke-test/main.fmf b/Sanity/delv-smoke-test/main.fmf index 2da7795..f36e3bc 100644 --- a/Sanity/delv-smoke-test/main.fmf +++ b/Sanity/delv-smoke-test/main.fmf @@ -5,9 +5,6 @@ description: | contact: Petr Sklenar test: ./runtest.sh framework: beakerlib -recommend: - - bind - - bind-utils duration: 15m enabled: true tag: @@ -18,14 +15,12 @@ tag: link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 adjust: - - recommend+: - - bind + - require+: - bind-utils environment+: PACKAGE: bind when: component == bind - - recommend+: - - bind9-next + - require+: - bind9-next-utils environment+: PACKAGE: bind9-next diff --git a/Sanity/delv-smoke-test/runtest.sh b/Sanity/delv-smoke-test/runtest.sh index 7b082e0..d42d3a2 100755 --- a/Sanity/delv-smoke-test/runtest.sh +++ b/Sanity/delv-smoke-test/runtest.sh @@ -28,13 +28,12 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="bind" +: ${PACKAGE:="bind"} rlJournalStart rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlAssertRpm bind-utils - cat /etc/resolv.conf + rlAssertRpm $PACKAGE-utils + rlRun "cat /etc/resolv.conf" rlPhaseEnd rlPhaseStartTest From acbc9195fe72ab8c85310d59c32d69e63495b947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 25 Aug 2023 12:46:41 +0200 Subject: [PATCH 022/165] Add unset component and bind9.16 rhel8 component support --- Sanity/delv-smoke-test/main.fmf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Sanity/delv-smoke-test/main.fmf b/Sanity/delv-smoke-test/main.fmf index f36e3bc..e88c2ed 100644 --- a/Sanity/delv-smoke-test/main.fmf +++ b/Sanity/delv-smoke-test/main.fmf @@ -19,12 +19,17 @@ adjust: - bind-utils environment+: PACKAGE: bind - when: component == bind + when: component is not defined or component == bind - require+: - bind9-next-utils environment+: PACKAGE: bind9-next when: component == bind9-next + - require+: + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 - enabled: false when: distro == rhel-4, rhel-5, rhel-6 continue: false From b39f2d88cda9009aceaa0b33a6c405327feaa35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 25 Aug 2023 12:43:59 +0200 Subject: [PATCH 023/165] Extend delv tests to include more details --- Sanity/delv-smoke-test/runtest.sh | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/Sanity/delv-smoke-test/runtest.sh b/Sanity/delv-smoke-test/runtest.sh index d42d3a2..556e60a 100755 --- a/Sanity/delv-smoke-test/runtest.sh +++ b/Sanity/delv-smoke-test/runtest.sh @@ -34,19 +34,35 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE-utils rlRun "cat /etc/resolv.conf" + if dig +dnssec dnskey | grep RRSIG; then + rlLog "Infrastructure supports DNSSEC" + DNSSEC=yes + else + DNSSEC=no + fi + rlRun "" 0 "Check infrastructure supports DNSSEC records" rlPhaseEnd rlPhaseStartTest - if delv redhat.com | grep IN;then - rlRun "delv redhat.com | grep IN" - rlRun "delv redhat.com soa +multi | grep serial" - LINES=$(delv +multi +vtrace|wc -l) + rlRun -l -s "delv redhat.com" + rlAssertGrep 'IN' $rlRun_LOG + rlRun -s "delv redhat.com soa +multi" + rlAssertGrep 'serial' $rlRun_LOG + rlRun -s "delv +multi +vtrace" + LINES=$(wc -l $rlRun_LOG) rlAssertGreater "delv +vtrace should show few lines" "$LINES" "10" rlRun "delv +vtrace | grep 'fully validated'" - fi - rlLog "`delv redhat.com`" + if [ "$DNSSEC" = yes ]; then + rlRun -s "delv" + rlAssertGrep 'fully validated' $rlRun_LOG + rlRun -s "delv example.net" + rlAssertGrep 'fully validated' $rlRun_LOG + rlRun -s "delv +vtrace fedoraproject.org" + rlAssertGrep 'fully validated' $rlRun_LOG + rlAssertGrep 'marking as secure' $rlRun_LOG + + fi cat /etc/resolv.conf - rlPhaseEnd rlJournalPrintText From e82b8c0c334844f1d650577fc3f5590d07ebf9e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 25 Aug 2023 13:11:25 +0200 Subject: [PATCH 024/165] Make more components conditionally run Expand component adjusts and ability to test multiple components. --- Sanity/Run-internal-BIND-test-suite/main.fmf | 8 +++++- .../Run-internal-BIND-test-suite/runtest.sh | 4 --- Sanity/geoip-support/main.fmf | 12 ++++++++- Sanity/json-support/main.fmf | 25 +++++++++++++++---- Sanity/json-support/runtest.sh | 2 +- Sanity/named-checkzone/main.fmf | 21 +++++++++++++--- Sanity/named-checkzone/runtest.sh | 2 +- 7 files changed, 58 insertions(+), 16 deletions(-) diff --git a/Sanity/Run-internal-BIND-test-suite/main.fmf b/Sanity/Run-internal-BIND-test-suite/main.fmf index 61ba6dd..abb2e09 100644 --- a/Sanity/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/Run-internal-BIND-test-suite/main.fmf @@ -39,7 +39,13 @@ adjust: - bind-pkcs11-utils environment+: PACKAGE: bind - when: component == bind + when: component is not defined or component == bind + - recommend+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 - recommend+: - bind9-next - bind9-next-utils diff --git a/Sanity/Run-internal-BIND-test-suite/runtest.sh b/Sanity/Run-internal-BIND-test-suite/runtest.sh index 59f830e..7277646 100755 --- a/Sanity/Run-internal-BIND-test-suite/runtest.sh +++ b/Sanity/Run-internal-BIND-test-suite/runtest.sh @@ -40,10 +40,6 @@ : ${PACKAGE:=bind} USER="user$RANDOM" CORES=1 -for PACKAGE in $PACKAGE bind bind97 bind9.16 bind9-next -do - rpm -q "$PACKAGE" && break -done rlJournalStart rlPhaseStartSetup diff --git a/Sanity/geoip-support/main.fmf b/Sanity/geoip-support/main.fmf index 11f656f..14c96b8 100644 --- a/Sanity/geoip-support/main.fmf +++ b/Sanity/geoip-support/main.fmf @@ -22,10 +22,20 @@ adjust: - recommend+: - bind - bind-utils - when: component == bind + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - recommend+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 - recommend+: - bind9-next - bind9-next-utils + environment+: + PACKAGE: bind9-next when: component == bind9-next - enabled: false when: distro < rhel-8 diff --git a/Sanity/json-support/main.fmf b/Sanity/json-support/main.fmf index 736e6cb..3d7db7c 100644 --- a/Sanity/json-support/main.fmf +++ b/Sanity/json-support/main.fmf @@ -4,14 +4,29 @@ description: | Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1899257 contact: - Petr Mensik -component: -- bind test: ./runtest.sh framework: beakerlib recommend: -- bind -- bind-utils -- python3 + - python3 +adjust: + - require+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - require+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next + - require+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 duration: 5m extra-summary: /CoreOS/bind/Sanity/json-support extra-task: /CoreOS/bind/Sanity/json-support diff --git a/Sanity/json-support/runtest.sh b/Sanity/json-support/runtest.sh index e874ffe..64b4d28 100755 --- a/Sanity/json-support/runtest.sh +++ b/Sanity/json-support/runtest.sh @@ -28,7 +28,7 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="bind" +: ${PACKAGE:="bind"} rlJournalStart rlPhaseStartSetup diff --git a/Sanity/named-checkzone/main.fmf b/Sanity/named-checkzone/main.fmf index 47caf6d..37abc7f 100644 --- a/Sanity/named-checkzone/main.fmf +++ b/Sanity/named-checkzone/main.fmf @@ -5,9 +5,6 @@ component: - bind test: ./runtest.sh framework: beakerlib -recommend: - - bind - - bind-utils duration: 5m enabled: true tag: @@ -20,6 +17,24 @@ adjust: - enabled: false when: distro == rhel-4, rhel-5 continue: false + - require+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - require+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next + - require+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 extra-nitrate: TC#0500008 extra-summary: /CoreOS/bind/Sanity/named-checkzone extra-task: /CoreOS/bind/Sanity/named-checkzone diff --git a/Sanity/named-checkzone/runtest.sh b/Sanity/named-checkzone/runtest.sh index a4a1856..3e2b018 100755 --- a/Sanity/named-checkzone/runtest.sh +++ b/Sanity/named-checkzone/runtest.sh @@ -28,7 +28,7 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="bind" +: ${PACKAGE:="bind"} rlJournalStart rlPhaseStartSetup From 87e2d28453c4036d209809d7cd8684d6b398e41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 25 Aug 2023 15:14:41 +0200 Subject: [PATCH 025/165] Convert remaining tests to work with alternative components Expand adjusting based on components to more alternatives --- .../main.fmf | 21 +++++++++++++--- .../runtest.sh | 2 +- .../main.fmf | 24 +++++++++++++++---- .../runtest.sh | 2 +- .../main.fmf | 22 +++++++++++++---- .../runtest.sh | 2 +- Sanity/named-checkzone/main.fmf | 2 -- Smoke/IpaInstallAndStart/main.fmf | 6 +++-- .../main.fmf | 23 ++++++++++++++---- .../runtest.sh | 2 +- plans/ci.fmf | 2 ++ 11 files changed, 83 insertions(+), 25 deletions(-) diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf index 77d3b4a..de86262 100644 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf +++ b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf @@ -3,12 +3,9 @@ description: | Bug summary: bind does not listen on all addresses over TCP when listen-on/listen-on-v6 has specific IPs or any listed Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1999691 contact: Petr Sklenar -component: - - bind test: ./runtest.sh framework: beakerlib recommend: - - bind - lsof duration: 15m enabled: true @@ -21,6 +18,24 @@ adjust: - enabled: false when: distro == rhel-4, rhel-5 continue: false + - require+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - require+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next + - require+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 extra-nitrate: TC#0612648 extra-summary: /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP extra-task: /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/runtest.sh b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/runtest.sh index 4302be9..3b89f2c 100755 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/runtest.sh +++ b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/runtest.sh @@ -28,7 +28,7 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="bind" +: ${PACKAGE:="bind"} rlJournalStart rlPhaseStartSetup diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf index bdd5d45..4c70332 100644 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf +++ b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf @@ -3,15 +3,29 @@ description: | Bug summary: BIND stops DNSKEY lookup in get_dst_key() when a key with unsupported algorithm is found first Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1769876 contact: Petr Mensik -component: - - bind test: ./runtest.sh framework: beakerlib #require: # - library(bind/bind-utils) -recommend: - - bind - - bind-utils +adjust: + - require+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - require+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next + - require+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 duration: 5m link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1769876 diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/runtest.sh b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/runtest.sh index 1beb4fe..114f115 100755 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/runtest.sh +++ b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/runtest.sh @@ -28,7 +28,7 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="bind" +: ${PACKAGE:="bind"} PHASE=${PHASE:-Test} rlJournalStart diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf b/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf index ea78e6d..40087d9 100644 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf +++ b/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf @@ -1,12 +1,8 @@ summary: What the test does description: '' contact: Petr Sklenar -component: - - bind test: ./runtest.sh framework: beakerlib -recommend: - - bind duration: 5m enabled: true tag: @@ -19,6 +15,24 @@ adjust: - enabled: false when: distro != rhel-8 continue: false + - require+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - require+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next + - require+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 extra-nitrate: TC#0608023 extra-summary: /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits extra-task: /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/runtest.sh b/Regression/bz1848169-named-checkconf-cidr-host-bits/runtest.sh index 6f37f77..f39c94a 100755 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/runtest.sh +++ b/Regression/bz1848169-named-checkconf-cidr-host-bits/runtest.sh @@ -28,7 +28,7 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="bind" +: ${PACKAGE:="bind"} rlJournalStart rlPhaseStartSetup diff --git a/Sanity/named-checkzone/main.fmf b/Sanity/named-checkzone/main.fmf index 37abc7f..48ed354 100644 --- a/Sanity/named-checkzone/main.fmf +++ b/Sanity/named-checkzone/main.fmf @@ -1,8 +1,6 @@ summary: Sanity/named-checkzone description: '' contact: Petr Sklenar -component: - - bind test: ./runtest.sh framework: beakerlib duration: 5m diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index 28b4f57..9bf1327 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -3,5 +3,7 @@ test: ./test.sh framework: beakerlib duration: 68m contact: Petr Sklenar -component: - - bind +adjust: + - enabled: false + when: component != bind + because: freeipa is not supported with alternative components diff --git a/Stub/master-and-stub-server-talks-a-bit/main.fmf b/Stub/master-and-stub-server-talks-a-bit/main.fmf index 464bec8..2b6f19c 100644 --- a/Stub/master-and-stub-server-talks-a-bit/main.fmf +++ b/Stub/master-and-stub-server-talks-a-bit/main.fmf @@ -1,13 +1,8 @@ summary: sanity testing of stub server description: '' contact: Petr Sklenar -component: - - bind test: ./runtest.sh framework: beakerlib -recommend: - - bind - - bind-utils duration: 10m enabled: true tag: @@ -25,6 +20,24 @@ adjust: - enabled: false when: arch == ppc64le continue: false + - require+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - require+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next + - require+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 extra-nitrate: TC#0518539 extra-summary: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit extra-task: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit diff --git a/Stub/master-and-stub-server-talks-a-bit/runtest.sh b/Stub/master-and-stub-server-talks-a-bit/runtest.sh index 1ba68a6..5cefade 100755 --- a/Stub/master-and-stub-server-talks-a-bit/runtest.sh +++ b/Stub/master-and-stub-server-talks-a-bit/runtest.sh @@ -28,7 +28,7 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="bind" +: ${PACKAGE:="bind"} rlJournalStart rlPhaseStartSetup "base setup" diff --git a/plans/ci.fmf b/plans/ci.fmf index 239d93d..d646b66 100644 --- a/plans/ci.fmf +++ b/plans/ci.fmf @@ -4,3 +4,5 @@ discover: how: fmf execute: how: tmt +context: + component: bind From 2ddad6ff9283126d743fcf8b1da2c09f46fb10ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 25 Aug 2023 16:11:06 +0200 Subject: [PATCH 026/165] Workarounds to DNSSEC failing infrastructure Be it systemd-resolved activation or some servers not providing working dnssec, it needs workarounds to resolv.conf. --- Sanity/delv-smoke-test/runtest.sh | 46 ++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/Sanity/delv-smoke-test/runtest.sh b/Sanity/delv-smoke-test/runtest.sh index 556e60a..0a3c0be 100755 --- a/Sanity/delv-smoke-test/runtest.sh +++ b/Sanity/delv-smoke-test/runtest.sh @@ -29,18 +29,42 @@ . /usr/share/beakerlib/beakerlib.sh || exit 1 : ${PACKAGE:="bind"} +BACKUP_RESOLV="" +SOURCE_RESOLV="/etc/resolv.conf" rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE-utils - rlRun "cat /etc/resolv.conf" - if dig +dnssec dnskey | grep RRSIG; then - rlLog "Infrastructure supports DNSSEC" - DNSSEC=yes + rlRun "REAL_RESOLV=$(realpath /etc/resolv.conf)" + rlRun "BACKUP_RESOLV=$(mktemp /etc/resolv-XXXXXX.conf)" + rlRun "rm -f $BACKUP_RESOLV" + if [ "$REAL_RESOLV" = /run/systemd/resolve/stub-resolv.conf ]; then + rlWarning "systemd-resolved stub detected, temporary switching..." + rlRun "mv /etc/resolv.conf $BACKUP_RESOLV" + SOURCE_RESOLV="/run/systemd/resolve/resolv.conf" else - DNSSEC=no + rlRun "mv /etc/resolv.conf $BACKUP_RESOLV" + SOURCE_RESOLV="$BACKUP_RESOLV" fi - rlRun "" 0 "Check infrastructure supports DNSSEC records" + rlRun "cp $SOURCE_RESOLV /etc/resolv.conf" + rlRun -l "cat /etc/resolv.conf" + DNSSEC="" + for NS in $(awk '$1 == "nameserver" { print $2 }' /etc/resolv.conf) + do + if dig +dnssec @$NS | grep -q RRSIG; then + rlLog "nameserver $NS supports DNSSEC" + DNSSEC=yes + else + rlLogWarning "nameserver $NS does not support DNSSEC!" + rlRun "sed -e '/$NS/ d' -i /etc/resolv.conf" + fi + done + if [ -z "$DNSSEC" ]; then + DNSSEC=no + rlLogWarning "Infrastructure does not support DNSSEC at all!" + rlRun "cp $SOURCE_RESOLV /etc/resolv.conf" + fi + rlRun -l "cat /etc/resolv.conf" 0 "after modifications" rlPhaseEnd rlPhaseStartTest @@ -50,6 +74,7 @@ rlJournalStart rlAssertGrep 'serial' $rlRun_LOG rlRun -s "delv +multi +vtrace" LINES=$(wc -l $rlRun_LOG) + rlRun -l "cat $rlRun_LOG" rlAssertGreater "delv +vtrace should show few lines" "$LINES" "10" rlRun "delv +vtrace | grep 'fully validated'" if [ "$DNSSEC" = yes ]; then @@ -62,7 +87,14 @@ rlJournalStart rlAssertGrep 'marking as secure' $rlRun_LOG fi - cat /etc/resolv.conf + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm -f $rlRun_LOG" + if [ -n "$BACKUP_RESOLV" ]; then + rlRun "rm -f /etc/resolv.conf" + rlRun "mv $BACKUP_RESOLV /etc/resolv.conf" + fi rlPhaseEnd rlJournalPrintText From 76a41d17752f7655bb541b87894684d681468d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Tue, 17 Oct 2023 12:28:20 +0200 Subject: [PATCH 027/165] Disable upstream test suite when checking rhel --- Sanity/Run-internal-BIND-test-suite/main.fmf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sanity/Run-internal-BIND-test-suite/main.fmf b/Sanity/Run-internal-BIND-test-suite/main.fmf index abb2e09..2870d44 100644 --- a/Sanity/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/Run-internal-BIND-test-suite/main.fmf @@ -32,6 +32,10 @@ recommend: - rng-tools - gcc-c++ adjust: + - enabled: false + when: distro == rhel + continue: false + because: Slightly different copy resides in internal tests. - recommend+: - bind - bind-utils From c51ba65c14c140b8fd99fc0fc2a63585254ac9e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 19 Feb 2024 22:46:19 +0100 Subject: [PATCH 028/165] Install python3-dns and pytest BIND 9.16 still provides python3 modules and can test them using pytest. cds test can use python3-dns, if it is installed. --- Sanity/Run-internal-BIND-test-suite/main.fmf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sanity/Run-internal-BIND-test-suite/main.fmf b/Sanity/Run-internal-BIND-test-suite/main.fmf index 2870d44..0211730 100644 --- a/Sanity/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/Run-internal-BIND-test-suite/main.fmf @@ -31,6 +31,7 @@ recommend: - dnf-utils - rng-tools - gcc-c++ + - python3-dns adjust: - enabled: false when: distro == rhel @@ -47,6 +48,7 @@ adjust: - recommend+: - bind9.16 - bind9.16-utils + - pytest environment+: PACKAGE: bind9.16 when: component == bind9.16 From fc54993c9389062a792e19f18ee082121aeffa50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 18 Mar 2024 11:14:44 +0100 Subject: [PATCH 029/165] Forwarder with DNSSEC enabled test Basic sanity test configuring forwarder, with enabled dnssec. Check that known signed domains are indeed signed and marked as such. Check that few unsigned zones are also marked as unsigned. Checks also trust anchor is trusted and automatically installed. --- Sanity/caching-forwarder-dnssec/main.fmf | 11 ++ Sanity/caching-forwarder-dnssec/test.sh | 211 +++++++++++++++++++++++ 2 files changed, 222 insertions(+) create mode 100644 Sanity/caching-forwarder-dnssec/main.fmf create mode 100755 Sanity/caching-forwarder-dnssec/test.sh diff --git a/Sanity/caching-forwarder-dnssec/main.fmf b/Sanity/caching-forwarder-dnssec/main.fmf new file mode 100644 index 0000000..d84d444 --- /dev/null +++ b/Sanity/caching-forwarder-dnssec/main.fmf @@ -0,0 +1,11 @@ +summary: Configure bind as caching and validating forwarder +test: ./test.sh +framework: beakerlib +description: | + Configures named as a caching forwarder. Keep dnssec-validation enabled and try to + workaround for buggy nameservers provided from the network. +require+: + - bind +recommend+: + - bind-utils + - sed diff --git a/Sanity/caching-forwarder-dnssec/test.sh b/Sanity/caching-forwarder-dnssec/test.sh new file mode 100755 index 0000000..0db5e87 --- /dev/null +++ b/Sanity/caching-forwarder-dnssec/test.sh @@ -0,0 +1,211 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +get_servers_conf() { + local RESOLV_CONF=${1:-/etc/resolv.conf} + # contains extra space at the end! + awk '$1 == "nameserver" { printf "%s ", $2 }' "$RESOLV_CONF" +} + +get_servers() { + # avoids systemd-resolved breaking dnssec + local -a CONF_FILES=() + systemctl is-active --quiet NetworkManager && CONF_FILES+=("/run/NetworkManager/no-stub-resolv.conf") + systemctl is-active --quiet systemd-resolved && CONF_FILES+=("/run/systemd/resolve/resolv.conf") + CONF_FILES+=(/etc/resolv.conf) + for CONF in "${CONF_FILES[@]}" + do + # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often + if [ -r "$CONF" ]; then + SERVERS=$(get_servers_conf "$CONF") + if [ -n "$SERVERS" ]; then + echo "$SERVERS" + break + fi + fi + done +} + +dnssec_servers() { + local SERVERS="$(get_servers)" + if [ -z "$SERVERS" ]; then + rlFail "No nameservers obtained!" + return 1 + fi + local DELV=$(type -p delv 2>/dev/null) + local DIG=$(type -p dig 2>/dev/null) + local FAILED_SERVERS="" + local SECURE_SERVERS="" + + for NS in ${SERVERS}; do + if [ -n "$DELV" ]; then + + if $DELV @$NS | grep -q '^; fully validated'; then + SECURE_SERVERS+="$NS " + else + FAILED_SERVERS+="$NS " + fi + elif [ -n "$DIG" ]; then + + if $DIG +noall +answer +dnssec @$NS | grep -qw RRSIG; then + SECURE_SERVERS+="$NS " + else + FAILED_SERVERS+="$NS " + fi + fi + done + if [ -z "$SECURE_SERVERS" ]; then + rlFail "No servers from ${SERVERS} support DNSSEC! Fix the infrastructure!" + return 1 + fi + + echo "$SECURE_SERVERS" + if [ -n "$FAILED_SERVERS" ]; then + rlLogWarning "Servers not supporting DNSSEC: ${FAILED_SERVERS}" + fi +} + +make_forwarders() +{ + echo 'forwarders {'; + for NS in ${@} + do + printf "\t%s;\n" $NS + done + echo '}; # autogenerated' +} + +# Prints formatted used options in bind config +print_options() +{ + named-checkconf -px "$@" | sed -ne '/^options {/,/^};/ p' +} + +# Check whether option in $1 is used in options {} global block +has_option() +{ + local OPTION="$1" + print_options | grep -qw "^\s*${OPTION}" +} + +# Filter dig to print only desired section +# Input is dig output +buDigGetSection() +{ + local SECTION="${1:-ANSWER}" + sed -ne "/^;; ${SECTION} SECTION:/,/^$/ p" | grep -vE '^(\s*$|;.*$)' +} + +# Filter dig to print only desired value from double comment lines +# Input is dig output +buDigGetField() +{ + local FIELD="$1" + grep "^;;.*\s${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" +} + +buDigPseudosection() +{ + sed -ne "/^;; OPT PSEUDOSECTION:/,/^;; QUESTION SECTION/ p" | grep -vE '^;; (OPT PSEUDO|QUESTION )SECTION:' +} + +# Filter dig to print only desired value from single comment lines +# Useful for pseudosection +# Input is dig output +buDigGetField1() +{ + local FIELD="$1" + grep "^;\s\(.*\s\)\?${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" +} + +buDigSuccess() +{ + rlRun -s "dig $*" + local STATUS="$(buDigGetField status < $rlRun_LOG)" + rlAssertEquals "Check result was positive" "$STATUS" NOERROR +} + +# Ensure reply is signed and verified +buDigSuccessSecure() +{ + rlRun -s "dig $*" + local STATUS="$(buDigGetField status < $rlRun_LOG)" + rlAssertEquals "Check dig result was positive" "$STATUS" NOERROR + local FLAGS="$(buDigGetField flags < $rlRun_LOG)" + rlRun "echo $FLAGS | grep -w ad" 0 "Check dig result has AD bit set" +} + +# Ensure reply is positive but insecure +buDigSuccessInsecure() +{ + rlRun -s "dig $*" + local STATUS="$(buDigGetField status < $rlRun_LOG)" + rlAssertEquals "Check dig result was positive" "$STATUS" NOERROR + local FLAGS="$(buDigGetField flags < $rlRun_LOG)" + rlRun "echo $FLAGS | grep -vw ad" 0 "Check dig result has AD bit unset" +} + +# Extract KSK key id from dig +buDigKskId() +{ + dig +nocrypto +short -t dnskey "$@" | awk '$1 == 257 { sub("]", "", $7); print $7 }' +} + + +rlJournalStart + rlPhaseStartSetup + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlRun "set -o pipefail" + rlRun "SECURE_SERVERS=\"$(dnssec_servers)\"" || rlFail "No secure servers obtained" + rlFileBackup --missing-ok /etc/named/forwarders.conf + rlFileBackup /etc/named.conf + rlRun "make_forwarders ${SECURE_SERVERS} > /etc/named/forwarders.conf" 0 + if ! has_option forwarders; then + rlLog "Inserting include to generated forwarders" + rlRun "sed -i -e '/^s*options\s*{/ a include \"/etc/named/forwarders.conf\";' /etc/named.conf" + fi + rlRun "named-checkconf" 0 "Test generated configuration is acccepted" + rlRun "rlServiceStop named" + rlFileBackup --missing-ok /var/named/dynamic/managed-keys.bind{,.jnl} + rlRun "rm -f /var/named/dynamic/managed-keys.bind{,.jnl}" + rlRun "rlServiceStart named" + rlPhaseEnd + + rlPhaseStartTest "Basic test" + buDigSuccessSecure @localhost . DNSKEY + buDigSuccessSecure @localhost + + KEYID=$(buDigKskId @localhost .) + rlRun "rndc secroots" + rlRun "grep \"^./RSASHA256/$KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" + rlPhaseEnd + + rlPhaseStartTest "Host tests" + for H in example.{org,com,net} fedoraproject.org isc.org + do + buDigSuccessSecure @localhost $H A + buDigSuccessSecure @localhost $H AAAA + done + for H in {org,com,net} + do + buDigSuccessSecure @localhost $H NS + buDigSuccessSecure @localhost $H DS + done + for H in {a,d,f}.root-servers.net + do + buDigSuccessInsecure @localhost $H A + buDigSuccessInsecure @localhost $H AAAA + done + [ "$DEBUG" = y ] && PS1="test-debug $PS1" $SHELL -i + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -f /etc/named/forwarders.conf" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlFileRestore + rlRun "rlServiceRestore named" + rlPhaseEnd +rlJournalEnd From dabbd0413444023cbb92f89458405c8b3c2bf16c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Tue, 19 Mar 2024 13:20:39 +0100 Subject: [PATCH 030/165] Change to support also alternative packages Print also used version of dig and named. --- Sanity/caching-forwarder-dnssec/main.fmf | 27 +++++++++++++++++++++--- Sanity/caching-forwarder-dnssec/test.sh | 2 ++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Sanity/caching-forwarder-dnssec/main.fmf b/Sanity/caching-forwarder-dnssec/main.fmf index d84d444..06fdab6 100644 --- a/Sanity/caching-forwarder-dnssec/main.fmf +++ b/Sanity/caching-forwarder-dnssec/main.fmf @@ -4,8 +4,29 @@ framework: beakerlib description: | Configures named as a caching forwarder. Keep dnssec-validation enabled and try to workaround for buggy nameservers provided from the network. -require+: - - bind + + Test signed zones are validated and include ad bit. Check unsigned zones are + missing ad bit in responses. Requires security-aware DNS servers to be supplied by + the network. recommend+: - - bind-utils - sed + - awk +adjust: + - recommend+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - recommend+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 + - recommend+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next diff --git a/Sanity/caching-forwarder-dnssec/test.sh b/Sanity/caching-forwarder-dnssec/test.sh index 0db5e87..760b592 100755 --- a/Sanity/caching-forwarder-dnssec/test.sh +++ b/Sanity/caching-forwarder-dnssec/test.sh @@ -158,6 +158,8 @@ rlJournalStart rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" rlRun "pushd $tmp" rlRun "set -o pipefail" + rlRun "named -V" + rlRun "dig -v" rlRun "SECURE_SERVERS=\"$(dnssec_servers)\"" || rlFail "No secure servers obtained" rlFileBackup --missing-ok /etc/named/forwarders.conf rlFileBackup /etc/named.conf From aea5744967f652a6f57cd510cff67a9626e64675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Tue, 19 Mar 2024 20:47:24 +0100 Subject: [PATCH 031/165] Rename more functions to move them into bind-utils library --- Sanity/caching-forwarder-dnssec/test.sh | 42 ++++++++++++++----------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/Sanity/caching-forwarder-dnssec/test.sh b/Sanity/caching-forwarder-dnssec/test.sh index 760b592..47f4b58 100755 --- a/Sanity/caching-forwarder-dnssec/test.sh +++ b/Sanity/caching-forwarder-dnssec/test.sh @@ -2,14 +2,15 @@ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k . /usr/share/beakerlib/beakerlib.sh || exit 1 -get_servers_conf() { +: ${CLEAN_ANCHORS:=y} + +buGetServersConf() { local RESOLV_CONF=${1:-/etc/resolv.conf} - # contains extra space at the end! - awk '$1 == "nameserver" { printf "%s ", $2 }' "$RESOLV_CONF" + awk '$1 == "nameserver" { printf "%s%s", DL, $2; DL=" " }' "$RESOLV_CONF" } -get_servers() { - # avoids systemd-resolved breaking dnssec +buGetNameservers() { + # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly local -a CONF_FILES=() systemctl is-active --quiet NetworkManager && CONF_FILES+=("/run/NetworkManager/no-stub-resolv.conf") systemctl is-active --quiet systemd-resolved && CONF_FILES+=("/run/systemd/resolve/resolv.conf") @@ -18,7 +19,7 @@ get_servers() { do # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often if [ -r "$CONF" ]; then - SERVERS=$(get_servers_conf "$CONF") + local SERVERS=$(buGetServersConf "$CONF") if [ -n "$SERVERS" ]; then echo "$SERVERS" break @@ -27,8 +28,8 @@ get_servers() { done } -dnssec_servers() { - local SERVERS="$(get_servers)" +buGetSecureNameservers() { + local SERVERS="$(buGetNameservers)" if [ -z "$SERVERS" ]; then rlFail "No nameservers obtained!" return 1 @@ -66,10 +67,11 @@ dnssec_servers() { fi } -make_forwarders() +# Create bind forwarder configuration from servers entered as parameters +buMakeForwarders() { echo 'forwarders {'; - for NS in ${@} + for NS in "$@" do printf "\t%s;\n" $NS done @@ -77,16 +79,16 @@ make_forwarders() } # Prints formatted used options in bind config -print_options() +buPrintOptions() { named-checkconf -px "$@" | sed -ne '/^options {/,/^};/ p' } # Check whether option in $1 is used in options {} global block -has_option() +buHasOption() { local OPTION="$1" - print_options | grep -qw "^\s*${OPTION}" + buPrintOptions | grep -qw "^\s*${OPTION}" } # Filter dig to print only desired section @@ -105,6 +107,7 @@ buDigGetField() grep "^;;.*\s${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" } +# Filter dig input to print pseudosection contents only buDigPseudosection() { sed -ne "/^;; OPT PSEUDOSECTION:/,/^;; QUESTION SECTION/ p" | grep -vE '^;; (OPT PSEUDO|QUESTION )SECTION:' @@ -119,6 +122,7 @@ buDigGetField1() grep "^;\s\(.*\s\)\?${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" } +# Ensure reply has noerror status buDigSuccess() { rlRun -s "dig $*" @@ -160,18 +164,20 @@ rlJournalStart rlRun "set -o pipefail" rlRun "named -V" rlRun "dig -v" - rlRun "SECURE_SERVERS=\"$(dnssec_servers)\"" || rlFail "No secure servers obtained" + rlRun "SECURE_SERVERS=\"$(buGetSecureNameservers)\"" || rlFail "No secure servers obtained" rlFileBackup --missing-ok /etc/named/forwarders.conf rlFileBackup /etc/named.conf - rlRun "make_forwarders ${SECURE_SERVERS} > /etc/named/forwarders.conf" 0 - if ! has_option forwarders; then + rlRun "buMakeForwarders ${SECURE_SERVERS} > /etc/named/forwarders.conf" 0 + if ! buHasOption forwarders; then rlLog "Inserting include to generated forwarders" rlRun "sed -i -e '/^s*options\s*{/ a include \"/etc/named/forwarders.conf\";' /etc/named.conf" fi rlRun "named-checkconf" 0 "Test generated configuration is acccepted" rlRun "rlServiceStop named" - rlFileBackup --missing-ok /var/named/dynamic/managed-keys.bind{,.jnl} - rlRun "rm -f /var/named/dynamic/managed-keys.bind{,.jnl}" + if [ "$CLEAN_ANCHORS" = y ]; then + rlFileBackup --missing-ok /var/named/dynamic/managed-keys.bind{,.jnl} + rlRun "rm -f /var/named/dynamic/managed-keys.bind{,.jnl}" + fi rlRun "rlServiceStart named" rlPhaseEnd From b37c1f31538daf91c90763a800193242ccc50111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 20 Mar 2024 11:28:51 +0100 Subject: [PATCH 032/165] Ensure keyId is non-empty and non-zero --- Sanity/caching-forwarder-dnssec/test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sanity/caching-forwarder-dnssec/test.sh b/Sanity/caching-forwarder-dnssec/test.sh index 47f4b58..8b8972b 100755 --- a/Sanity/caching-forwarder-dnssec/test.sh +++ b/Sanity/caching-forwarder-dnssec/test.sh @@ -186,6 +186,8 @@ rlJournalStart buDigSuccessSecure @localhost KEYID=$(buDigKskId @localhost .) + rlAssertNotEquals "Check keyId is not empty." "$KEYID" "" + rlAssertGreater "Check keyId is non-zero" "$KEYID" 0 rlRun "rndc secroots" rlRun "grep \"^./RSASHA256/$KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" rlPhaseEnd From 34632deacc3b19f23285af5fb67a9c3b063cfd1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 20 Mar 2024 13:39:26 +0100 Subject: [PATCH 033/165] Workarounds for completely DNSSEC-unaware architecture Instead of hard failures, try to use custom servers. --- Sanity/caching-forwarder-dnssec/test.sh | 75 +++++++++++++++++-------- 1 file changed, 51 insertions(+), 24 deletions(-) diff --git a/Sanity/caching-forwarder-dnssec/test.sh b/Sanity/caching-forwarder-dnssec/test.sh index 8b8972b..77c3e98 100755 --- a/Sanity/caching-forwarder-dnssec/test.sh +++ b/Sanity/caching-forwarder-dnssec/test.sh @@ -4,6 +4,12 @@ : ${CLEAN_ANCHORS:=y} +bu_FALLBACK_SERVERS="8.8.8.8 8.8.4.4" +bu_DELV=$(type -p delv 2>/dev/null) +bu_DIG=$(type -p dig 2>/dev/null) +# Servers which failed DNSSEC-awareness check +bu_FAILED_SERVERS="" + buGetServersConf() { local RESOLV_CONF=${1:-/etc/resolv.conf} awk '$1 == "nameserver" { printf "%s%s", DL, $2; DL=" " }' "$RESOLV_CONF" @@ -28,42 +34,63 @@ buGetNameservers() { done } -buGetSecureNameservers() { - local SERVERS="$(buGetNameservers)" - if [ -z "$SERVERS" ]; then - rlFail "No nameservers obtained!" - return 1 - fi - local DELV=$(type -p delv 2>/dev/null) - local DIG=$(type -p dig 2>/dev/null) - local FAILED_SERVERS="" - local SECURE_SERVERS="" +buCheckSecureNameservers() { + local SERVERS="$1" + bu_SECURE_SERVERS="" for NS in ${SERVERS}; do - if [ -n "$DELV" ]; then + if [ -n "$bu_DELV" ]; then - if $DELV @$NS | grep -q '^; fully validated'; then - SECURE_SERVERS+="$NS " + if $bu_DELV @$NS | grep -q '^; fully validated'; then + bu_SECURE_SERVERS+="$NS " else - FAILED_SERVERS+="$NS " + bu_FAILED_SERVERS+="$NS " fi - elif [ -n "$DIG" ]; then + elif [ -n "$bu_DIG" ]; then - if $DIG +noall +answer +dnssec @$NS | grep -qw RRSIG; then - SECURE_SERVERS+="$NS " + if $bu_DIG +noall +answer +dnssec @$NS | grep -qw RRSIG; then + bu_SECURE_SERVERS+="$NS " else - FAILED_SERVERS+="$NS " + bu_FAILED_SERVERS+="$NS " fi fi done - if [ -z "$SECURE_SERVERS" ]; then - rlFail "No servers from ${SERVERS} support DNSSEC! Fix the infrastructure!" +} + +# Try to find DNSSEC capable network provided forwarders. +# If that fails try to verify $bu_FALLBACK_SERVERS works and use them. +# If no working server is found, call rlDie to stop the test. +buGetSecureNameservers() { + local SERVERS="$(buGetNameservers)" + if [ -z "$SERVERS" ]; then + rlDie "No nameservers obtained!" + return 1 + fi + bu_FAILED_SERVERS="" + local SECURE_SERVERS="" + + buCheckSecureNameservers "$SERVERS" + if [ -z "$bu_SECURE_SERVERS" ]; then + rlLog "Versions of network provided nameservers..." + for NS in ${SERVERS} + do + rlRun -l "dig @$NS txt ch version.bind" 0-255 + done + if [ -n "$bu_FALLBACK_SERVERS" ]; then + # If we have access to public DNS servers, use them instead. They are known to support DNSSEC. + buCheckSecureNameservers "$bu_FALLBACK_SERVERS" + SERVERS+=" $bu_FALLBACK_SERVERS" + rlLogWarning "No network provided servers (${SERVERS}) support DNSSEC! Fix the infrastructure!" + fi + fi + if [ -z "$bu_SECURE_SERVERS" ]; then + rlDie "No servers from ${SERVERS} support DNSSEC! Fix the infrastructure!" return 1 fi - echo "$SECURE_SERVERS" - if [ -n "$FAILED_SERVERS" ]; then - rlLogWarning "Servers not supporting DNSSEC: ${FAILED_SERVERS}" + echo "$bu_SECURE_SERVERS" + if [ -n "$bu_FAILED_SERVERS" ]; then + rlLogWarning "Servers not supporting DNSSEC: ${bu_FAILED_SERVERS}" fi } @@ -203,7 +230,7 @@ rlJournalStart buDigSuccessSecure @localhost $H NS buDigSuccessSecure @localhost $H DS done - for H in {a,d,f}.root-servers.net + for H in {a,d,f}.root-servers.net ipv4only.arpa do buDigSuccessInsecure @localhost $H A buDigSuccessInsecure @localhost $H AAAA From db71acdb1ad1ac0a20784faca97875b05150849c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 20 Mar 2024 14:25:49 +0100 Subject: [PATCH 034/165] Handle better case when no provided server works --- Sanity/caching-forwarder-dnssec/test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sanity/caching-forwarder-dnssec/test.sh b/Sanity/caching-forwarder-dnssec/test.sh index 77c3e98..dbf1ca8 100755 --- a/Sanity/caching-forwarder-dnssec/test.sh +++ b/Sanity/caching-forwarder-dnssec/test.sh @@ -88,10 +88,10 @@ buGetSecureNameservers() { return 1 fi - echo "$bu_SECURE_SERVERS" if [ -n "$bu_FAILED_SERVERS" ]; then rlLogWarning "Servers not supporting DNSSEC: ${bu_FAILED_SERVERS}" fi + rlLogInfo "Found secure servers: $bu_SECURE_SERVERS" } # Create bind forwarder configuration from servers entered as parameters @@ -191,10 +191,10 @@ rlJournalStart rlRun "set -o pipefail" rlRun "named -V" rlRun "dig -v" - rlRun "SECURE_SERVERS=\"$(buGetSecureNameservers)\"" || rlFail "No secure servers obtained" + rlRun "buGetSecureNameservers" || rlFail "No secure servers obtained" rlFileBackup --missing-ok /etc/named/forwarders.conf rlFileBackup /etc/named.conf - rlRun "buMakeForwarders ${SECURE_SERVERS} > /etc/named/forwarders.conf" 0 + rlRun "buMakeForwarders ${bu_SECURE_SERVERS} > /etc/named/forwarders.conf" 0 if ! buHasOption forwarders; then rlLog "Inserting include to generated forwarders" rlRun "sed -i -e '/^s*options\s*{/ a include \"/etc/named/forwarders.conf\";' /etc/named.conf" From 34be987e9e14c2599d7908cc3ef5aee1886ceccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 20 Mar 2024 14:28:49 +0100 Subject: [PATCH 035/165] Fix delv check --- Sanity/delv-smoke-test/runtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sanity/delv-smoke-test/runtest.sh b/Sanity/delv-smoke-test/runtest.sh index 0a3c0be..fd637f4 100755 --- a/Sanity/delv-smoke-test/runtest.sh +++ b/Sanity/delv-smoke-test/runtest.sh @@ -73,7 +73,7 @@ rlJournalStart rlRun -s "delv redhat.com soa +multi" rlAssertGrep 'serial' $rlRun_LOG rlRun -s "delv +multi +vtrace" - LINES=$(wc -l $rlRun_LOG) + rlRun "LINES=$(wc -l <$rlRun_LOG)" rlRun -l "cat $rlRun_LOG" rlAssertGreater "delv +vtrace should show few lines" "$LINES" "10" rlRun "delv +vtrace | grep 'fully validated'" From ef374282fed629596ccef9c77ac9ec4d2d3585f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 20 Mar 2024 16:54:10 +0100 Subject: [PATCH 036/165] Use next resolv.conf if first is is security-unaware Check servers in the most preferred resolv.conf file. If it does not contain security-aware servers, try next file. Only use fallback addresses if none of detected servers works with DNSSEC. --- Sanity/caching-forwarder-dnssec/test.sh | 68 +++++++++++++++++-------- 1 file changed, 48 insertions(+), 20 deletions(-) diff --git a/Sanity/caching-forwarder-dnssec/test.sh b/Sanity/caching-forwarder-dnssec/test.sh index dbf1ca8..58db97f 100755 --- a/Sanity/caching-forwarder-dnssec/test.sh +++ b/Sanity/caching-forwarder-dnssec/test.sh @@ -4,7 +4,7 @@ : ${CLEAN_ANCHORS:=y} -bu_FALLBACK_SERVERS="8.8.8.8 8.8.4.4" +bu_FALLBACK_SERVERS="8.8.8.8 8.8.4.4 9.9.9.9" bu_DELV=$(type -p delv 2>/dev/null) bu_DIG=$(type -p dig 2>/dev/null) # Servers which failed DNSSEC-awareness check @@ -15,29 +15,42 @@ buGetServersConf() { awk '$1 == "nameserver" { printf "%s%s", DL, $2; DL=" " }' "$RESOLV_CONF" } -buGetNameservers() { - # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly +# Get list of resolv-conf (like) files, which might contain useful DNS servers +# Ordered in preference, tries to avoid DNSSEC-unaware servers +buGetCandidateResolvConf() { local -a CONF_FILES=() systemctl is-active --quiet NetworkManager && CONF_FILES+=("/run/NetworkManager/no-stub-resolv.conf") systemctl is-active --quiet systemd-resolved && CONF_FILES+=("/run/systemd/resolve/resolv.conf") - CONF_FILES+=(/etc/resolv.conf) - for CONF in "${CONF_FILES[@]}" + CONF_FILES+=("/etc/resolv.conf") + echo "${CONF_FILES[@]}" +} + +# Print list of nameservers addresses, space separated. +# No check on them is done. +buGetNameservers() { + # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly + for CONF in $(buGetCandidateResolvConf) do + local SERVERS # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often - if [ -r "$CONF" ]; then - local SERVERS=$(buGetServersConf "$CONF") - if [ -n "$SERVERS" ]; then - echo "$SERVERS" - break - fi + if [ -r "$CONF" ] && SERVERS=$(buGetServersConf "$CONF") && [ -n "$SERVERS" ]; then + echo "$SERVERS" + break fi done } +# Test server IP addresses give as parameters to find those, who +# are security-aware. +# Param1: space separated IP addresses of DNS servers buCheckSecureNameservers() { local SERVERS="$1" bu_SECURE_SERVERS="" + if [ -z "$bu_DELV" ] && [ -z "$bu_DIG" ]; then + rlFail "Both delv and dig from bind-utils are missing!" + return 1 + fi for NS in ${SERVERS}; do if [ -n "$bu_DELV" ]; then @@ -55,22 +68,37 @@ buCheckSecureNameservers() { fi fi done + [ -n "$bu_SECURE_SERVERS" ] } # Try to find DNSSEC capable network provided forwarders. # If that fails try to verify $bu_FALLBACK_SERVERS works and use them. # If no working server is found, call rlDie to stop the test. +# Outputs found servers into bu_SECURE_SERVERS and bu_FAILED_SERVERS +# variables buGetSecureNameservers() { - local SERVERS="$(buGetNameservers)" - if [ -z "$SERVERS" ]; then - rlDie "No nameservers obtained!" + bu_FAILED_SERVERS="" + local SERVERS="" + + # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly + for CONF in $(buGetCandidateResolvConf) + do + # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often + if [ -r "$CONF" ] && SERVERS=$(buGetServersConf "$CONF") && [ -n "$SERVERS" ]; then + rlLogDebug "Checking servers from $CONF..." + buCheckSecureNameservers "$SERVERS" && break + fi + done + if [ -z "${bu_SECURE_SERVERS}${bu_FAILED_SERVERS}" ]; then + rlDie "No nameservers obtained, tried files: $(buGetCandidateResolvConf)" return 1 fi - bu_FAILED_SERVERS="" - local SECURE_SERVERS="" - - buCheckSecureNameservers "$SERVERS" if [ -z "$bu_SECURE_SERVERS" ]; then + rlLog "Found resolv files..." + for CONF in $(buGetCandidateResolvConf) + do + rlRun -l "cat $CONF" + done rlLog "Versions of network provided nameservers..." for NS in ${SERVERS} do @@ -79,8 +107,8 @@ buGetSecureNameservers() { if [ -n "$bu_FALLBACK_SERVERS" ]; then # If we have access to public DNS servers, use them instead. They are known to support DNSSEC. buCheckSecureNameservers "$bu_FALLBACK_SERVERS" - SERVERS+=" $bu_FALLBACK_SERVERS" rlLogWarning "No network provided servers (${SERVERS}) support DNSSEC! Fix the infrastructure!" + SERVERS+=" $bu_FALLBACK_SERVERS" fi fi if [ -z "$bu_SECURE_SERVERS" ]; then @@ -91,7 +119,7 @@ buGetSecureNameservers() { if [ -n "$bu_FAILED_SERVERS" ]; then rlLogWarning "Servers not supporting DNSSEC: ${bu_FAILED_SERVERS}" fi - rlLogInfo "Found secure servers: $bu_SECURE_SERVERS" + rlLogInfo "Found security-aware servers: $bu_SECURE_SERVERS" } # Create bind forwarder configuration from servers entered as parameters From c391126fc96a059884b55d3081f4e4dad468d715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Tue, 26 Mar 2024 12:23:32 +0100 Subject: [PATCH 037/165] Additional improvements to caching dnssec forwarder Try multiple starts of named. Trust anchor management might not properly initialize keys. Ensure they work also after restarts. --- Sanity/caching-forwarder-dnssec/test.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Sanity/caching-forwarder-dnssec/test.sh b/Sanity/caching-forwarder-dnssec/test.sh index 58db97f..a96ef44 100755 --- a/Sanity/caching-forwarder-dnssec/test.sh +++ b/Sanity/caching-forwarder-dnssec/test.sh @@ -233,10 +233,13 @@ rlJournalStart rlFileBackup --missing-ok /var/named/dynamic/managed-keys.bind{,.jnl} rlRun "rm -f /var/named/dynamic/managed-keys.bind{,.jnl}" fi - rlRun "rlServiceStart named" + HAS_MANAGED_KEYS='' + rndc -h 2>&1 | grep -q 'managed-keys status' && HAS_MANAGED_KEYS='y' rlPhaseEnd - rlPhaseStartTest "Basic test" +for I in {1..3}; do + rlPhaseStartTest "Basic test #$I" + rlRun "rlServiceStart named" buDigSuccessSecure @localhost . DNSKEY buDigSuccessSecure @localhost @@ -245,9 +248,11 @@ rlJournalStart rlAssertGreater "Check keyId is non-zero" "$KEYID" 0 rlRun "rndc secroots" rlRun "grep \"^./RSASHA256/$KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" + [ "$HAS_MANAGED_KEYS" = y ] && rlRun "rndc managed-keys status" rlPhaseEnd +done - rlPhaseStartTest "Host tests" + rlPhaseStartTest "Host tests #$I" for H in example.{org,com,net} fedoraproject.org isc.org do buDigSuccessSecure @localhost $H A @@ -263,10 +268,10 @@ rlJournalStart buDigSuccessInsecure @localhost $H A buDigSuccessInsecure @localhost $H AAAA done - [ "$DEBUG" = y ] && PS1="test-debug $PS1" $SHELL -i rlPhaseEnd rlPhaseStartCleanup + [ "$DEBUG" = y ] && PS1="test-debug $PS1" $SHELL -i rlRun "popd" rlRun "rm -f /etc/named/forwarders.conf" rlRun "rm -r $tmp" 0 "Remove tmp directory" From d049194f6af7e02e59f2903bd28bdbe04b8f0200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 3 Apr 2024 17:06:20 +0200 Subject: [PATCH 038/165] Initial attempt to test resolution in iterative mode Requires unrestricted DNS servers access. --- Sanity/caching-resolver-dnssec/main.fmf | 31 +++ Sanity/caching-resolver-dnssec/test.sh | 303 ++++++++++++++++++++++++ 2 files changed, 334 insertions(+) create mode 100644 Sanity/caching-resolver-dnssec/main.fmf create mode 100755 Sanity/caching-resolver-dnssec/test.sh diff --git a/Sanity/caching-resolver-dnssec/main.fmf b/Sanity/caching-resolver-dnssec/main.fmf new file mode 100644 index 0000000..9fd6da0 --- /dev/null +++ b/Sanity/caching-resolver-dnssec/main.fmf @@ -0,0 +1,31 @@ +summary: Configure bind as caching and validating iterative resolver +test: ./test.sh +framework: beakerlib +description: | + Configures named as a caching iterative resolver. Keep dnssec-validation enabled and try to + start resolution from root servers hints. + + Test signed zones are validated and include ad bit. Check unsigned zones are + missing ad bit in responses. Requires public root-servers.net and other zone nameservers are directly accessible. +recommend+: + - sed + - awk +adjust: + - recommend+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - recommend+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 + - recommend+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next diff --git a/Sanity/caching-resolver-dnssec/test.sh b/Sanity/caching-resolver-dnssec/test.sh new file mode 100755 index 0000000..70f212a --- /dev/null +++ b/Sanity/caching-resolver-dnssec/test.sh @@ -0,0 +1,303 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +: ${CLEAN_ANCHORS:=y} + +bu_FALLBACK_SERVERS="8.8.8.8 8.8.4.4 9.9.9.9" +bu_DELV=$(type -p delv 2>/dev/null) +bu_DIG=$(type -p dig 2>/dev/null) +# Servers which failed DNSSEC-awareness check +bu_FAILED_SERVERS="" +bu_ROOT_HINTS=/var/named/named.ca + +buGetRootServerAddresses4() { + local HINTS="${1:-$bu_ROOT_HINTS}" + # a.root-servers.net. 518400 IN A 198.41.0.4 + # A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 + awk -v IGNORECASE=1 -- '$1 ~ /[a-m]\.root-servers\.net\./ && $3 == "A" { print $4 } $3 == "IN" && $4 == "A" { print $5 }' "$HINTS" +} + +buGetRootServerAddresses6() { + local HINTS="${1:-$bu_ROOT_HINTS}" + awk -v IGNORECASE=1 -- '$1 ~ /[a-m]\.root-servers\.net\./ && $3 == "AAAA" { print $4 } $3 == "IN" && $4 == "AAAA" { print $5 }' "$HINTS" +} + +# Get list of nameservers from resolv.conf file on standard output +buGetServersConf() { + local RESOLV_CONF=${1:-/etc/resolv.conf} + awk '$1 == "nameserver" { printf "%s%s", DL, $2; DL=" " }' "$RESOLV_CONF" +} + +# Get list of resolv-conf (like) files, which might contain useful DNS servers +# Ordered in preference, tries to avoid DNSSEC-unaware servers +buGetCandidateResolvConf() { + local -a CONF_FILES=() + systemctl is-active --quiet NetworkManager && CONF_FILES+=("/run/NetworkManager/no-stub-resolv.conf") + systemctl is-active --quiet systemd-resolved && CONF_FILES+=("/run/systemd/resolve/resolv.conf") + CONF_FILES+=("/etc/resolv.conf") + echo "${CONF_FILES[@]}" +} + +# Print list of nameservers addresses, space separated. +# No check on them is done. +buGetNameservers() { + # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly + for CONF in $(buGetCandidateResolvConf) + do + local SERVERS + # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often + if [ -r "$CONF" ] && SERVERS=$(buGetServersConf "$CONF") && [ -n "$SERVERS" ]; then + echo "$SERVERS" + break + fi + done +} + +# Test server IP addresses give as parameters to find those, who +# are security-aware. +# Param1: space separated IP addresses of DNS servers +buCheckSecureNameservers() { + local SERVERS="$1" + bu_SECURE_SERVERS="" + + if [ -z "$bu_DELV" ] && [ -z "$bu_DIG" ]; then + rlFail "Both delv and dig from bind-utils are missing!" + return 1 + fi + for NS in ${SERVERS}; do + if [ -n "$bu_DELV" ]; then + + if $bu_DELV @$NS | grep -q '^; fully validated'; then + bu_SECURE_SERVERS+="$NS " + else + bu_FAILED_SERVERS+="$NS " + fi + elif [ -n "$bu_DIG" ]; then + + if $bu_DIG +noall +answer +dnssec @$NS | grep -qw RRSIG; then + bu_SECURE_SERVERS+="$NS " + else + bu_FAILED_SERVERS+="$NS " + fi + fi + done + [ -n "$bu_SECURE_SERVERS" ] +} + +# Try to find DNSSEC capable network provided forwarders. +# If that fails try to verify $bu_FALLBACK_SERVERS works and use them. +# If no working server is found, call rlDie to stop the test. +# Outputs found servers into bu_SECURE_SERVERS and bu_FAILED_SERVERS +# variables +buGetSecureNameservers() { + bu_FAILED_SERVERS="" + local SERVERS="" + + # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly + for CONF in $(buGetCandidateResolvConf) + do + # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often + if [ -r "$CONF" ] && SERVERS=$(buGetServersConf "$CONF") && [ -n "$SERVERS" ]; then + rlLogDebug "Checking servers from $CONF..." + buCheckSecureNameservers "$SERVERS" && break + fi + done + if [ -z "${bu_SECURE_SERVERS}${bu_FAILED_SERVERS}" ]; then + rlDie "No nameservers obtained, tried files: $(buGetCandidateResolvConf)" + return 1 + fi + if [ -z "$bu_SECURE_SERVERS" ]; then + rlLog "Found resolv files..." + for CONF in $(buGetCandidateResolvConf) + do + rlRun -l "cat $CONF" + done + rlLog "Versions of network provided nameservers..." + for NS in ${SERVERS} + do + rlRun -l "dig @$NS txt ch version.bind" 0-255 + done + if [ -n "$bu_FALLBACK_SERVERS" ]; then + # If we have access to public DNS servers, use them instead. They are known to support DNSSEC. + buCheckSecureNameservers "$bu_FALLBACK_SERVERS" + rlLogWarning "No network provided servers (${SERVERS}) support DNSSEC! Fix the infrastructure!" + SERVERS+=" $bu_FALLBACK_SERVERS" + fi + fi + if [ -z "$bu_SECURE_SERVERS" ]; then + rlDie "No servers from ${SERVERS} support DNSSEC! Fix the infrastructure!" + return 1 + fi + + if [ -n "$bu_FAILED_SERVERS" ]; then + rlLogWarning "Servers not supporting DNSSEC: ${bu_FAILED_SERVERS}" + fi + rlLogInfo "Found security-aware servers: $bu_SECURE_SERVERS" +} + +# Create bind forwarder configuration from servers entered as parameters +buMakeForwarders() +{ + echo 'forwarders {'; + for NS in "$@" + do + printf "\t%s;\n" $NS + done + echo '}; # autogenerated' +} + +# Prints formatted used options in bind config +buPrintOptions() +{ + named-checkconf -px "$@" | sed -ne '/^options {/,/^};/ p' +} + +# Check whether option in $1 is used in options {} global block +buHasOption() +{ + local OPTION="$1" + buPrintOptions | grep -qw "^\s*${OPTION}" +} + +# Filter dig to print only desired section +# Input is dig output +buDigGetSection() +{ + local SECTION="${1:-ANSWER}" + sed -ne "/^;; ${SECTION} SECTION:/,/^$/ p" | grep -vE '^(\s*$|;.*$)' +} + +# Filter dig to print only desired value from double comment lines +# Input is dig output +buDigGetField() +{ + local FIELD="$1" + grep "^;;.*\s${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" +} + +# Filter dig input to print pseudosection contents only +buDigPseudosection() +{ + sed -ne "/^;; OPT PSEUDOSECTION:/,/^;; QUESTION SECTION/ p" | grep -vE '^;; (OPT PSEUDO|QUESTION )SECTION:' +} + +# Filter dig to print only desired value from single comment lines +# Useful for pseudosection +# Input is dig output +buDigGetField1() +{ + local FIELD="$1" + grep "^;\s\(.*\s\)\?${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" +} + +# Ensure reply has noerror status +buDigSuccess() +{ + rlRun -s "dig $*" + local STATUS="$(buDigGetField status < $rlRun_LOG)" + rlAssertEquals "Check result was positive" "$STATUS" NOERROR +} + +# Ensure reply is signed and verified +buDigSuccessSecure() +{ + rlRun -s "dig $*" + local STATUS="$(buDigGetField status < $rlRun_LOG)" + rlAssertEquals "Check dig result was positive" "$STATUS" NOERROR + local FLAGS="$(buDigGetField flags < $rlRun_LOG)" + rlRun "echo $FLAGS | grep -w ad" 0 "Check dig result has AD bit set" +} + +# Ensure reply is positive but insecure +buDigSuccessInsecure() +{ + rlRun -s "dig $*" + local STATUS="$(buDigGetField status < $rlRun_LOG)" + rlAssertEquals "Check dig result was positive" "$STATUS" NOERROR + local FLAGS="$(buDigGetField flags < $rlRun_LOG)" + rlRun "echo $FLAGS | grep -vw ad" 0 "Check dig result has AD bit unset" +} + +# Extract KSK key id from dig +buDigKskId() +{ + dig +nocrypto +short -t dnskey "$@" | awk '$1 == 257 { sub("]", "", $7); print $7 }' +} + + +rlJournalStart + rlPhaseStartSetup + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlRun "set -o pipefail" + rlRun "named -V" + rlRun "dig -v" + rlFileBackup /etc/named.conf + rlRun "named-checkconf" 0 "Test generated configuration is acccepted" + rlRun "rlServiceStop named" + if [ "$CLEAN_ANCHORS" = y ]; then + rlFileBackup --missing-ok /var/named/dynamic/managed-keys.bind{,.jnl} + rlRun "rm -f /var/named/dynamic/managed-keys.bind{,.jnl}" + fi + rlAssertExists $bu_ROOT_HINTS + # use buCheckSecureNameservers + rlRun "HINTS4=$(buGetRootServerAddresses4 $bu_ROOT_HINTS)" + rlRun "HINTS6=$(buGetRootServerAddresses6 $bu_ROOT_HINTS)" + SKIP_TEST='' + if ! rlRun buCheckSecureNameservers \"$HINTS4 $HINTS6\" + then + SKIP_TEST=y + rlLogWarning "No root-servers reachable, skipping the test." + fi + rlLog "Working root-servers: $bu_SECURE_SERVERS" + [ -n "$bu_FAILED_SERVERS" ] && rlLogWarning "Failed root-servers: $bu_FAILED_SERVERS" + + HAS_MANAGED_KEYS='' + rndc -h 2>&1 | grep -q 'managed-keys status' && HAS_MANAGED_KEYS='y' + rlPhaseEnd + +if [ "$SKIP_TEST" != y ]; then + +for I in {1..3}; do + rlPhaseStartTest "Basic test #$I" + rlRun "rlServiceStart named" + buDigSuccessSecure @localhost . DNSKEY + buDigSuccessSecure @localhost + + KEYID=$(buDigKskId @localhost .) + rlAssertNotEquals "Check keyId is not empty." "$KEYID" "" + rlAssertGreater "Check keyId is non-zero" "$KEYID" 0 + rlRun "rndc secroots" + rlRun "grep \"^./RSASHA256/$KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" + [ "$HAS_MANAGED_KEYS" = y ] && rlRun "rndc managed-keys status" + rlPhaseEnd +done + + rlPhaseStartTest "Host tests #$I" + for H in example.{org,com,net} fedoraproject.org isc.org + do + buDigSuccessSecure @localhost $H A + buDigSuccessSecure @localhost $H AAAA + done + for H in {org,com,net} + do + buDigSuccessSecure @localhost $H NS + buDigSuccessSecure @localhost $H DS + done + for H in {a,d,f}.root-servers.net ipv4only.arpa + do + buDigSuccessInsecure @localhost $H A + buDigSuccessInsecure @localhost $H AAAA + done + rlPhaseEnd +fi + + rlPhaseStartCleanup + [ "$DEBUG" = y ] && PS1="test-debug $PS1" $SHELL -i + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlFileRestore + rlRun "rlServiceRestore named" + rlPhaseEnd +rlJournalEnd From f7aba615ec0145ae0d7fdb5964d977a28529f823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 3 Apr 2024 18:49:28 +0200 Subject: [PATCH 039/165] Give some time to server to initialize --- Sanity/caching-resolver-dnssec/test.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Sanity/caching-resolver-dnssec/test.sh b/Sanity/caching-resolver-dnssec/test.sh index 70f212a..60f4cab 100755 --- a/Sanity/caching-resolver-dnssec/test.sh +++ b/Sanity/caching-resolver-dnssec/test.sh @@ -66,16 +66,16 @@ buCheckSecureNameservers() { return 1 fi for NS in ${SERVERS}; do + # use tcp to fail faster on ipv6 global route not available if [ -n "$bu_DELV" ]; then - - if $bu_DELV @$NS | grep -q '^; fully validated'; then + if $bu_DELV +tcp @$NS | grep -q '^; fully validated'; then bu_SECURE_SERVERS+="$NS " else bu_FAILED_SERVERS+="$NS " fi elif [ -n "$bu_DIG" ]; then - if $bu_DIG +noall +answer +dnssec @$NS | grep -qw RRSIG; then + if $bu_DIG +tcp +noall +answer +dnssec @$NS | grep -qw RRSIG; then bu_SECURE_SERVERS+="$NS " else bu_FAILED_SERVERS+="$NS " @@ -242,14 +242,19 @@ rlJournalStart fi rlAssertExists $bu_ROOT_HINTS # use buCheckSecureNameservers - rlRun "HINTS4=$(buGetRootServerAddresses4 $bu_ROOT_HINTS)" - rlRun "HINTS6=$(buGetRootServerAddresses6 $bu_ROOT_HINTS)" + rlRun "HINTS4=\"$(buGetRootServerAddresses4 $bu_ROOT_HINTS)\"" + rlRun "HINTS6=\"$(buGetRootServerAddresses6 $bu_ROOT_HINTS)\"" SKIP_TEST='' - if ! rlRun buCheckSecureNameservers \"$HINTS4 $HINTS6\" + if ! rlRun "buCheckSecureNameservers \"$HINTS4 $HINTS6\"" then SKIP_TEST=y rlLogWarning "No root-servers reachable, skipping the test." fi + WORKING_NUM=0 + for NSIP in ${bu_SECURE_SERVERS}; do + WORKING_NUM=$((WORKING_NUM+1)) + done + rlAssertGreater "Check we have at least some working servers" "$WORKING_NUM" 3 rlLog "Working root-servers: $bu_SECURE_SERVERS" [ -n "$bu_FAILED_SERVERS" ] && rlLogWarning "Failed root-servers: $bu_FAILED_SERVERS" @@ -262,6 +267,8 @@ if [ "$SKIP_TEST" != y ]; then for I in {1..3}; do rlPhaseStartTest "Basic test #$I" rlRun "rlServiceStart named" + # give it chance to warm up + sleep 5 buDigSuccessSecure @localhost . DNSKEY buDigSuccessSecure @localhost @@ -272,6 +279,7 @@ for I in {1..3}; do rlRun "grep \"^./RSASHA256/$KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" [ "$HAS_MANAGED_KEYS" = y ] && rlRun "rndc managed-keys status" rlPhaseEnd + sleep 5 done rlPhaseStartTest "Host tests #$I" From 9fff86a8abdc4694c58963ca9d61dd67971eb993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 8 Apr 2024 10:45:50 +0200 Subject: [PATCH 040/165] Additional changes to accept first fail When IPv6 is enabled but unavailable, it is possible it takes longer time to make successful root priming queries. Accept initial issues. --- Sanity/caching-resolver-dnssec/test.sh | 74 ++++++++++++++++++++++---- 1 file changed, 65 insertions(+), 9 deletions(-) diff --git a/Sanity/caching-resolver-dnssec/test.sh b/Sanity/caching-resolver-dnssec/test.sh index 60f4cab..57faeef 100755 --- a/Sanity/caching-resolver-dnssec/test.sh +++ b/Sanity/caching-resolver-dnssec/test.sh @@ -3,6 +3,13 @@ . /usr/share/beakerlib/beakerlib.sh || exit 1 : ${CLEAN_ANCHORS:=y} +: ${NAMED_OPTIONS:=} +# How many times to check basic root check +: ${BASIC_TRIES:=3} +# How many times to check host checks +: ${HOSTS_TRIES:=3} +# On which host check pass require successful responses? +: ${HOSTS_PASSING:=2} bu_FALLBACK_SERVERS="8.8.8.8 8.8.4.4 9.9.9.9" bu_DELV=$(type -p delv 2>/dev/null) @@ -191,6 +198,12 @@ buDigGetField1() grep "^;\s\(.*\s\)\?${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" } +# just receive any response, no matter what status +buDig() +{ + rlRun -s "dig $*" +} + # Ensure reply has noerror status buDigSuccess() { @@ -237,15 +250,48 @@ rlJournalStart rlRun "named-checkconf" 0 "Test generated configuration is acccepted" rlRun "rlServiceStop named" if [ "$CLEAN_ANCHORS" = y ]; then - rlFileBackup --missing-ok /var/named/dynamic/managed-keys.bind{,.jnl} + rlFileBackup --clean /var/named/dynamic/managed-keys.bind{,.jnl} rlRun "rm -f /var/named/dynamic/managed-keys.bind{,.jnl}" fi rlAssertExists $bu_ROOT_HINTS # use buCheckSecureNameservers rlRun "HINTS4=\"$(buGetRootServerAddresses4 $bu_ROOT_HINTS)\"" rlRun "HINTS6=\"$(buGetRootServerAddresses6 $bu_ROOT_HINTS)\"" + rlRun "HINTS4_NUM=$(echo \"$HINTS4\" | wc -l)" + rlRun "HINTS6_NUM=$(echo \"$HINTS6\" | wc -l)" + HINTS4_WORKS='' + HINTS6_WORKS='' + if [ "$NAMED_OPTIONS" = auto ]; then + # TODO: is this complication desirable? + if [ "$HINTS4_NUM" -gt 0 ] && buCheckSecureNameservers "$HINTS4"; then + SECURE_SERVERS4="$bu_SECURE_SERVERS" + FAILED_SERVERS4="$bu_FAILED_SERVERS" + HINTS4_WORKS=y + fi + if [ "$HINTS6_NUM" -gt 0 ] && buCheckSecureNameservers "$HINTS6"; then + SECURE_SERVERS6="$bu_SECURE_SERVERS" + FAILED_SERVERS6="$bu_FAILED_SERVERS" + [ -n "$FAILED_SERVERS4" ] && bu_FAILED_SERVERS+=" $FAILED_SERVERS4" + [ -n "$SECURE_SERVERS4" ] && bu_SECURE_SERVERS+=" $SECURE_SERVERS4" + HINTS6_WORKS=y + fi + if [ "$HINTS4_WORKS" = y ] && [ -z "$HINTS6_WORKS" ]; then + rlRun "NAMED_OPTIONS='-4'" + elif [ "$HINTS6_WORKS" = y ] && [ -z "$HINTS4_WORKS" ]; then + rlRun "NAMED_OPTIONS='-6'" + else + rlRun "NAMED_OPTIONS=''" + fi + else + rlRun "buCheckSecureNameservers \"$HINTS4 $HINTS6\"" && HINTS4_WORKS=y && HINTS4_WORKS=y + fi + if [ -n "$NAMED_OPTIONS" ]; then + rlFileBackup /etc/sysconfig/named + echo "OPTIONS+=\"$NAMED_OPTIONS\"" >> /etc/sysconfig/named + rlRun "grep OPTIONS /etc/sysconfig/named" + fi SKIP_TEST='' - if ! rlRun "buCheckSecureNameservers \"$HINTS4 $HINTS6\"" + if [ -z "$HINTS6_WORKS" ] && [ -z "$HINTS4_WORKS" ] then SKIP_TEST=y rlLogWarning "No root-servers reachable, skipping the test." @@ -254,7 +300,7 @@ rlJournalStart for NSIP in ${bu_SECURE_SERVERS}; do WORKING_NUM=$((WORKING_NUM+1)) done - rlAssertGreater "Check we have at least some working servers" "$WORKING_NUM" 3 + rlAssertGreater "Check we have at least some working root servers" "$WORKING_NUM" 5 rlLog "Working root-servers: $bu_SECURE_SERVERS" [ -n "$bu_FAILED_SERVERS" ] && rlLogWarning "Failed root-servers: $bu_FAILED_SERVERS" @@ -282,23 +328,33 @@ for I in {1..3}; do sleep 5 done +DIG_SEC=buDig +DIG_INSEC=buDig + +for I in $(seq $HOSTS_TRIES); do rlPhaseStartTest "Host tests #$I" + if [ "$I" = "$HOSTS_PASSING" ]; then + DIG_SEC=buDigSuccessSecure + DIG_INSEC=buDigSuccessInsecure + fi for H in example.{org,com,net} fedoraproject.org isc.org do - buDigSuccessSecure @localhost $H A - buDigSuccessSecure @localhost $H AAAA + $DIG_SEC @localhost $H A + $DIG_SEC @localhost $H AAAA done for H in {org,com,net} do - buDigSuccessSecure @localhost $H NS - buDigSuccessSecure @localhost $H DS + $DIG_SEC @localhost $H NS + $DIG_SEC @localhost $H DS done for H in {a,d,f}.root-servers.net ipv4only.arpa do - buDigSuccessInsecure @localhost $H A - buDigSuccessInsecure @localhost $H AAAA + $DIG_INSEC @localhost $H A + $DIG_INSEC @localhost $H AAAA done rlPhaseEnd + sleep 5 +done fi rlPhaseStartCleanup From 9ca79d3fe0e3c3dd171e63700a93015a421770ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 8 Apr 2024 21:09:35 +0200 Subject: [PATCH 041/165] Make delays configurable --- Sanity/caching-resolver-dnssec/test.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Sanity/caching-resolver-dnssec/test.sh b/Sanity/caching-resolver-dnssec/test.sh index 57faeef..adaf00a 100755 --- a/Sanity/caching-resolver-dnssec/test.sh +++ b/Sanity/caching-resolver-dnssec/test.sh @@ -10,6 +10,10 @@ : ${HOSTS_TRIES:=3} # On which host check pass require successful responses? : ${HOSTS_PASSING:=2} +# Delay after named service start +: ${DELAY_START:=5} +# Delay between tests +: ${DELAY_TEST:=5} bu_FALLBACK_SERVERS="8.8.8.8 8.8.4.4 9.9.9.9" bu_DELV=$(type -p delv 2>/dev/null) @@ -314,7 +318,7 @@ for I in {1..3}; do rlPhaseStartTest "Basic test #$I" rlRun "rlServiceStart named" # give it chance to warm up - sleep 5 + sleep ${DELAY_START} buDigSuccessSecure @localhost . DNSKEY buDigSuccessSecure @localhost @@ -325,7 +329,7 @@ for I in {1..3}; do rlRun "grep \"^./RSASHA256/$KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" [ "$HAS_MANAGED_KEYS" = y ] && rlRun "rndc managed-keys status" rlPhaseEnd - sleep 5 + sleep ${DELAY_TEST} done DIG_SEC=buDig @@ -353,7 +357,7 @@ for I in $(seq $HOSTS_TRIES); do $DIG_INSEC @localhost $H AAAA done rlPhaseEnd - sleep 5 + sleep ${DELAY_TEST} done fi From 683b31cbf0a5e624017082ea07dce60f4d900ea7 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 28 May 2024 10:27:10 +0200 Subject: [PATCH 042/165] init --- plans/others.fmf | 20 ++++++++++++++++++++ plans/tier1.fmf | 20 ++++++++++++++++++++ plans/tier2-tier3.fmf | 20 ++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 plans/others.fmf create mode 100644 plans/tier1.fmf create mode 100644 plans/tier2-tier3.fmf diff --git a/plans/others.fmf b/plans/others.fmf new file mode 100644 index 0000000..ca8c0f1 --- /dev/null +++ b/plans/others.fmf @@ -0,0 +1,20 @@ +/public: + summary: Public other tests + discover: + how: fmf + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + url: "https://src.fedoraproject.org/tests/bind.git" + execute: + how: tmt + +/internal: + summary: Internal other tests + discover: + how: fmf + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt diff --git a/plans/tier1.fmf b/plans/tier1.fmf new file mode 100644 index 0000000..6ad8b0a --- /dev/null +++ b/plans/tier1.fmf @@ -0,0 +1,20 @@ +/public: + summary: Public Tier1 tests + discover: + how: fmf + filter: 'tier: 1' + url: "https://src.fedoraproject.org/tests/bind.git" + execute: + how: tmt + +/internal: + summary: Internal Tier1 tests + discover: + how: fmf + filter: 'tier: 1' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt diff --git a/plans/tier2-tier3.fmf b/plans/tier2-tier3.fmf new file mode 100644 index 0000000..e119b90 --- /dev/null +++ b/plans/tier2-tier3.fmf @@ -0,0 +1,20 @@ +/public: + summary: Public Tier2 and Tier3 tests + discover: + how: fmf + filter: 'tier: 2 | tier: 3' + url: "https://src.fedoraproject.org/tests/bind.git" + execute: + how: tmt + +/internal: + summary: Internal Tier2 and Tier3 tests + discover: + how: fmf + filter: 'tier: 2 | tier: 3' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt From 17d375dcc89f47f3654d83eba1fc2a89101187f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Thu, 20 Jun 2024 17:11:17 +0200 Subject: [PATCH 043/165] Move around some Sanity tests Test sharing adjust definitions by having it once per subdirectory in Sanity. Separate named for bind testing, utils for just bind-utils testing. With the same working also for other bind variants. --- .../Run-internal-BIND-test-suite/Makefile | 0 .../Run-internal-BIND-test-suite/PURPOSE | 0 .../bind-systest-filter.sh | 0 .../Run-internal-BIND-test-suite/knownerror | 0 .../Run-internal-BIND-test-suite/main.fmf | 16 +----------- .../Run-internal-BIND-test-suite/runtest.sh | 0 .../setup-named-softhsm.sh | 0 .../caching-forwarder-dnssec/main.fmf | 19 -------------- .../caching-forwarder-dnssec/test.sh | 0 Sanity/{ => named}/geoip-support/Makefile | 0 Sanity/{ => named}/geoip-support/PURPOSE | 0 Sanity/{ => named}/geoip-support/a | 0 Sanity/{ => named}/geoip-support/b | 0 Sanity/{ => named}/geoip-support/c | 0 Sanity/{ => named}/geoip-support/main.fmf | 20 +-------------- Sanity/{ => named}/geoip-support/named.conf | 0 Sanity/{ => named}/geoip-support/notes | 0 Sanity/{ => named}/geoip-support/runtest.sh | 0 Sanity/{ => named}/json-support/Makefile | 0 Sanity/{ => named}/json-support/PURPOSE | 0 Sanity/{ => named}/json-support/main.fmf | 19 -------------- Sanity/{ => named}/json-support/readstats.py | 0 Sanity/{ => named}/json-support/runtest.sh | 0 Sanity/named/main.fmf | 25 +++++++++++++++++++ Sanity/{ => named}/named-checkzone/Makefile | 0 Sanity/{ => named}/named-checkzone/PURPOSE | 0 .../named-checkzone/cptest2.tld.db | 0 Sanity/{ => named}/named-checkzone/main.fmf | 20 +-------------- Sanity/{ => named}/named-checkzone/runtest.sh | 0 Sanity/{ => utils}/delv-smoke-test/Makefile | 0 Sanity/{ => utils}/delv-smoke-test/PURPOSE | 0 Sanity/{ => utils}/delv-smoke-test/main.fmf | 17 +------------ Sanity/{ => utils}/delv-smoke-test/runtest.sh | 0 Sanity/utils/main.fmf | 21 ++++++++++++++++ 34 files changed, 50 insertions(+), 107 deletions(-) rename Sanity/{ => named}/Run-internal-BIND-test-suite/Makefile (100%) rename Sanity/{ => named}/Run-internal-BIND-test-suite/PURPOSE (100%) rename Sanity/{ => named}/Run-internal-BIND-test-suite/bind-systest-filter.sh (100%) rename Sanity/{ => named}/Run-internal-BIND-test-suite/knownerror (100%) rename Sanity/{ => named}/Run-internal-BIND-test-suite/main.fmf (90%) rename Sanity/{ => named}/Run-internal-BIND-test-suite/runtest.sh (100%) rename Sanity/{ => named}/Run-internal-BIND-test-suite/setup-named-softhsm.sh (100%) rename Sanity/{ => named}/caching-forwarder-dnssec/main.fmf (52%) rename Sanity/{ => named}/caching-forwarder-dnssec/test.sh (100%) rename Sanity/{ => named}/geoip-support/Makefile (100%) rename Sanity/{ => named}/geoip-support/PURPOSE (100%) rename Sanity/{ => named}/geoip-support/a (100%) rename Sanity/{ => named}/geoip-support/b (100%) rename Sanity/{ => named}/geoip-support/c (100%) rename Sanity/{ => named}/geoip-support/main.fmf (58%) rename Sanity/{ => named}/geoip-support/named.conf (100%) rename Sanity/{ => named}/geoip-support/notes (100%) rename Sanity/{ => named}/geoip-support/runtest.sh (100%) rename Sanity/{ => named}/json-support/Makefile (100%) rename Sanity/{ => named}/json-support/PURPOSE (100%) rename Sanity/{ => named}/json-support/main.fmf (54%) rename Sanity/{ => named}/json-support/readstats.py (100%) rename Sanity/{ => named}/json-support/runtest.sh (100%) create mode 100644 Sanity/named/main.fmf rename Sanity/{ => named}/named-checkzone/Makefile (100%) rename Sanity/{ => named}/named-checkzone/PURPOSE (100%) rename Sanity/{ => named}/named-checkzone/cptest2.tld.db (100%) rename Sanity/{ => named}/named-checkzone/main.fmf (51%) rename Sanity/{ => named}/named-checkzone/runtest.sh (100%) rename Sanity/{ => utils}/delv-smoke-test/Makefile (100%) rename Sanity/{ => utils}/delv-smoke-test/PURPOSE (100%) rename Sanity/{ => utils}/delv-smoke-test/main.fmf (64%) rename Sanity/{ => utils}/delv-smoke-test/runtest.sh (100%) create mode 100644 Sanity/utils/main.fmf diff --git a/Sanity/Run-internal-BIND-test-suite/Makefile b/Sanity/named/Run-internal-BIND-test-suite/Makefile similarity index 100% rename from Sanity/Run-internal-BIND-test-suite/Makefile rename to Sanity/named/Run-internal-BIND-test-suite/Makefile diff --git a/Sanity/Run-internal-BIND-test-suite/PURPOSE b/Sanity/named/Run-internal-BIND-test-suite/PURPOSE similarity index 100% rename from Sanity/Run-internal-BIND-test-suite/PURPOSE rename to Sanity/named/Run-internal-BIND-test-suite/PURPOSE diff --git a/Sanity/Run-internal-BIND-test-suite/bind-systest-filter.sh b/Sanity/named/Run-internal-BIND-test-suite/bind-systest-filter.sh similarity index 100% rename from Sanity/Run-internal-BIND-test-suite/bind-systest-filter.sh rename to Sanity/named/Run-internal-BIND-test-suite/bind-systest-filter.sh diff --git a/Sanity/Run-internal-BIND-test-suite/knownerror b/Sanity/named/Run-internal-BIND-test-suite/knownerror similarity index 100% rename from Sanity/Run-internal-BIND-test-suite/knownerror rename to Sanity/named/Run-internal-BIND-test-suite/knownerror diff --git a/Sanity/Run-internal-BIND-test-suite/main.fmf b/Sanity/named/Run-internal-BIND-test-suite/main.fmf similarity index 90% rename from Sanity/Run-internal-BIND-test-suite/main.fmf rename to Sanity/named/Run-internal-BIND-test-suite/main.fmf index 0211730..6feee43 100644 --- a/Sanity/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/named/Run-internal-BIND-test-suite/main.fmf @@ -32,32 +32,18 @@ recommend: - rng-tools - gcc-c++ - python3-dns -adjust: +adjust+: - enabled: false when: distro == rhel continue: false because: Slightly different copy resides in internal tests. - recommend+: - - bind - - bind-utils - bind-pkcs11 - bind-pkcs11-utils - environment+: - PACKAGE: bind when: component is not defined or component == bind - recommend+: - - bind9.16 - - bind9.16-utils - pytest - environment+: - PACKAGE: bind9.16 when: component == bind9.16 - - recommend+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - recommend+: - kyua when: distro < fedora-37 or distro <= rhel-9 or distro <= centos-9 diff --git a/Sanity/Run-internal-BIND-test-suite/runtest.sh b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh similarity index 100% rename from Sanity/Run-internal-BIND-test-suite/runtest.sh rename to Sanity/named/Run-internal-BIND-test-suite/runtest.sh diff --git a/Sanity/Run-internal-BIND-test-suite/setup-named-softhsm.sh b/Sanity/named/Run-internal-BIND-test-suite/setup-named-softhsm.sh similarity index 100% rename from Sanity/Run-internal-BIND-test-suite/setup-named-softhsm.sh rename to Sanity/named/Run-internal-BIND-test-suite/setup-named-softhsm.sh diff --git a/Sanity/caching-forwarder-dnssec/main.fmf b/Sanity/named/caching-forwarder-dnssec/main.fmf similarity index 52% rename from Sanity/caching-forwarder-dnssec/main.fmf rename to Sanity/named/caching-forwarder-dnssec/main.fmf index 06fdab6..6655445 100644 --- a/Sanity/caching-forwarder-dnssec/main.fmf +++ b/Sanity/named/caching-forwarder-dnssec/main.fmf @@ -11,22 +11,3 @@ description: | recommend+: - sed - awk -adjust: - - recommend+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - recommend+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 - - recommend+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next diff --git a/Sanity/caching-forwarder-dnssec/test.sh b/Sanity/named/caching-forwarder-dnssec/test.sh similarity index 100% rename from Sanity/caching-forwarder-dnssec/test.sh rename to Sanity/named/caching-forwarder-dnssec/test.sh diff --git a/Sanity/geoip-support/Makefile b/Sanity/named/geoip-support/Makefile similarity index 100% rename from Sanity/geoip-support/Makefile rename to Sanity/named/geoip-support/Makefile diff --git a/Sanity/geoip-support/PURPOSE b/Sanity/named/geoip-support/PURPOSE similarity index 100% rename from Sanity/geoip-support/PURPOSE rename to Sanity/named/geoip-support/PURPOSE diff --git a/Sanity/geoip-support/a b/Sanity/named/geoip-support/a similarity index 100% rename from Sanity/geoip-support/a rename to Sanity/named/geoip-support/a diff --git a/Sanity/geoip-support/b b/Sanity/named/geoip-support/b similarity index 100% rename from Sanity/geoip-support/b rename to Sanity/named/geoip-support/b diff --git a/Sanity/geoip-support/c b/Sanity/named/geoip-support/c similarity index 100% rename from Sanity/geoip-support/c rename to Sanity/named/geoip-support/c diff --git a/Sanity/geoip-support/main.fmf b/Sanity/named/geoip-support/main.fmf similarity index 58% rename from Sanity/geoip-support/main.fmf rename to Sanity/named/geoip-support/main.fmf index 14c96b8..6198ddc 100644 --- a/Sanity/geoip-support/main.fmf +++ b/Sanity/named/geoip-support/main.fmf @@ -18,25 +18,7 @@ tag: - TIPpass link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1564443 -adjust: - - recommend+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - recommend+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 - - recommend+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next +adjust+: - enabled: false when: distro < rhel-8 continue: false diff --git a/Sanity/geoip-support/named.conf b/Sanity/named/geoip-support/named.conf similarity index 100% rename from Sanity/geoip-support/named.conf rename to Sanity/named/geoip-support/named.conf diff --git a/Sanity/geoip-support/notes b/Sanity/named/geoip-support/notes similarity index 100% rename from Sanity/geoip-support/notes rename to Sanity/named/geoip-support/notes diff --git a/Sanity/geoip-support/runtest.sh b/Sanity/named/geoip-support/runtest.sh similarity index 100% rename from Sanity/geoip-support/runtest.sh rename to Sanity/named/geoip-support/runtest.sh diff --git a/Sanity/json-support/Makefile b/Sanity/named/json-support/Makefile similarity index 100% rename from Sanity/json-support/Makefile rename to Sanity/named/json-support/Makefile diff --git a/Sanity/json-support/PURPOSE b/Sanity/named/json-support/PURPOSE similarity index 100% rename from Sanity/json-support/PURPOSE rename to Sanity/named/json-support/PURPOSE diff --git a/Sanity/json-support/main.fmf b/Sanity/named/json-support/main.fmf similarity index 54% rename from Sanity/json-support/main.fmf rename to Sanity/named/json-support/main.fmf index 3d7db7c..481449d 100644 --- a/Sanity/json-support/main.fmf +++ b/Sanity/named/json-support/main.fmf @@ -8,25 +8,6 @@ test: ./runtest.sh framework: beakerlib recommend: - python3 -adjust: - - require+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - require+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 duration: 5m extra-summary: /CoreOS/bind/Sanity/json-support extra-task: /CoreOS/bind/Sanity/json-support diff --git a/Sanity/json-support/readstats.py b/Sanity/named/json-support/readstats.py similarity index 100% rename from Sanity/json-support/readstats.py rename to Sanity/named/json-support/readstats.py diff --git a/Sanity/json-support/runtest.sh b/Sanity/named/json-support/runtest.sh similarity index 100% rename from Sanity/json-support/runtest.sh rename to Sanity/named/json-support/runtest.sh diff --git a/Sanity/named/main.fmf b/Sanity/named/main.fmf new file mode 100644 index 0000000..ee5c028 --- /dev/null +++ b/Sanity/named/main.fmf @@ -0,0 +1,25 @@ +adjust+: + - require+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - require+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next + - require+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 + - require+: + - bind9.18 + - bind9.18-utils + environment+: + PACKAGE: bind9.18 + when: component == bind9.18 diff --git a/Sanity/named-checkzone/Makefile b/Sanity/named/named-checkzone/Makefile similarity index 100% rename from Sanity/named-checkzone/Makefile rename to Sanity/named/named-checkzone/Makefile diff --git a/Sanity/named-checkzone/PURPOSE b/Sanity/named/named-checkzone/PURPOSE similarity index 100% rename from Sanity/named-checkzone/PURPOSE rename to Sanity/named/named-checkzone/PURPOSE diff --git a/Sanity/named-checkzone/cptest2.tld.db b/Sanity/named/named-checkzone/cptest2.tld.db similarity index 100% rename from Sanity/named-checkzone/cptest2.tld.db rename to Sanity/named/named-checkzone/cptest2.tld.db diff --git a/Sanity/named-checkzone/main.fmf b/Sanity/named/named-checkzone/main.fmf similarity index 51% rename from Sanity/named-checkzone/main.fmf rename to Sanity/named/named-checkzone/main.fmf index 48ed354..8604fd4 100644 --- a/Sanity/named-checkzone/main.fmf +++ b/Sanity/named/named-checkzone/main.fmf @@ -11,28 +11,10 @@ tag: - TIP_fedora_pass - TIPfail_infra - TIPpass -adjust: +adjust+: - enabled: false when: distro == rhel-4, rhel-5 continue: false - - require+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - require+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 extra-nitrate: TC#0500008 extra-summary: /CoreOS/bind/Sanity/named-checkzone extra-task: /CoreOS/bind/Sanity/named-checkzone diff --git a/Sanity/named-checkzone/runtest.sh b/Sanity/named/named-checkzone/runtest.sh similarity index 100% rename from Sanity/named-checkzone/runtest.sh rename to Sanity/named/named-checkzone/runtest.sh diff --git a/Sanity/delv-smoke-test/Makefile b/Sanity/utils/delv-smoke-test/Makefile similarity index 100% rename from Sanity/delv-smoke-test/Makefile rename to Sanity/utils/delv-smoke-test/Makefile diff --git a/Sanity/delv-smoke-test/PURPOSE b/Sanity/utils/delv-smoke-test/PURPOSE similarity index 100% rename from Sanity/delv-smoke-test/PURPOSE rename to Sanity/utils/delv-smoke-test/PURPOSE diff --git a/Sanity/delv-smoke-test/main.fmf b/Sanity/utils/delv-smoke-test/main.fmf similarity index 64% rename from Sanity/delv-smoke-test/main.fmf rename to Sanity/utils/delv-smoke-test/main.fmf index e88c2ed..c958142 100644 --- a/Sanity/delv-smoke-test/main.fmf +++ b/Sanity/utils/delv-smoke-test/main.fmf @@ -14,22 +14,7 @@ tag: - TIPpass link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 -adjust: - - require+: - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - require+: - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 +adjust+: - enabled: false when: distro == rhel-4, rhel-5, rhel-6 continue: false diff --git a/Sanity/delv-smoke-test/runtest.sh b/Sanity/utils/delv-smoke-test/runtest.sh similarity index 100% rename from Sanity/delv-smoke-test/runtest.sh rename to Sanity/utils/delv-smoke-test/runtest.sh diff --git a/Sanity/utils/main.fmf b/Sanity/utils/main.fmf new file mode 100644 index 0000000..eea994f --- /dev/null +++ b/Sanity/utils/main.fmf @@ -0,0 +1,21 @@ +adjust+: + - require+: + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - require+: + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next + - require+: + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 + - require+: + - bind9.18-utils + environment+: + PACKAGE: bind9.18 + when: component == bind9.18 From e0014821e22761d2699f065f277a9cfa70ae7f04 Mon Sep 17 00:00:00 2001 From: Ondrej Mejzlik Date: Thu, 20 Jun 2024 19:36:59 +0200 Subject: [PATCH 044/165] add id --- .../main.fmf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf index de86262..655341d 100644 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf +++ b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf @@ -22,20 +22,21 @@ adjust: - bind - bind-utils environment+: - PACKAGE: bind + PACKAGE: bind when: component is not defined or component == bind - require+: - bind9-next - bind9-next-utils environment+: - PACKAGE: bind9-next + PACKAGE: bind9-next when: component == bind9-next - require+: - bind9.16 - bind9.16-utils environment+: - PACKAGE: bind9.16 + PACKAGE: bind9.16 when: component == bind9.16 extra-nitrate: TC#0612648 extra-summary: /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP extra-task: /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP +id: 5914328a-2eec-4235-adea-12eb62aaaf79 From 36a7999ab889c27094d6e30d5149e81d025376a5 Mon Sep 17 00:00:00 2001 From: Ondrej Mejzlik Date: Thu, 20 Jun 2024 19:39:16 +0200 Subject: [PATCH 045/165] update ids --- .../main.fmf | 10 +++++----- .../main.fmf | 7 ++++--- Sanity/named/Run-internal-BIND-test-suite/main.fmf | 1 + Sanity/named/caching-forwarder-dnssec/main.fmf | 12 +++++++----- Sanity/named/geoip-support/main.fmf | 1 + Sanity/named/json-support/main.fmf | 4 +++- Sanity/named/named-checkzone/main.fmf | 1 + Sanity/utils/delv-smoke-test/main.fmf | 1 + Smoke/IpaInstallAndStart/main.fmf | 2 ++ Stub/master-and-stub-server-talks-a-bit/main.fmf | 7 ++++--- 10 files changed, 29 insertions(+), 17 deletions(-) diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf index 4c70332..be4a214 100644 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf +++ b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf @@ -5,26 +5,24 @@ description: | contact: Petr Mensik test: ./runtest.sh framework: beakerlib -#require: -# - library(bind/bind-utils) adjust: - require+: - bind - bind-utils environment+: - PACKAGE: bind + PACKAGE: bind when: component is not defined or component == bind - require+: - bind9-next - bind9-next-utils environment+: - PACKAGE: bind9-next + PACKAGE: bind9-next when: component == bind9-next - require+: - bind9.16 - bind9.16-utils environment+: - PACKAGE: bind9.16 + PACKAGE: bind9.16 when: component == bind9.16 duration: 5m link: @@ -32,3 +30,5 @@ link: extra-summary: /CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key extra-task: /CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key enabled: false +extra-nitrate: TC#0617578 +id: b8609264-51d5-4484-bff1-a9ca60567868 diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf b/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf index 40087d9..28384cf 100644 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf +++ b/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf @@ -19,20 +19,21 @@ adjust: - bind - bind-utils environment+: - PACKAGE: bind + PACKAGE: bind when: component is not defined or component == bind - require+: - bind9-next - bind9-next-utils environment+: - PACKAGE: bind9-next + PACKAGE: bind9-next when: component == bind9-next - require+: - bind9.16 - bind9.16-utils environment+: - PACKAGE: bind9.16 + PACKAGE: bind9.16 when: component == bind9.16 extra-nitrate: TC#0608023 extra-summary: /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits extra-task: /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits +id: 911c9541-d475-4f5a-9d33-e31892328a47 diff --git a/Sanity/named/Run-internal-BIND-test-suite/main.fmf b/Sanity/named/Run-internal-BIND-test-suite/main.fmf index 6feee43..56e9c97 100644 --- a/Sanity/named/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/named/Run-internal-BIND-test-suite/main.fmf @@ -84,3 +84,4 @@ link: extra-nitrate: TC#0126580 extra-summary: /CoreOS/bind/Sanity/Run-internal-BIND-test-suite extra-task: /CoreOS/bind/Sanity/Run-internal-BIND-test-suite +id: af6d1878-449e-4577-819a-bef95cc51311 diff --git a/Sanity/named/caching-forwarder-dnssec/main.fmf b/Sanity/named/caching-forwarder-dnssec/main.fmf index 6655445..835fdbd 100644 --- a/Sanity/named/caching-forwarder-dnssec/main.fmf +++ b/Sanity/named/caching-forwarder-dnssec/main.fmf @@ -2,12 +2,14 @@ summary: Configure bind as caching and validating forwarder test: ./test.sh framework: beakerlib description: | - Configures named as a caching forwarder. Keep dnssec-validation enabled and try to - workaround for buggy nameservers provided from the network. + Configures named as a caching forwarder. Keep dnssec-validation enabled and try to + workaround for buggy nameservers provided from the network. - Test signed zones are validated and include ad bit. Check unsigned zones are - missing ad bit in responses. Requires security-aware DNS servers to be supplied by - the network. + Test signed zones are validated and include ad bit. Check unsigned zones are + missing ad bit in responses. Requires security-aware DNS servers to be supplied by + the network. recommend+: - sed - awk +extra-nitrate: TC#0617579 +id: 3525bab3-7884-4252-b0ad-1688de267812 diff --git a/Sanity/named/geoip-support/main.fmf b/Sanity/named/geoip-support/main.fmf index 6198ddc..110b91b 100644 --- a/Sanity/named/geoip-support/main.fmf +++ b/Sanity/named/geoip-support/main.fmf @@ -25,3 +25,4 @@ adjust+: extra-nitrate: TC#0604089 extra-summary: /CoreOS/bind/Sanity/geoip-support extra-task: /CoreOS/bind/Sanity/geoip-support +id: e930061a-c2d5-4369-a2a3-5b02d29e75eb diff --git a/Sanity/named/json-support/main.fmf b/Sanity/named/json-support/main.fmf index 481449d..4cdc58a 100644 --- a/Sanity/named/json-support/main.fmf +++ b/Sanity/named/json-support/main.fmf @@ -3,7 +3,7 @@ description: | Bug summary: [RFE] Request for libjson support to be added to bind compile options for statistics-channel Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1899257 contact: -- Petr Mensik + - Petr Mensik test: ./runtest.sh framework: beakerlib recommend: @@ -11,3 +11,5 @@ recommend: duration: 5m extra-summary: /CoreOS/bind/Sanity/json-support extra-task: /CoreOS/bind/Sanity/json-support +extra-nitrate: TC#0617580 +id: 5ee697b0-9cee-4316-b3ca-403629851c36 diff --git a/Sanity/named/named-checkzone/main.fmf b/Sanity/named/named-checkzone/main.fmf index 8604fd4..4e283c5 100644 --- a/Sanity/named/named-checkzone/main.fmf +++ b/Sanity/named/named-checkzone/main.fmf @@ -18,3 +18,4 @@ adjust+: extra-nitrate: TC#0500008 extra-summary: /CoreOS/bind/Sanity/named-checkzone extra-task: /CoreOS/bind/Sanity/named-checkzone +id: eae4f1cf-90e4-4cfe-a470-9b9ac6450f53 diff --git a/Sanity/utils/delv-smoke-test/main.fmf b/Sanity/utils/delv-smoke-test/main.fmf index c958142..d1fe2d6 100644 --- a/Sanity/utils/delv-smoke-test/main.fmf +++ b/Sanity/utils/delv-smoke-test/main.fmf @@ -21,3 +21,4 @@ adjust+: extra-nitrate: TC#0600760 extra-summary: /CoreOS/bind/Sanity/delv-smoke-test extra-task: /CoreOS/bind/Sanity/delv-smoke-test +id: f1a91125-a3e4-4675-a598-dfa8969d20f1 diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index 9bf1327..16b75e3 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -7,3 +7,5 @@ adjust: - enabled: false when: component != bind because: freeipa is not supported with alternative components +extra-nitrate: TC#0617581 +id: d4375cba-a2fd-4b33-bb8a-83cda760e237 diff --git a/Stub/master-and-stub-server-talks-a-bit/main.fmf b/Stub/master-and-stub-server-talks-a-bit/main.fmf index 2b6f19c..50ce885 100644 --- a/Stub/master-and-stub-server-talks-a-bit/main.fmf +++ b/Stub/master-and-stub-server-talks-a-bit/main.fmf @@ -24,20 +24,21 @@ adjust: - bind - bind-utils environment+: - PACKAGE: bind + PACKAGE: bind when: component is not defined or component == bind - require+: - bind9-next - bind9-next-utils environment+: - PACKAGE: bind9-next + PACKAGE: bind9-next when: component == bind9-next - require+: - bind9.16 - bind9.16-utils environment+: - PACKAGE: bind9.16 + PACKAGE: bind9.16 when: component == bind9.16 extra-nitrate: TC#0518539 extra-summary: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit extra-task: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit +id: 7ac90330-6225-4a37-85ae-3fb8af6e71cc From 9cdca4d50785abe5be99ebba056797cba2ef8fa2 Mon Sep 17 00:00:00 2001 From: Stepan Broz Date: Thu, 1 Aug 2024 12:59:02 +0000 Subject: [PATCH 046/165] Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf - Adjust relevancy Fixed in RHEL-9.0 only via BZ#19999857 --- .../bind-does-not-listen-on-all-addresses-over-TCP/main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf index 655341d..7d510a7 100644 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf +++ b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf @@ -16,7 +16,7 @@ link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1999691 adjust: - enabled: false - when: distro == rhel-4, rhel-5 + when: distro < rhel-9.0 continue: false - require+: - bind From a8e1a0c048fb5bd7ed86f88af1a81365877c69ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 31 Jul 2024 21:12:55 +0200 Subject: [PATCH 047/165] Initial check for bind-dyndb-ldap Make it easier to indicate whether bind-devel allows bind-dyndb-ldap to rebuild. --- Sanity/named/bind-dyndb-ldap-rebuild/main.fmf | 9 ++++ Sanity/named/bind-dyndb-ldap-rebuild/test.sh | 42 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 Sanity/named/bind-dyndb-ldap-rebuild/main.fmf create mode 100755 Sanity/named/bind-dyndb-ldap-rebuild/test.sh diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf new file mode 100644 index 0000000..489854f --- /dev/null +++ b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf @@ -0,0 +1,9 @@ +summary: Tries whether bind-dyndb-ldap can be build with this bind-devel +test: ./test.sh +framework: beakerlib +require: + - bind-devel +recommend: + - fedpkg + - centpkg + - rhpkg diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/test.sh b/Sanity/named/bind-dyndb-ldap-rebuild/test.sh new file mode 100755 index 0000000..401d1a0 --- /dev/null +++ b/Sanity/named/bind-dyndb-ldap-rebuild/test.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm bind-devel + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlRun "source /etc/os-release" + case "$ID" + centos) + PKG=centpkg + BRANCH=cs${VERSION} + ;; + rhel) + PKG=rhpkg + BRANCH=rhel-${VERSION}-main + ;; + fedora) + PKG=fedpkg + BRANCH=rawhide + ;; + *) + rlFatal "Unsupported distribution $ID" ;; + esac + rlRun "$PKG clone -a bind-dyndb-ldap" + rlRun "pushd bind-dyndb-ldap" + rlPhaseEnd + + rlPhaseStartTest + rlRun "git checkout $BRANCH" + rlRun "$PKG local" + rlRun "rpm -qpl $(arch)/bind-dyndb-ldap-*.$(arch).rpm" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "popd" + rlRun "rm -rf $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd From 27bd4c448c34fb89eb03819dd3bcc16b37dab543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 31 Jul 2024 21:25:34 +0200 Subject: [PATCH 048/165] Install external package builders on demand If they are not in already enabled repositories, test dependency would not be enough. --- Sanity/named/bind-dyndb-ldap-rebuild/main.fmf | 2 -- Sanity/named/bind-dyndb-ldap-rebuild/test.sh | 9 ++++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf index 489854f..582bb41 100644 --- a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf +++ b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf @@ -5,5 +5,3 @@ require: - bind-devel recommend: - fedpkg - - centpkg - - rhpkg diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/test.sh b/Sanity/named/bind-dyndb-ldap-rebuild/test.sh index 401d1a0..e727105 100755 --- a/Sanity/named/bind-dyndb-ldap-rebuild/test.sh +++ b/Sanity/named/bind-dyndb-ldap-rebuild/test.sh @@ -8,21 +8,24 @@ rlJournalStart rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" rlRun "pushd $tmp" rlRun "source /etc/os-release" - case "$ID" + case "$ID" in centos) PKG=centpkg BRANCH=cs${VERSION} + rlRun "rpm -q $PKG || dnf install -y --enablerepo=epel $PKG" ;; rhel) PKG=rhpkg BRANCH=rhel-${VERSION}-main + rlRun "rpm -q $PKG || dnf install -y --enablerepo='*CRB' --enablerepo='*buildroot' $PKG" ;; fedora) PKG=fedpkg BRANCH=rawhide + rlRun "rpm -q $PKG || dnf install -y $PKG" ;; *) - rlFatal "Unsupported distribution $ID" ;; + rlLogFatal "Unsupported distribution $ID" ;; esac rlRun "$PKG clone -a bind-dyndb-ldap" rlRun "pushd bind-dyndb-ldap" @@ -31,7 +34,7 @@ rlJournalStart rlPhaseStartTest rlRun "git checkout $BRANCH" rlRun "$PKG local" - rlRun "rpm -qpl $(arch)/bind-dyndb-ldap-*.$(arch).rpm" + rlRun "rpm -qpl $(arch)/bind-dyndb-ldap-*.$(arch).rpm | grep bind/ldap.so" rlPhaseEnd rlPhaseStartCleanup From f22a72c076f0443cd48fb8495489f5531f21c257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 31 Jul 2024 21:57:29 +0200 Subject: [PATCH 049/165] Allow installation fail Build is important, it may fail in some cases and be okay. --- Sanity/named/bind-dyndb-ldap-rebuild/main.fmf | 3 +-- Sanity/named/bind-dyndb-ldap-rebuild/test.sh | 22 +++++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf index 582bb41..25bb984 100644 --- a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf +++ b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf @@ -1,7 +1,6 @@ summary: Tries whether bind-dyndb-ldap can be build with this bind-devel test: ./test.sh framework: beakerlib -require: +recommend+: - bind-devel -recommend: - fedpkg diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/test.sh b/Sanity/named/bind-dyndb-ldap-rebuild/test.sh index e727105..2f0dfc1 100755 --- a/Sanity/named/bind-dyndb-ldap-rebuild/test.sh +++ b/Sanity/named/bind-dyndb-ldap-rebuild/test.sh @@ -4,31 +4,35 @@ rlJournalStart rlPhaseStartSetup - rlAssertRpm bind-devel rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" rlRun "pushd $tmp" rlRun "source /etc/os-release" case "$ID" in + fedora) + PKG=fedpkg + BRANCH=rawhide + EXTRA_REPOS='' + ;; centos) PKG=centpkg - BRANCH=cs${VERSION} - rlRun "rpm -q $PKG || dnf install -y --enablerepo=epel $PKG" + BRANCH=c${VERSION}s + EXTRA_REPOS="--enablerepo=epel --enablerepo=crb" ;; rhel) PKG=rhpkg BRANCH=rhel-${VERSION}-main - rlRun "rpm -q $PKG || dnf install -y --enablerepo='*CRB' --enablerepo='*buildroot' $PKG" - ;; - fedora) - PKG=fedpkg - BRANCH=rawhide - rlRun "rpm -q $PKG || dnf install -y $PKG" + EXTRA_REPOS=" --enablerepo='*CRB' --enablerepo='*buildroot'" ;; *) rlLogFatal "Unsupported distribution $ID" ;; esac + rlRun "rpm -q bind-devel || dnf install -y $EXTRA_REPOS bind-devel" + rlRun "rpm -q $PKG || dnf install -y $EXTRA_REPOS $PKG" + rlAssertRpm bind-devel rlRun "$PKG clone -a bind-dyndb-ldap" rlRun "pushd bind-dyndb-ldap" + rlRun "ls -l *.spec" + rlRun "dnf builddep -y $EXTRA_REPOS *.spec" 0,1 rlPhaseEnd rlPhaseStartTest From e7c2fc2a149580d97826515e9942569c1d6cc0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 31 Jul 2024 21:59:38 +0200 Subject: [PATCH 050/165] Disable for rhel and centos Only Fedora is passing now. --- Sanity/named/bind-dyndb-ldap-rebuild/main.fmf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf index 25bb984..70d9acf 100644 --- a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf +++ b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf @@ -1,6 +1,9 @@ -summary: Tries whether bind-dyndb-ldap can be build with this bind-devel +summary: Tries whether bind-dyndb-ldap can be build with current bind-devel test: ./test.sh framework: beakerlib recommend+: - bind-devel - fedpkg +adjust+: + - enabled: false + when: distro == rhel, centos From 341c6a0695101f1658b743db6ea7db61ea57f432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 31 Jul 2024 22:07:30 +0200 Subject: [PATCH 051/165] Tune description and disable for alternative builds --- Sanity/named/bind-dyndb-ldap-rebuild/main.fmf | 6 +++++- Sanity/named/bind-dyndb-ldap-rebuild/test.sh | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf index 70d9acf..8dc7afb 100644 --- a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf +++ b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf @@ -1,4 +1,6 @@ -summary: Tries whether bind-dyndb-ldap can be build with current bind-devel +summary: bind-dyndb-ldap build with current bind-devel +description: | + Checks whether bind-devel is okay to build bind-dyndb-ldap for freeipa. test: ./test.sh framework: beakerlib recommend+: @@ -7,3 +9,5 @@ recommend+: adjust+: - enabled: false when: distro == rhel, centos + - enabled: false + when: component is defined and component != bind diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/test.sh b/Sanity/named/bind-dyndb-ldap-rebuild/test.sh index 2f0dfc1..a4dd96e 100755 --- a/Sanity/named/bind-dyndb-ldap-rebuild/test.sh +++ b/Sanity/named/bind-dyndb-ldap-rebuild/test.sh @@ -2,6 +2,8 @@ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k . /usr/share/beakerlib/beakerlib.sh || exit 1 +: ${PACKAGE:=bind} + rlJournalStart rlPhaseStartSetup rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" @@ -26,9 +28,9 @@ rlJournalStart *) rlLogFatal "Unsupported distribution $ID" ;; esac - rlRun "rpm -q bind-devel || dnf install -y $EXTRA_REPOS bind-devel" + rlRun "rpm -q $PACKAGE-devel || dnf install -y $EXTRA_REPOS $PACKAGE-devel" rlRun "rpm -q $PKG || dnf install -y $EXTRA_REPOS $PKG" - rlAssertRpm bind-devel + rlAssertRpm $PACKAGE-devel rlRun "$PKG clone -a bind-dyndb-ldap" rlRun "pushd bind-dyndb-ldap" rlRun "ls -l *.spec" From 0c8bf1b3959db3e3b7828a5667be80990fcd26f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Thu, 20 Jun 2024 17:11:17 +0200 Subject: [PATCH 052/165] Move around some Sanity tests Test sharing adjust definitions by having it once per subdirectory in Sanity. Separate named for bind testing, utils for just bind-utils testing. With the same working also for other bind variants. --- Sanity/caching-resolver-dnssec/main.fmf | 31 ------------------------- Sanity/named/main.fmf | 2 ++ Sanity/utils/main.fmf | 2 ++ 3 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 Sanity/caching-resolver-dnssec/main.fmf diff --git a/Sanity/caching-resolver-dnssec/main.fmf b/Sanity/caching-resolver-dnssec/main.fmf deleted file mode 100644 index 9fd6da0..0000000 --- a/Sanity/caching-resolver-dnssec/main.fmf +++ /dev/null @@ -1,31 +0,0 @@ -summary: Configure bind as caching and validating iterative resolver -test: ./test.sh -framework: beakerlib -description: | - Configures named as a caching iterative resolver. Keep dnssec-validation enabled and try to - start resolution from root servers hints. - - Test signed zones are validated and include ad bit. Check unsigned zones are - missing ad bit in responses. Requires public root-servers.net and other zone nameservers are directly accessible. -recommend+: - - sed - - awk -adjust: - - recommend+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - recommend+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 - - recommend+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next diff --git a/Sanity/named/main.fmf b/Sanity/named/main.fmf index ee5c028..56e49bc 100644 --- a/Sanity/named/main.fmf +++ b/Sanity/named/main.fmf @@ -1,3 +1,5 @@ +tags+: + - named adjust+: - require+: - bind diff --git a/Sanity/utils/main.fmf b/Sanity/utils/main.fmf index eea994f..3e38b4c 100644 --- a/Sanity/utils/main.fmf +++ b/Sanity/utils/main.fmf @@ -1,3 +1,5 @@ +tags+: + - utils adjust+: - require+: - bind-utils From e13e4c1026a2675158349f1d2d34f940905885c6 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 26 Aug 2024 15:56:11 +0200 Subject: [PATCH 053/165] plans for bind9.18 --- plans/bind9.18/others.fmf | 29 +++++++++++++++++++++++++++++ plans/bind9.18/tier1.fmf | 27 +++++++++++++++++++++++++++ plans/bind9.18/tier2-tier3.fmf | 27 +++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 plans/bind9.18/others.fmf create mode 100644 plans/bind9.18/tier1.fmf create mode 100644 plans/bind9.18/tier2-tier3.fmf diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf new file mode 100644 index 0000000..0a551c8 --- /dev/null +++ b/plans/bind9.18/others.fmf @@ -0,0 +1,29 @@ +environment+: + PACKAGE: bind9.18 + +/public: + summary: Public other tests + discover: + how: fmf + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + url: "https://src.fedoraproject.org/tests/bind.git" + execute: + how: tmt + context: + component: bind9.18 + + +/internal: + summary: Internal other tests + discover: + how: fmf + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt + context: + component: bind9.18 + diff --git a/plans/bind9.18/tier1.fmf b/plans/bind9.18/tier1.fmf new file mode 100644 index 0000000..f8a75d7 --- /dev/null +++ b/plans/bind9.18/tier1.fmf @@ -0,0 +1,27 @@ +environment+: + PACKAGE: bind9.18 + +/public: + summary: Public Tier1 tests + discover: + how: fmf + filter: 'tier: 1 & tag: bind9.18' + url: "https://src.fedoraproject.org/tests/bind.git" + execute: + how: tmt + context: + component: bind9.18 + +/internal: + summary: Internal Tier1 tests + discover: + how: fmf + filter: 'tier: 1 & tag: bind9.18 + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt + context: + component: bind9.18 diff --git a/plans/bind9.18/tier2-tier3.fmf b/plans/bind9.18/tier2-tier3.fmf new file mode 100644 index 0000000..2da1e3d --- /dev/null +++ b/plans/bind9.18/tier2-tier3.fmf @@ -0,0 +1,27 @@ +environment+: + PACKAGE: bind9.18 + +/public: + summary: Public Tier2 and Tier3 tests + discover: + how: fmf + filter: 'tier: 2 & tag: bind9.18 | tier: 3 & tag: bind9.18' + url: "https://src.fedoraproject.org/tests/bind.git" + execute: + how: tmt + context: + component: bind9.18 + +/internal: + summary: Internal Tier2 and Tier3 tests + discover: + how: fmf + filter: 'tier: 2 & tag: bind9.18 | tier: 3 & tag: bind9.18' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt + context: + component: bind9.18 From 63ce40ab8d85e09c844b8161fdb786cd1a823361 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 26 Aug 2024 16:08:33 +0200 Subject: [PATCH 054/165] for plans for bind9.18 --- Sanity/named/geoip-support/main.fmf | 2 ++ plans/bind9.18/tier1.fmf | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Sanity/named/geoip-support/main.fmf b/Sanity/named/geoip-support/main.fmf index 110b91b..502989a 100644 --- a/Sanity/named/geoip-support/main.fmf +++ b/Sanity/named/geoip-support/main.fmf @@ -16,6 +16,8 @@ tag: - NoRHEL5 - TIPfail_infra - TIPpass + - bind9.16 + - bind9.18 link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1564443 adjust+: diff --git a/plans/bind9.18/tier1.fmf b/plans/bind9.18/tier1.fmf index f8a75d7..a5601ea 100644 --- a/plans/bind9.18/tier1.fmf +++ b/plans/bind9.18/tier1.fmf @@ -16,7 +16,7 @@ environment+: summary: Internal Tier1 tests discover: how: fmf - filter: 'tier: 1 & tag: bind9.18 + filter: 'tier: 1 & tag: bind9.18' url: git://pkgs.devel.redhat.com/tests/bind adjust: enabled: false From fabe31cae40540d535ab05e760e6a31f2a7b3750 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 26 Aug 2024 20:21:01 +0200 Subject: [PATCH 055/165] option were not used and deprecieated --- Stub/master-and-stub-server-talks-a-bit/named.conf.MASTER | 2 -- Stub/master-and-stub-server-talks-a-bit/named.conf.STUB | 2 -- 2 files changed, 4 deletions(-) diff --git a/Stub/master-and-stub-server-talks-a-bit/named.conf.MASTER b/Stub/master-and-stub-server-talks-a-bit/named.conf.MASTER index a50d911..b6b36de 100644 --- a/Stub/master-and-stub-server-talks-a-bit/named.conf.MASTER +++ b/Stub/master-and-stub-server-talks-a-bit/named.conf.MASTER @@ -8,9 +8,7 @@ options { allow-query { any; }; - dnssec-enable no; dnssec-validation no; - dnssec-lookaside no; }; zone "." { diff --git a/Stub/master-and-stub-server-talks-a-bit/named.conf.STUB b/Stub/master-and-stub-server-talks-a-bit/named.conf.STUB index 6b12550..9de8354 100644 --- a/Stub/master-and-stub-server-talks-a-bit/named.conf.STUB +++ b/Stub/master-and-stub-server-talks-a-bit/named.conf.STUB @@ -9,9 +9,7 @@ options { directory "/tmp/bind-for-petr"; allow-query { any; }; - dnssec-enable no; dnssec-validation no; - dnssec-lookaside no; }; zone "." IN { From b3f070b9383a06a58f8caf5119eb866dc2013309 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 28 Aug 2024 08:34:30 +0200 Subject: [PATCH 056/165] bind plan set up --- plans/bind/ci.fmf | 8 ++++++++ plans/bind/others.fmf | 20 ++++++++++++++++++++ plans/bind/tier1.fmf | 20 ++++++++++++++++++++ plans/bind/tier2-tier3.fmf | 20 ++++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 plans/bind/ci.fmf create mode 100644 plans/bind/others.fmf create mode 100644 plans/bind/tier1.fmf create mode 100644 plans/bind/tier2-tier3.fmf diff --git a/plans/bind/ci.fmf b/plans/bind/ci.fmf new file mode 100644 index 0000000..d646b66 --- /dev/null +++ b/plans/bind/ci.fmf @@ -0,0 +1,8 @@ +summary: CI plan, picks up all tests, runs in beakerlib. +discover: + - name: fedora + how: fmf +execute: + how: tmt +context: + component: bind diff --git a/plans/bind/others.fmf b/plans/bind/others.fmf new file mode 100644 index 0000000..ca8c0f1 --- /dev/null +++ b/plans/bind/others.fmf @@ -0,0 +1,20 @@ +/public: + summary: Public other tests + discover: + how: fmf + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + url: "https://src.fedoraproject.org/tests/bind.git" + execute: + how: tmt + +/internal: + summary: Internal other tests + discover: + how: fmf + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt diff --git a/plans/bind/tier1.fmf b/plans/bind/tier1.fmf new file mode 100644 index 0000000..6ad8b0a --- /dev/null +++ b/plans/bind/tier1.fmf @@ -0,0 +1,20 @@ +/public: + summary: Public Tier1 tests + discover: + how: fmf + filter: 'tier: 1' + url: "https://src.fedoraproject.org/tests/bind.git" + execute: + how: tmt + +/internal: + summary: Internal Tier1 tests + discover: + how: fmf + filter: 'tier: 1' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt diff --git a/plans/bind/tier2-tier3.fmf b/plans/bind/tier2-tier3.fmf new file mode 100644 index 0000000..e119b90 --- /dev/null +++ b/plans/bind/tier2-tier3.fmf @@ -0,0 +1,20 @@ +/public: + summary: Public Tier2 and Tier3 tests + discover: + how: fmf + filter: 'tier: 2 | tier: 3' + url: "https://src.fedoraproject.org/tests/bind.git" + execute: + how: tmt + +/internal: + summary: Internal Tier2 and Tier3 tests + discover: + how: fmf + filter: 'tier: 2 | tier: 3' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt From 219236b537678ef8f3606cad4154ddfec81c294f Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 28 Aug 2024 14:24:52 +0200 Subject: [PATCH 057/165] bind9.18 plans --- plans/bind9.18/others.fmf | 4 ++-- plans/bind9.18/tier1.fmf | 4 ++-- plans/bind9.18/tier2-tier3.fmf | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index 0a551c8..ba80ff8 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -5,7 +5,7 @@ environment+: summary: Public other tests discover: how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library' url: "https://src.fedoraproject.org/tests/bind.git" execute: how: tmt @@ -17,7 +17,7 @@ environment+: summary: Internal other tests discover: how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library' url: git://pkgs.devel.redhat.com/tests/bind adjust: enabled: false diff --git a/plans/bind9.18/tier1.fmf b/plans/bind9.18/tier1.fmf index a5601ea..835528b 100644 --- a/plans/bind9.18/tier1.fmf +++ b/plans/bind9.18/tier1.fmf @@ -5,7 +5,7 @@ environment+: summary: Public Tier1 tests discover: how: fmf - filter: 'tier: 1 & tag: bind9.18' + filter: 'tier: 1 & tag: -library' url: "https://src.fedoraproject.org/tests/bind.git" execute: how: tmt @@ -16,7 +16,7 @@ environment+: summary: Internal Tier1 tests discover: how: fmf - filter: 'tier: 1 & tag: bind9.18' + filter: 'tier: 1 & tag: -library' url: git://pkgs.devel.redhat.com/tests/bind adjust: enabled: false diff --git a/plans/bind9.18/tier2-tier3.fmf b/plans/bind9.18/tier2-tier3.fmf index 2da1e3d..96ed949 100644 --- a/plans/bind9.18/tier2-tier3.fmf +++ b/plans/bind9.18/tier2-tier3.fmf @@ -5,7 +5,7 @@ environment+: summary: Public Tier2 and Tier3 tests discover: how: fmf - filter: 'tier: 2 & tag: bind9.18 | tier: 3 & tag: bind9.18' + filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' url: "https://src.fedoraproject.org/tests/bind.git" execute: how: tmt @@ -16,7 +16,7 @@ environment+: summary: Internal Tier2 and Tier3 tests discover: how: fmf - filter: 'tier: 2 & tag: bind9.18 | tier: 3 & tag: bind9.18' + filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library url: git://pkgs.devel.redhat.com/tests/bind adjust: enabled: false From b9bf2f4411f34e00643787b3d4fef5a5b02d1a59 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 28 Aug 2024 14:32:49 +0200 Subject: [PATCH 058/165] bind9.18 plans --- plans/bind9.18/tier2-tier3.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plans/bind9.18/tier2-tier3.fmf b/plans/bind9.18/tier2-tier3.fmf index 96ed949..59285d6 100644 --- a/plans/bind9.18/tier2-tier3.fmf +++ b/plans/bind9.18/tier2-tier3.fmf @@ -16,7 +16,7 @@ environment+: summary: Internal Tier2 and Tier3 tests discover: how: fmf - filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library + filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' url: git://pkgs.devel.redhat.com/tests/bind adjust: enabled: false From 9f62b6196bfe936d99748837bc4f46e419d8fd1c Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 13:45:03 +0200 Subject: [PATCH 059/165] plan for ipa --- plans/bind/ipa.fmf | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 plans/bind/ipa.fmf diff --git a/plans/bind/ipa.fmf b/plans/bind/ipa.fmf new file mode 100644 index 0000000..8b800cb --- /dev/null +++ b/plans/bind/ipa.fmf @@ -0,0 +1,12 @@ +/public: + summary: Public Tier2 and Tier3 tests + discover: + how: fmf + filter: 'ipaMoreMem' + url: "https://src.fedoraproject.org/tests/bind.git" + provision: + hardware: + memory: + - size: "> 2 GB" + execute: + how: tmt From 1e7c3d88532f31dbfbb99a8c9aee9ba11f472518 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 13:48:27 +0200 Subject: [PATCH 060/165] plan for ipa --- plans/bind/ipa.fmf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plans/bind/ipa.fmf b/plans/bind/ipa.fmf index 8b800cb..b6831fa 100644 --- a/plans/bind/ipa.fmf +++ b/plans/bind/ipa.fmf @@ -6,7 +6,6 @@ url: "https://src.fedoraproject.org/tests/bind.git" provision: hardware: - memory: - - size: "> 2 GB" + memory: ">= 2 GB" execute: how: tmt From b3d27f67244411cdaffbbadfb66fbfe3b11281b2 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 13:50:15 +0200 Subject: [PATCH 061/165] test need more mem, add tag --- Smoke/IpaInstallAndStart/main.fmf | 1 + 1 file changed, 1 insertion(+) diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index 16b75e3..47d9f65 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -8,4 +8,5 @@ adjust: when: component != bind because: freeipa is not supported with alternative components extra-nitrate: TC#0617581 +tag: ipaMoreMem id: d4375cba-a2fd-4b33-bb8a-83cda760e237 From 524c1d5deaeef786a85fa2b72b002664f18a2837 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 13:56:02 +0200 Subject: [PATCH 062/165] test need more mem, add tag --- plans/bind/ipa.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plans/bind/ipa.fmf b/plans/bind/ipa.fmf index b6831fa..75e6330 100644 --- a/plans/bind/ipa.fmf +++ b/plans/bind/ipa.fmf @@ -1,5 +1,5 @@ /public: - summary: Public Tier2 and Tier3 tests + summary: IPA test with more mem discover: how: fmf filter: 'ipaMoreMem' From 05845330c8beb4beafbe0195a03fc5c903c0be1d Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 14:06:43 +0200 Subject: [PATCH 063/165] setting component name --- Smoke/main.fmf | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Smoke/main.fmf diff --git a/Smoke/main.fmf b/Smoke/main.fmf new file mode 100644 index 0000000..ee5c028 --- /dev/null +++ b/Smoke/main.fmf @@ -0,0 +1,25 @@ +adjust+: + - require+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - require+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next + - require+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 + - require+: + - bind9.18 + - bind9.18-utils + environment+: + PACKAGE: bind9.18 + when: component == bind9.18 From 3be1c767e4a5124d42c230bc2cb37c408474ff47 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 14:14:37 +0200 Subject: [PATCH 064/165] trying more mem --- plans/bind/others.fmf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plans/bind/others.fmf b/plans/bind/others.fmf index ca8c0f1..33345d6 100644 --- a/plans/bind/others.fmf +++ b/plans/bind/others.fmf @@ -4,6 +4,9 @@ how: fmf filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' url: "https://src.fedoraproject.org/tests/bind.git" + provision: + hardware: + memory: ">= 2 GB" execute: how: tmt From ede97e9f593f41bf66604fcf133f5fb0a96afadc Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 14:31:52 +0200 Subject: [PATCH 065/165] trying 4gb mem --- plans/bind/others.fmf | 2 +- plans/others.fmf | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plans/bind/others.fmf b/plans/bind/others.fmf index 33345d6..201b6e9 100644 --- a/plans/bind/others.fmf +++ b/plans/bind/others.fmf @@ -6,7 +6,7 @@ url: "https://src.fedoraproject.org/tests/bind.git" provision: hardware: - memory: ">= 2 GB" + memory: ">= 4 GB" execute: how: tmt diff --git a/plans/others.fmf b/plans/others.fmf index ca8c0f1..201b6e9 100644 --- a/plans/others.fmf +++ b/plans/others.fmf @@ -4,6 +4,9 @@ how: fmf filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' url: "https://src.fedoraproject.org/tests/bind.git" + provision: + hardware: + memory: ">= 4 GB" execute: how: tmt From e52e0365f09bd476886645a8e2ad319611a754da Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 14:36:42 +0200 Subject: [PATCH 066/165] tag fixed --- plans/bind/ipa.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plans/bind/ipa.fmf b/plans/bind/ipa.fmf index 75e6330..0053bf8 100644 --- a/plans/bind/ipa.fmf +++ b/plans/bind/ipa.fmf @@ -2,7 +2,7 @@ summary: IPA test with more mem discover: how: fmf - filter: 'ipaMoreMem' + filter: 'tag: ipaMoreMem' url: "https://src.fedoraproject.org/tests/bind.git" provision: hardware: From 6622fb60d4cb272dff60c2ffbd5dfadf442b672f Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 14:39:32 +0200 Subject: [PATCH 067/165] tag fixed + 4gb --- plans/bind/ipa.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plans/bind/ipa.fmf b/plans/bind/ipa.fmf index 0053bf8..7a32b3e 100644 --- a/plans/bind/ipa.fmf +++ b/plans/bind/ipa.fmf @@ -6,6 +6,6 @@ url: "https://src.fedoraproject.org/tests/bind.git" provision: hardware: - memory: ">= 2 GB" + memory: ">= 4 GB" execute: how: tmt From 71c7ca7ec3bd5651dd28dc974131158e3b567a64 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 16:10:53 +0200 Subject: [PATCH 068/165] upload log --- Smoke/IpaInstallAndStart/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 1514cef..570cd3d 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -106,6 +106,7 @@ rlJournalStart rlPhaseEnd rlPhaseStartCleanup + rlFileSubmit /var/log/ipaserver-install.log ipa-server-install --uninstall --unattended killall bind systemctl daemon-reload From 831154d1710577f5ed5e798df3b38eb84ba0b3da Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 16:12:53 +0200 Subject: [PATCH 069/165] more mem --- plans/bind/ipa.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plans/bind/ipa.fmf b/plans/bind/ipa.fmf index 7a32b3e..9779c9f 100644 --- a/plans/bind/ipa.fmf +++ b/plans/bind/ipa.fmf @@ -6,6 +6,6 @@ url: "https://src.fedoraproject.org/tests/bind.git" provision: hardware: - memory: ">= 4 GB" + memory: ">= 6 GB" execute: how: tmt From 876a63d31143ab1b3f005ffcae2814b24826b76b Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 16:14:23 +0200 Subject: [PATCH 070/165] debug log --- Smoke/IpaInstallAndStart/test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 570cd3d..1c905d2 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -107,6 +107,9 @@ rlJournalStart rlPhaseStartCleanup rlFileSubmit /var/log/ipaserver-install.log + grep LAST1000_ipaserver-install.log + tail -n1000 /var/log/ipaserver-install.log + grep _______________end ipa-server-install --uninstall --unattended killall bind systemctl daemon-reload From eaf728340037a8807493b5390694e7c533ec9a42 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 17:28:11 +0200 Subject: [PATCH 071/165] hostname needs fqdn --- Smoke/IpaInstallAndStart/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 1c905d2..b794d80 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -31,7 +31,7 @@ prepareIpaServer() fi rlRun "dnf -y install freeipa-server-dns" - HOSTNAME=`hostname` + HOSTNAME=`hostname --all-fqdns|tail -n1` if echo $HOSTNAME | grep '\.' then rlLog "Using full hostname $HOSTNAME" From bbe4f18bc41035b6f4f2c764b28d755f0e03c739 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 19:11:58 +0200 Subject: [PATCH 072/165] last hostname --- Smoke/IpaInstallAndStart/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index b794d80..6cd2bf9 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -31,7 +31,7 @@ prepareIpaServer() fi rlRun "dnf -y install freeipa-server-dns" - HOSTNAME=`hostname --all-fqdns|tail -n1` + HOSTNAME=`hostname --all-fqdns | awk '{print $NF}'` if echo $HOSTNAME | grep '\.' then rlLog "Using full hostname $HOSTNAME" From 4dc3cf4ad5366c1f0acbce61931db5cdee406b6a Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 19:26:53 +0200 Subject: [PATCH 073/165] last hostname --- Smoke/IpaInstallAndStart/test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 6cd2bf9..87904e1 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -31,7 +31,11 @@ prepareIpaServer() fi rlRun "dnf -y install freeipa-server-dns" - HOSTNAME=`hostname --all-fqdns | awk '{print $NF}'` + ORIG_HOSTNAME=${HOSTNAME} +# there is longer name at AWS, more than 64char + hostnamectl set-hostname ipa.ipa + HOSTNAME=`hostname|tail -n1` +# not needed after change ^ if echo $HOSTNAME | grep '\.' then rlLog "Using full hostname $HOSTNAME" From 50de894b918f3cda36c3b5c8a1df1788917d367d Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 2 Sep 2024 19:58:38 +0200 Subject: [PATCH 074/165] edit hosts, debug --- Smoke/IpaInstallAndStart/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 87904e1..2994e8b 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -34,6 +34,7 @@ prepareIpaServer() ORIG_HOSTNAME=${HOSTNAME} # there is longer name at AWS, more than 64char hostnamectl set-hostname ipa.ipa + echo '127.0.0.1 ipa.ipa' >> /etc/hosts HOSTNAME=`hostname|tail -n1` # not needed after change ^ if echo $HOSTNAME | grep '\.' From 79139926a35157b9eeae0fb54957063ccfb42921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 2 Aug 2024 23:05:50 +0200 Subject: [PATCH 075/165] Changes to upstream test suite for 9.18 Make working test suite again for rawhide builds. Allow writing into sourcedir of bin/tests/system also, because out of tree builds needs that. They execute tests in source directory instead of build copy, because test as directories are not recognized in build directory well. That makes every part run in source directory instead. --- .../Run-internal-BIND-test-suite/runtest.sh | 43 ++++++++++++++++--- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh index 7277646..01bed2b 100755 --- a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh +++ b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh @@ -40,6 +40,7 @@ : ${PACKAGE:=bind} USER="user$RANDOM" CORES=1 +: ${WITHOUT:=--without DOC --without EXPORT_LIBS} rlJournalStart rlPhaseStartSetup @@ -144,7 +145,10 @@ rlJournalStart fi if dnf builddep --help >/dev/null; then - rlRun "dnf -y builddep --nobest *.spec --enablerepo=\* --skip-unavailable" + SKIP='' + #rhel81 doesnt now --skip-unavailable option + dnf builddep --skip-unavailable --help 2>/dev/null && SKIP="--skip-unavailable" + rlRun "dnf -y builddep --nobest *.spec --enablerepo=\* $SKIP" elif which yum-builddep; then rlRun "yum-builddep -y *.spec" else @@ -152,24 +156,32 @@ rlJournalStart fi #DEBUG smtg - rpm -q softhsm || yum install softhsm -y --enablerepo=\* - rpm -q kyua || yum install kyua -y --enablerepo=\* - rpm -q perl-IO-Socket-INET6 || yum install -y 'perl(IO::Socket::INET6)' --enablerepo=\* + rlRun "rpm -q softhsm || yum install softhsm -y --enablerepo=\*" 0-255 + rlRun "rpm -q perl-IO-Socket-INET6 || yum install -y 'perl(IO::Socket::INET6)' --enablerepo=\*" 0-255 # stop bind if it is running service named stop rlPhaseEnd rlPhaseStartTest - if [ "$REUSE_BUILD" = y ] && ls -1 "$TOPDIR/BUILD"/bind* > /dev/null + rlRun "rpmbuild -bc $WITHOUT --short-circuit --define '__spec_build_pre echo RPM_BUILD_DIR=%{_builddir}; echo RPM_NAME=%{name}; echo RPM_VER=%{version}; echo RPM_REL=%{release}; exit 0' *.spec > $TMPDIR/build.env" 0 "Obtain some build variables" + rlRun "eval $(grep '^\w\+=' $TMPDIR/build.env)" + if [ -z "$RPM_BUILD_DIR" ]; then + RPM_BUILD_DIR=$(rpm -E %_builddir) + fi + if [ -z "$RPM_BUILD_DIR" ]; then + RPM_BUILD_DIR="$TOPDIR/BUILD" + fi + + if [ "$REUSE_BUILD" = y ] && ls -1 "$RPM_BUILD_DIR"/bind* > /dev/null then rlLog "Skipping $PACKAGE build" else # rebuild from source - rlRun "rpmbuild -ba --noclean *.spec &> $TMPDIR/build.txt" 0 "Building $PACKAGE" + rlRun "rpmbuild -bc $WITHOUT --noclean *.spec &> $TMPDIR/build.txt" 0 "Building bind" fi # the test - rlRun "cd $TOPDIR/BUILD/bind*" + rlRun "cd $RPM_BUILD_DIR/bind*" rlLogInfo "Test takes place in `pwd`" @@ -184,6 +196,9 @@ rlJournalStart if [ -d build ]; then BUILD=build + # In case tests are executed in srcdir, put conf.sh there also + # Happens with 9.18 + rlRun "cp -p $BUILD/bin/tests/system/conf.sh bin/tests/system" else BUILD=. fi @@ -198,8 +213,13 @@ rlJournalStart # required by idna test export LC_ALL=en_US.UTF-8 + # bin/tests/system receives logs by mistake, but allow it for now. + rlRun "chgrp -R $USER $BUILD bin/tests/system/" + rlRun "chmod g+rw -R $BUILD bin/tests/system/" rlRun "pushd $BUILD" + rlRun "ls -l ./bin/tests/system/ifconfig.sh" rlRun "./bin/tests/system/ifconfig.sh up" 0 "Setup fake network interfaces." + rlRun "chown -R $USER:$USER bin/tests/system/" # keep separate results on 9.11+ rlRun "sed -e 's/testsummary.sh/& -n/' -i bin/tests/system/Makefile" 0 "Modify to keep results" @@ -211,12 +231,19 @@ rlJournalStart ###### remove later (today 2021 Aug) sed -ie 's/set -eu/set -e/' bin/tests/system/cds/setup.sh + rlRun "chmod a+x bin/tests/system/*.sh" 0 "Ensure all test shell scripts are executable" + UMASK_ORIG=$(umask) + rlRun "umask 0002" + + [ "$DEBUG" = y ] && PS1="pretest-debug $PS1" bash -i + # Try to fix tssgsig failures on some machines, do not use system kerberos configuration export KRB5_CONFIG=/dev/null chmod a+rw -R /root #running as a USER RHEL9HACK="sudo -u $USER" rlRun "${RHEL9HACK} make ${MAKE_TEST:-test -j$CORES} &> $TMPDIR/test.txt" 0-255 "Perform the test, --init-task=/distribution/install/rhel-buildroot is needed" export -n KRB5_CONFIG + rlRun "umask $UMASK_ORIG" 0 "Return original umask" # This would catch just errors on 9.11+ if [ -f bin/tests/system/testsummary.sh ]; then @@ -232,6 +259,8 @@ rlJournalStart rlRun "tar czf $TMPDIR/failed-artifacts.tar.gz bin/tests/system" 0 "Archiving all system tests" fi + + [ "$DEBUG" = y ] && PS1="posttest-debug $PS1" bash -i rlRun "./bin/tests/system/ifconfig.sh down" 0 "Remove fake network interfaces." rlRun "popd" From 678901e01041bed1f5df216c884007b9f51222fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 4 Sep 2024 20:01:53 +0200 Subject: [PATCH 076/165] Require pytest, do not require databases on Fedora Database were used by bind-sdb only, which is not built on Fedora anymore. There are still some bind-dlz-* plugins, but even Postgresql is not used anymore. --- Sanity/named/Run-internal-BIND-test-suite/main.fmf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Sanity/named/Run-internal-BIND-test-suite/main.fmf b/Sanity/named/Run-internal-BIND-test-suite/main.fmf index 56e9c97..0f38d1b 100644 --- a/Sanity/named/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/named/Run-internal-BIND-test-suite/main.fmf @@ -3,7 +3,6 @@ description: | Bug summary: Run internal BIND test suite Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=642970 - contact: Petr Sklenar test: ./runtest.sh framework: beakerlib @@ -22,7 +21,6 @@ recommend: - libidn2-devel - libxml2-devel - openldap-devel - - postgresql-devel - sqlite-devel - krb5-devel - net-tools @@ -48,9 +46,17 @@ adjust+: - kyua when: distro < fedora-37 or distro <= rhel-9 or distro <= centos-9 because: only bind <=9.16 uses kyua for unit tests + - recommend+: + - postgresql-devel + when: component == bind and distro < fedora-33 or distro < rhel-9 or distro < centos-9 + because: only bind-sdb in bind <=9.11 needs those databases - recommend+: - libidn-devel when: distro < rhel-8 or distro < centos-8 + - recommend+: + - python3-pytest + when: distro >= fedora-39 or distro >= rhel-9 or distro >= centos-9 + because: bind 9.18+ uses it to run tests duration: 14h enabled: true tag: From c43a4c844a1ec5a79aded5d22daabf5532d37ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 4 Sep 2024 22:41:13 +0200 Subject: [PATCH 077/165] More changes to upstream test suite Use smarter way to enable repositories present. List disabled repositories and enable those we need. Enable _with_SYSTEMTEST when installing build dependencies. Should help with installing correct dependencies for each build directly from the package spec. --- .../Run-internal-BIND-test-suite/Makefile | 1 + .../Run-internal-BIND-test-suite/main.fmf | 5 +-- .../Run-internal-BIND-test-suite/runtest.sh | 31 ++++++++++++------- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/Sanity/named/Run-internal-BIND-test-suite/Makefile b/Sanity/named/Run-internal-BIND-test-suite/Makefile index 4c84b47..ef0d6e4 100644 --- a/Sanity/named/Run-internal-BIND-test-suite/Makefile +++ b/Sanity/named/Run-internal-BIND-test-suite/Makefile @@ -62,6 +62,7 @@ $(METADATA): Makefile @echo "Requires: openssl-devel libtool autoconf" >> $(METADATA) @echo "Requires: perl perl(Net::DNS) perl(Net::DNS::Nameserver) perl(Time::HiRes)" >> $(METADATA) @echo "Requires: perl(IO::Socket::INET6)" >> $(METADATA) + @echo "Requires: python3-pytest" >> $(METADATA) @echo "Requires: libcap-devel libidn-devel libxml2-devel kyua" >> $(METADATA) @echo "Requires: openldap-devel postgresql-devel" >> $(METADATA) @echo "Requires: sqlite-devel krb5-devel net-tools iproute" >> $(METADATA) diff --git a/Sanity/named/Run-internal-BIND-test-suite/main.fmf b/Sanity/named/Run-internal-BIND-test-suite/main.fmf index 0f38d1b..0e259fa 100644 --- a/Sanity/named/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/named/Run-internal-BIND-test-suite/main.fmf @@ -30,6 +30,7 @@ recommend: - rng-tools - gcc-c++ - python3-dns + - python3-pytest adjust+: - enabled: false when: distro == rhel @@ -53,10 +54,6 @@ adjust+: - recommend+: - libidn-devel when: distro < rhel-8 or distro < centos-8 - - recommend+: - - python3-pytest - when: distro >= fedora-39 or distro >= rhel-9 or distro >= centos-9 - because: bind 9.18+ uses it to run tests duration: 14h enabled: true tag: diff --git a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh index 01bed2b..f434b64 100755 --- a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh +++ b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh @@ -49,7 +49,7 @@ rlJournalStart rpm -q perl-Net-DNS-Nameserver || yum install -y perl-Net-DNS-Nameserver rlLog "`rpm -q perl-Net-DNS-Nameserver`" # package assertions - rlAssertRpm $PACKAGE + rlAssertRpm $PACKAGE rlAssertRpm rpm-build rlRun "rpm -q $PACKAGE-devel || yum install -y $PACKAGE-devel $PACKAGE-utils" rlServiceStart "rngd" @@ -93,14 +93,14 @@ rlJournalStart rlRun "TMPDIR=\`mktemp -d\`" 0 "Creating tmp directory" rlRun "pushd $TMPDIR" - if rlIsRHEL 8 && dnf config-manager --help >/dev/null; then + if rlIsRHEL '>= 8' && dnf config-manager --help >/dev/null; then # Some build dependencies are not in repositories enabled # by default: libidn2-devel, softshm - dnf config-manager --set-enabled rhel-buildroot - dnf config-manager --set-enabled rhel-CRB - dnf config-manager --set-enabled beaker-CRB - dnf config-manager --set-enabled beaker-buildroot - #not checking return code: 1mt and beaker uses different names for repo + # 1mt and beaker uses different names for repo, find those present + for REPO in $(dnf -q repolist --disabled {rhel,beaker}-{buildroot,CRB} | awk '$1 != "repo" && $2 != "id" { print $1 }') + do + rlRun "dnf config-manager --set-enabled $REPO" + done fi # topdir @@ -148,9 +148,9 @@ rlJournalStart SKIP='' #rhel81 doesnt now --skip-unavailable option dnf builddep --skip-unavailable --help 2>/dev/null && SKIP="--skip-unavailable" - rlRun "dnf -y builddep --nobest *.spec --enablerepo=\* $SKIP" + rlRun "dnf -y builddep -D '_with_SYSTEMTEST 1' --nobest *.spec $SKIP" elif which yum-builddep; then - rlRun "yum-builddep -y *.spec" + rlRun "yum-builddep -y -D '_with_SYSTEMTEST 1' *.spec" else rlWarn "there is nor yum-utils neither dnf-utils for install dependencies, ENJOY!" fi @@ -171,8 +171,14 @@ rlJournalStart if [ -z "$RPM_BUILD_DIR" ]; then RPM_BUILD_DIR="$TOPDIR/BUILD" fi + if [ -n "$RPM_NAME" ] && [ -n "$RPM_VER" ]; then + BIND_BUILD="$RPM_BUILD_DIR/$RPM_NAME-$RPM_VER" + else + rlRun "rmdir $RPM_BUILD_DIR/bind*-SPECPARTS" 0-255 "Cleanup specparts" + BIND_BUILD="$(ls -l "$RPM_BUILD_DIR"/bind*)" + fi - if [ "$REUSE_BUILD" = y ] && ls -1 "$RPM_BUILD_DIR"/bind* > /dev/null + if [ "$REUSE_BUILD" = y ] && [ -d "$BIND_BUILD" ] > /dev/null then rlLog "Skipping $PACKAGE build" else @@ -181,7 +187,7 @@ rlJournalStart fi # the test - rlRun "cd $RPM_BUILD_DIR/bind*" + rlRun "cd $BIND_BUILD" rlLogInfo "Test takes place in `pwd`" @@ -248,6 +254,7 @@ rlJournalStart # This would catch just errors on 9.11+ if [ -f bin/tests/system/testsummary.sh ]; then FAILED_TESTS=`grep '^R:[a-z0-9_-][a-z0-9_-]*:FAIL' $TMPDIR/test.txt | cut -d':' -f2 | sort | xargs echo` + PASSED_TESTS=`grep '^R:[a-z0-9_-][a-z0-9_-]*:PASS' $TMPDIR/test.txt | cut -d':' -f2 | sort | xargs echo` if [ -n "$FAILED_TESTS" ]; then rlLog "Failed tests: $FAILED_TESTS" rlRun "tar czf $TMPDIR/failed-artifacts.tar.gz -C bin/tests/system $FAILED_TESTS" 0 "Archiving failed artifacts in tests" @@ -256,6 +263,7 @@ rlJournalStart fi else FAILED_TESTS=:any: + PASSED_TESTS=:any: rlRun "tar czf $TMPDIR/failed-artifacts.tar.gz bin/tests/system" 0 "Archiving all system tests" fi @@ -265,6 +273,7 @@ rlJournalStart rlRun "popd" rlRun "grep -C 10 FAIL $TMPDIR/test.txt" 0-255 "Quickly show the test error (if any)." + rlRun "grep PASS $TMPDIR/test.txt" 0 "Quickly show passed tests." #list of failures: rlRun "$FILTER $TMPDIR/test.txt" 0 "Showing unsuccessful tests" From 74161ae3cb6136f20cb7b4f636931e012ba1b9b7 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 12 Sep 2024 09:27:20 +0200 Subject: [PATCH 078/165] hostname back to origin --- Smoke/IpaInstallAndStart/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 2994e8b..4880bce 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -33,8 +33,8 @@ prepareIpaServer() rlRun "dnf -y install freeipa-server-dns" ORIG_HOSTNAME=${HOSTNAME} # there is longer name at AWS, more than 64char - hostnamectl set-hostname ipa.ipa - echo '127.0.0.1 ipa.ipa' >> /etc/hosts + #hostnamectl set-hostname ipa.ipa + #echo '127.0.0.1 ipa.ipa' >> /etc/hosts HOSTNAME=`hostname|tail -n1` # not needed after change ^ if echo $HOSTNAME | grep '\.' From f3404a3d76e366718bcbb57e9ca45ffafc32fb59 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 12 Sep 2024 11:38:55 +0200 Subject: [PATCH 079/165] hostname back to origin --- Smoke/IpaInstallAndStart/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 4880bce..5fd5305 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -55,7 +55,7 @@ prepareIpaServer() # getent hosts ${HOSTNAME} >> /etc/hosts echo "${IP4} ${HOSTNAME} ${ORIG_HOSTNAME}" >> /etc/hosts fi - rlRun "ipa-server-install -U --hostname ${HOSTNAME} -n ${DOMAIN} -r ${REALM} --setup-dns -p ${DM_SECRET} -a ${ADMIN_SECRET} --auto-forwarders" + rlRun "ipa-server-install -U -n ${DOMAIN} -r ${REALM} --setup-dns -p ${DM_SECRET} -a ${ADMIN_SECRET} --auto-forwarders" fi } From 8f4fd6301a8f3a9e05832f14fa15afad9c447a0e Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 19 Sep 2024 10:57:21 +0200 Subject: [PATCH 080/165] debug --- Smoke/IpaInstallAndStart/test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 5fd5305..1950f11 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -55,7 +55,7 @@ prepareIpaServer() # getent hosts ${HOSTNAME} >> /etc/hosts echo "${IP4} ${HOSTNAME} ${ORIG_HOSTNAME}" >> /etc/hosts fi - rlRun "ipa-server-install -U -n ${DOMAIN} -r ${REALM} --setup-dns -p ${DM_SECRET} -a ${ADMIN_SECRET} --auto-forwarders" + rlRun "ipa-server-install -U --hostname ${HOSTNAME} -n ${DOMAIN} -r ${REALM} --setup-dns -p ${DM_SECRET} -a ${ADMIN_SECRET} --auto-forwarders" fi } @@ -80,6 +80,9 @@ rlJournalStart rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "TestDir=`pwd`" 0 "Saving test directory" rlRun "pushd $TmpDir" + echo ===============MEMINFO=================================== + cat /proc/meminfo + echo ______________________________________________________________ rlPhaseEnd rlPhaseStartSetup "Prepare IPA" From cb6016a40ee0fb6b239183699a11ac54cb1d3afd Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 19 Sep 2024 13:31:58 +0200 Subject: [PATCH 081/165] add into tier2 --- Sanity/named/caching-forwarder-dnssec/main.fmf | 2 ++ Sanity/named/json-support/main.fmf | 2 ++ Sanity/named/named-checkzone/main.fmf | 1 + 3 files changed, 5 insertions(+) diff --git a/Sanity/named/caching-forwarder-dnssec/main.fmf b/Sanity/named/caching-forwarder-dnssec/main.fmf index 835fdbd..9df6dd9 100644 --- a/Sanity/named/caching-forwarder-dnssec/main.fmf +++ b/Sanity/named/caching-forwarder-dnssec/main.fmf @@ -1,4 +1,5 @@ summary: Configure bind as caching and validating forwarder +contact: Petr Sklenar test: ./test.sh framework: beakerlib description: | @@ -11,5 +12,6 @@ description: | recommend+: - sed - awk +tier: 2 extra-nitrate: TC#0617579 id: 3525bab3-7884-4252-b0ad-1688de267812 diff --git a/Sanity/named/json-support/main.fmf b/Sanity/named/json-support/main.fmf index 4cdc58a..8d6226c 100644 --- a/Sanity/named/json-support/main.fmf +++ b/Sanity/named/json-support/main.fmf @@ -4,11 +4,13 @@ description: | Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1899257 contact: - Petr Mensik + - Petr Sklenar test: ./runtest.sh framework: beakerlib recommend: - python3 duration: 5m +tier: 2 extra-summary: /CoreOS/bind/Sanity/json-support extra-task: /CoreOS/bind/Sanity/json-support extra-nitrate: TC#0617580 diff --git a/Sanity/named/named-checkzone/main.fmf b/Sanity/named/named-checkzone/main.fmf index 4e283c5..8c0f39e 100644 --- a/Sanity/named/named-checkzone/main.fmf +++ b/Sanity/named/named-checkzone/main.fmf @@ -2,6 +2,7 @@ summary: Sanity/named-checkzone description: '' contact: Petr Sklenar test: ./runtest.sh +tier: 2 framework: beakerlib duration: 5m enabled: true From 91930ed10ffb1976126318ec621c0f1ff799ba4d Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Fri, 20 Sep 2024 10:58:27 +0200 Subject: [PATCH 082/165] stop named --- Stub/master-and-stub-server-talks-a-bit/runtest.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Stub/master-and-stub-server-talks-a-bit/runtest.sh b/Stub/master-and-stub-server-talks-a-bit/runtest.sh index 5cefade..be08710 100755 --- a/Stub/master-and-stub-server-talks-a-bit/runtest.sh +++ b/Stub/master-and-stub-server-talks-a-bit/runtest.sh @@ -36,6 +36,8 @@ rlJournalStart dir='/tmp/bind-for-petr' rm -rf $dir mkdir -p $dir + killall named + systemctl named stop cp petr.god.zone $dir cp named.conf.MASTER $dir/named.conf.MASTER cp named.conf.STUB $dir/named.conf.STUB From 20d19a4f482d940957432f4115878d89fb20a19b Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Fri, 20 Sep 2024 11:17:23 +0200 Subject: [PATCH 083/165] stop named --- Stub/master-and-stub-server-talks-a-bit/runtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stub/master-and-stub-server-talks-a-bit/runtest.sh b/Stub/master-and-stub-server-talks-a-bit/runtest.sh index be08710..e4d11fd 100755 --- a/Stub/master-and-stub-server-talks-a-bit/runtest.sh +++ b/Stub/master-and-stub-server-talks-a-bit/runtest.sh @@ -37,7 +37,7 @@ rlJournalStart rm -rf $dir mkdir -p $dir killall named - systemctl named stop + systemctl stop named cp petr.god.zone $dir cp named.conf.MASTER $dir/named.conf.MASTER cp named.conf.STUB $dir/named.conf.STUB From 1c5b39e79e8c7825d32cd3e0cc6c3e6e839cfb9f Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Fri, 20 Sep 2024 11:20:18 +0200 Subject: [PATCH 084/165] stop named --- Smoke/IpaInstallAndStart/test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 1950f11..bce17ac 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -119,9 +119,12 @@ rlJournalStart tail -n1000 /var/log/ipaserver-install.log grep _______________end ipa-server-install --uninstall --unattended - killall bind + killall named systemctl daemon-reload rlServiceStop + systemctl stop named + pkill -9 named + killall -9 named rlRun "rm -f $rlRun_LOG" rlRun "popd" rlRun "hostname ${ORIG_HOSTNAME}" From a2a3b152b0dccd15f173e7bbfa05943368d25069 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 22 Oct 2024 08:39:44 +0200 Subject: [PATCH 085/165] plan only for aarch64 --- plans/testaarch65.fmf | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plans/testaarch65.fmf diff --git a/plans/testaarch65.fmf b/plans/testaarch65.fmf new file mode 100644 index 0000000..3576e75 --- /dev/null +++ b/plans/testaarch65.fmf @@ -0,0 +1,13 @@ +/archtest: + summary: Internal Tier1 tests + provision: + arch: aarch64 + discover: + how: fmf + filter: 'tier: 1' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt From d6553f1f7a6fcb2143c3cad7806991999ae57985 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 22 Oct 2024 10:16:33 +0200 Subject: [PATCH 086/165] plan only for aarch64 --- plans/testaarch65.fmf | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 plans/testaarch65.fmf diff --git a/plans/testaarch65.fmf b/plans/testaarch65.fmf deleted file mode 100644 index 3576e75..0000000 --- a/plans/testaarch65.fmf +++ /dev/null @@ -1,13 +0,0 @@ -/archtest: - summary: Internal Tier1 tests - provision: - arch: aarch64 - discover: - how: fmf - filter: 'tier: 1' - url: git://pkgs.devel.redhat.com/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt From 1b9c15240c0a80f65758d9c03cee85a12d1d1869 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 22 Oct 2024 10:16:53 +0200 Subject: [PATCH 087/165] plan only for aarch64 --- plans/testaarch64.fmf | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 plans/testaarch64.fmf diff --git a/plans/testaarch64.fmf b/plans/testaarch64.fmf new file mode 100644 index 0000000..5c04276 --- /dev/null +++ b/plans/testaarch64.fmf @@ -0,0 +1,12 @@ +/archtest: + summary: Internal Tier1 tests + discover: + how: fmf + filter: 'tier: 1' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + - when: arch != aarch64 + enabled: false + because: components exist only on aarch64 + execute: + how: tmt From 5e73f87c8aae9bec15ca52686f35d893e465f98e Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 16 Dec 2024 11:26:44 +0100 Subject: [PATCH 088/165] package variants added --- main.fmf | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/main.fmf b/main.fmf index 41e2fab..aab79c8 100644 --- a/main.fmf +++ b/main.fmf @@ -1,2 +1,27 @@ # QE owner contact: Petr Sklenar +adjust+: + - require+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - require+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next + - require+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 + - require+: + - bind9.18 + - bind9.18-utils + environment+: + PACKAGE: bind9.18 + when: component == bind9.18 From 9c580f45f8041e415defe266b1e2efdda77f5c76 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 16 Dec 2024 13:29:42 +0100 Subject: [PATCH 089/165] package variants added --- .../main.fmf | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Stub/master-and-stub-server-talks-a-bit/main.fmf b/Stub/master-and-stub-server-talks-a-bit/main.fmf index 50ce885..4e3ffde 100644 --- a/Stub/master-and-stub-server-talks-a-bit/main.fmf +++ b/Stub/master-and-stub-server-talks-a-bit/main.fmf @@ -20,24 +20,6 @@ adjust: - enabled: false when: arch == ppc64le continue: false - - require+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - require+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 extra-nitrate: TC#0518539 extra-summary: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit extra-task: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit From 816a9160a1f80ea63af9c0213688e82fa3e77f76 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 16 Dec 2024 13:47:08 +0100 Subject: [PATCH 090/165] bind9.16 added --- plans/bind9.16/others.fmf | 28 ++++++++++++++++++++++++++++ plans/bind9.16/tier1.fmf | 27 +++++++++++++++++++++++++++ plans/bind9.16/tier2-tier3.fmf | 27 +++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 plans/bind9.16/others.fmf create mode 100644 plans/bind9.16/tier1.fmf create mode 100644 plans/bind9.16/tier2-tier3.fmf diff --git a/plans/bind9.16/others.fmf b/plans/bind9.16/others.fmf new file mode 100644 index 0000000..a5a63ce --- /dev/null +++ b/plans/bind9.16/others.fmf @@ -0,0 +1,28 @@ +environment+: + PACKAGE: bind9.16 + +/public: + summary: Public other tests + discover: + how: fmf + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library' + url: "https://src.fedoraproject.org/tests/bind.git" + execute: + how: tmt + context: + component: bind9.16 + + +/internal: + summary: Internal other tests + discover: + how: fmf + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt + context: + component: bind9.16 diff --git a/plans/bind9.16/tier1.fmf b/plans/bind9.16/tier1.fmf new file mode 100644 index 0000000..1a94301 --- /dev/null +++ b/plans/bind9.16/tier1.fmf @@ -0,0 +1,27 @@ +environment+: + PACKAGE: bind9.16 + +/public: + summary: Public Tier1 tests + discover: + how: fmf + filter: 'tier: 1 & tag: -library' + url: "https://src.fedoraproject.org/tests/bind.git" + execute: + how: tmt + context: + component: bind9.16 + +/internal: + summary: Internal Tier1 tests + discover: + how: fmf + filter: 'tier: 1 & tag: -library' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt + context: + component: bind9.16 diff --git a/plans/bind9.16/tier2-tier3.fmf b/plans/bind9.16/tier2-tier3.fmf new file mode 100644 index 0000000..ea64340 --- /dev/null +++ b/plans/bind9.16/tier2-tier3.fmf @@ -0,0 +1,27 @@ +environment+: + PACKAGE: bind9.16 + +/public: + summary: Public Tier2 and Tier3 tests + discover: + how: fmf + filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' + url: "https://src.fedoraproject.org/tests/bind.git" + execute: + how: tmt + context: + component: bind9.16 + +/internal: + summary: Internal Tier2 and Tier3 tests + discover: + how: fmf + filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' + url: git://pkgs.devel.redhat.com/tests/bind + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt + context: + component: bind9.16 From 3b639f04be82683146966a823a3c2ecbacd2e3ad Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 16 Dec 2024 16:36:02 +0100 Subject: [PATCH 091/165] adjust --- Stub/main.fmf | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Stub/main.fmf diff --git a/Stub/main.fmf b/Stub/main.fmf new file mode 100644 index 0000000..ee5c028 --- /dev/null +++ b/Stub/main.fmf @@ -0,0 +1,25 @@ +adjust+: + - require+: + - bind + - bind-utils + environment+: + PACKAGE: bind + when: component is not defined or component == bind + - require+: + - bind9-next + - bind9-next-utils + environment+: + PACKAGE: bind9-next + when: component == bind9-next + - require+: + - bind9.16 + - bind9.16-utils + environment+: + PACKAGE: bind9.16 + when: component == bind9.16 + - require+: + - bind9.18 + - bind9.18-utils + environment+: + PACKAGE: bind9.18 + when: component == bind9.18 From 067232634a91964339d778b12fae5e02e3f15a43 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 3 Feb 2025 19:05:34 +0100 Subject: [PATCH 092/165] debug log added --- Sanity/named/caching-forwarder-dnssec/test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sanity/named/caching-forwarder-dnssec/test.sh b/Sanity/named/caching-forwarder-dnssec/test.sh index a96ef44..e0a5aca 100755 --- a/Sanity/named/caching-forwarder-dnssec/test.sh +++ b/Sanity/named/caching-forwarder-dnssec/test.sh @@ -245,7 +245,9 @@ for I in {1..3}; do KEYID=$(buDigKskId @localhost .) rlAssertNotEquals "Check keyId is not empty." "$KEYID" "" - rlAssertGreater "Check keyId is non-zero" "$KEYID" 0 + rlAssertGreater "Check $KEYID is non-zero" "$KEYID" 0 + TEST1=$(dig +multi $KEYID DNSKEY) + rlLog "`echo dig_for_dnskey;echo $TEST1`" rlRun "rndc secroots" rlRun "grep \"^./RSASHA256/$KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" [ "$HAS_MANAGED_KEYS" = y ] && rlRun "rndc managed-keys status" From cad06f54038bba7fc44ad287e37db50252a6bb1c Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 4 Feb 2025 15:58:42 +0100 Subject: [PATCH 093/165] test has more debu log and sleep after restart --- Sanity/named/caching-forwarder-dnssec/test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sanity/named/caching-forwarder-dnssec/test.sh b/Sanity/named/caching-forwarder-dnssec/test.sh index e0a5aca..d724749 100755 --- a/Sanity/named/caching-forwarder-dnssec/test.sh +++ b/Sanity/named/caching-forwarder-dnssec/test.sh @@ -208,7 +208,7 @@ buDigSuccessInsecure() # Extract KSK key id from dig buDigKskId() { - dig +nocrypto +short -t dnskey "$@" | awk '$1 == 257 { sub("]", "", $7); print $7 }' + dig +nocrypto +short -t dnskey "$@"| tail -n1 | awk '$1 == 257 { sub("]", "", $7); print $7 }' } @@ -240,6 +240,7 @@ rlJournalStart for I in {1..3}; do rlPhaseStartTest "Basic test #$I" rlRun "rlServiceStart named" + sleep 5 # this test works randomly buDigSuccessSecure @localhost . DNSKEY buDigSuccessSecure @localhost @@ -248,7 +249,7 @@ for I in {1..3}; do rlAssertGreater "Check $KEYID is non-zero" "$KEYID" 0 TEST1=$(dig +multi $KEYID DNSKEY) rlLog "`echo dig_for_dnskey;echo $TEST1`" - rlRun "rndc secroots" + rlRun "rndc secroots" rlRun "grep \"^./RSASHA256/$KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" [ "$HAS_MANAGED_KEYS" = y ] && rlRun "rndc managed-keys status" rlPhaseEnd From 73d55d35b23c4ebef8b7084217e4c5b201f0eb73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 7 Feb 2025 14:53:53 +0100 Subject: [PATCH 094/165] Use up to 8 cores when testing to make it faster Allow changing it explicitly by CORES and MAXCORES variables. MAXCORES=0 disables upper limit. --- Sanity/named/Run-internal-BIND-test-suite/runtest.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh index f434b64..54c6b2e 100755 --- a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh +++ b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh @@ -39,7 +39,10 @@ : ${PACKAGE:=bind} USER="user$RANDOM" -CORES=1 +: ${CORES:=auto} +# Limit maximal number of cores used at the same time. +# May cause more failures. +: ${MAXCORES:=8} : ${WITHOUT:=--without DOC --without EXPORT_LIBS} rlJournalStart @@ -80,8 +83,10 @@ rlJournalStart KNOWNERROR=`readlink -f knownerror` fi - if [ -z "$CORES" ]; then - rlRun "CORES=$(grep '^processor\s*:' /proc/cpuinfo | wc -l)" 0 "Count available CPU cores" + if [ -z "$CORES" ] || [ "$CORES" = "auto" ]; then + rlRun "CORES=$(lscpu -p | grep -v '^\s*#' | wc -l)" 0 "Get available CPU cores" + [[ CORES -lt 1 ]] && CORES=1 + [[ MAXCORES -gt 0 ]] && [[ CORES -gt MAXCORES ]] && rlRun "CORES=$MAXCORES" 0 "Limit max used cores" fi if [ -n "$QUICK" ]; then From e55883b04148dd249b312a20b16f983b7a31dc4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 7 Feb 2025 15:00:53 +0100 Subject: [PATCH 095/165] Use pipefail bash feature to show progress Use tee to display current progress, while also keeping error status from the pipeline to rlRun. --- Sanity/named/Run-internal-BIND-test-suite/runtest.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh index 54c6b2e..fc784bc 100755 --- a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh +++ b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh @@ -252,7 +252,9 @@ rlJournalStart export KRB5_CONFIG=/dev/null chmod a+rw -R /root #running as a USER RHEL9HACK="sudo -u $USER" - rlRun "${RHEL9HACK} make ${MAKE_TEST:-test -j$CORES} &> $TMPDIR/test.txt" 0-255 "Perform the test, --init-task=/distribution/install/rhel-buildroot is needed" + set -o pipefail + rlRun "${RHEL9HACK} make ${MAKE_TEST:-test -j$CORES} |& tee $TMPDIR/test.txt" 0-255 "Perform the test, --init-task=/distribution/install/rhel-buildroot is needed" + set +o pipefail export -n KRB5_CONFIG rlRun "umask $UMASK_ORIG" 0 "Return original umask" From 395fa75647aebd02555b924a2ab3251aaabea04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Tue, 11 Feb 2025 16:26:27 +0100 Subject: [PATCH 096/165] Report non-DNSSEC infrastructure problem with details Provide version of DNS server used and the platform, on which we are running. --- Sanity/utils/delv-smoke-test/runtest.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sanity/utils/delv-smoke-test/runtest.sh b/Sanity/utils/delv-smoke-test/runtest.sh index fd637f4..a4706c7 100755 --- a/Sanity/utils/delv-smoke-test/runtest.sh +++ b/Sanity/utils/delv-smoke-test/runtest.sh @@ -38,6 +38,7 @@ rlJournalStart rlRun "REAL_RESOLV=$(realpath /etc/resolv.conf)" rlRun "BACKUP_RESOLV=$(mktemp /etc/resolv-XXXXXX.conf)" rlRun "rm -f $BACKUP_RESOLV" + rlRun -l "hostnamectl" 0-255 "Record type of used machine" if [ "$REAL_RESOLV" = /run/systemd/resolve/stub-resolv.conf ]; then rlWarning "systemd-resolved stub detected, temporary switching..." rlRun "mv /etc/resolv.conf $BACKUP_RESOLV" @@ -56,6 +57,7 @@ rlJournalStart DNSSEC=yes else rlLogWarning "nameserver $NS does not support DNSSEC!" + rlRun -l "dig +short @$NS -t txt -c ch -q version.bind" 0 "Query version of server $NS" rlRun "sed -e '/$NS/ d' -i /etc/resolv.conf" fi done From 2a1a95c6fefdb4be775c495fca0efb0bdb200f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Tue, 11 Feb 2025 18:31:46 +0100 Subject: [PATCH 097/165] Check also signatures are only shown when DNSSEC is requested --- Sanity/utils/delv-smoke-test/runtest.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Sanity/utils/delv-smoke-test/runtest.sh b/Sanity/utils/delv-smoke-test/runtest.sh index a4706c7..4ad4c47 100755 --- a/Sanity/utils/delv-smoke-test/runtest.sh +++ b/Sanity/utils/delv-smoke-test/runtest.sh @@ -60,6 +60,7 @@ rlJournalStart rlRun -l "dig +short @$NS -t txt -c ch -q version.bind" 0 "Query version of server $NS" rlRun "sed -e '/$NS/ d' -i /etc/resolv.conf" fi + rlRun -c "dig @$NS | grep -w RRSIG" 1 "Check signatures are not present always on $NS" done if [ -z "$DNSSEC" ]; then DNSSEC=no From 3efef0404f99f3e625f7f1ab92ffaf28df6a6024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 14 Feb 2025 22:40:23 +0100 Subject: [PATCH 098/165] Add extra know to override default crypto-policy On RHEL9 tests often fail just because SHA1 cannot be used, but is expected there. Try to enable SHA1 when running test suite on RHEL9 automatically, allow environment to be used for other distributions. Also do not chown complete root directory, as it break access via SSH keys. Instead just allow anonymous user to enter $HOME, but not read contents. Have ability to read just to build directory, that should be enough. --- .../Run-internal-BIND-test-suite/main.fmf | 1 + .../Run-internal-BIND-test-suite/runtest.sh | 28 ++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/Sanity/named/Run-internal-BIND-test-suite/main.fmf b/Sanity/named/Run-internal-BIND-test-suite/main.fmf index 0e259fa..0e60225 100644 --- a/Sanity/named/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/named/Run-internal-BIND-test-suite/main.fmf @@ -31,6 +31,7 @@ recommend: - gcc-c++ - python3-dns - python3-pytest + - opensc adjust+: - enabled: false when: distro == rhel diff --git a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh index fc784bc..146c0aa 100755 --- a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh +++ b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh @@ -44,6 +44,8 @@ USER="user$RANDOM" # May cause more failures. : ${MAXCORES:=8} : ${WITHOUT:=--without DOC --without EXPORT_LIBS} +# Override default crypto-policy +: ${CRYPTO_POLICY:=} rlJournalStart rlPhaseStartSetup @@ -107,6 +109,9 @@ rlJournalStart rlRun "dnf config-manager --set-enabled $REPO" done fi + if rlIsRHEL 9; then + CRYPTO_POLICY=DEFAULT:SHA1 + fi # topdir if rlIsRHEL 3 || rlIsRHEL 4 || rlIsRHEL 5; then @@ -165,6 +170,16 @@ rlJournalStart rlRun "rpm -q perl-IO-Socket-INET6 || yum install -y 'perl(IO::Socket::INET6)' --enablerepo=\*" 0-255 # stop bind if it is running service named stop + + if [ -n "$CRYPTO_POLICY" ]; then + rlRun "BACKUP_CRYPTO_POLICY=$(update-crypto-policies --show)" 0 "Store original crypto policy" + rlRun "update-crypto-policies --set $CRYPTO_POLICY" 0 "Change crypto policy" + fi + + SOFTHSM2_MODULE="$(rpm -E '%{_libdir}/pkcs11/libsofthsm2.so')" + if [ -x "$SOFTHSM2_MODULE" ]; then + export SOFTHSM2_MODULE + fi rlPhaseEnd rlPhaseStartTest @@ -250,7 +265,8 @@ rlJournalStart # Try to fix tssgsig failures on some machines, do not use system kerberos configuration export KRB5_CONFIG=/dev/null - chmod a+rw -R /root #running as a USER + chmod a+x "$HOME" #running as a USER + chmod a+rX -R $(rpm -E %_builddir) RHEL9HACK="sudo -u $USER" set -o pipefail rlRun "${RHEL9HACK} make ${MAKE_TEST:-test -j$CORES} |& tee $TMPDIR/test.txt" 0-255 "Perform the test, --init-task=/distribution/install/rhel-buildroot is needed" @@ -262,6 +278,13 @@ rlJournalStart if [ -f bin/tests/system/testsummary.sh ]; then FAILED_TESTS=`grep '^R:[a-z0-9_-][a-z0-9_-]*:FAIL' $TMPDIR/test.txt | cut -d':' -f2 | sort | xargs echo` PASSED_TESTS=`grep '^R:[a-z0-9_-][a-z0-9_-]*:PASS' $TMPDIR/test.txt | cut -d':' -f2 | sort | xargs echo` + + # 9.18.29+ uses pytest to run some tests and generates failed output to different place + pushd bin/tests/system + for TMPDIR in *_tmp_*/; do + FAILED_TESTS+=" $TMPDIR" + done + popd if [ -n "$FAILED_TESTS" ]; then rlLog "Failed tests: $FAILED_TESTS" rlRun "tar czf $TMPDIR/failed-artifacts.tar.gz -C bin/tests/system $FAILED_TESTS" 0 "Archiving failed artifacts in tests" @@ -321,6 +344,9 @@ rlJournalStart if [ -r "$TMPDIR/failed-artifacts.tar.gz" ]; then rlFileSubmit "$TMPDIR/failed-artifacts.tar.gz" failed-artifacts.tar.gz fi + if [ -n "$CRYPTO_POLICY" ]; then + rlRun "update-crypto-policies --set $BACKUP_CRYPTO_POLICY" 0 "Restore original crypto policy" + fi rlRun "popd" rlServiceRestore "rngd" rlRun "rm -r $TMPDIR" 0 "Removing tmp directory" From 2acad4c11b45d3b50c1175a0cc2b00461be314d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 14 Feb 2025 23:38:50 +0100 Subject: [PATCH 099/165] Do not add a new user, use nobody --- .../named/Run-internal-BIND-test-suite/runtest.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh index 146c0aa..ffbdf16 100755 --- a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh +++ b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh @@ -38,7 +38,8 @@ . /usr/share/beakerlib/beakerlib.sh || exit 1 : ${PACKAGE:=bind} -USER="user$RANDOM" +#USER="user$RANDOM" +USER="nobody" : ${CORES:=auto} # Limit maximal number of cores used at the same time. # May cause more failures. @@ -49,7 +50,7 @@ USER="user$RANDOM" rlJournalStart rlPhaseStartSetup - rlRun "useradd $USER" + #rlRun "useradd $USER" rlLog "Available entropy: $(cat /proc/sys/kernel/random/entropy_avail)" rpm -q perl-Net-DNS-Nameserver || yum install -y perl-Net-DNS-Nameserver rlLog "`rpm -q perl-Net-DNS-Nameserver`" @@ -265,8 +266,6 @@ rlJournalStart # Try to fix tssgsig failures on some machines, do not use system kerberos configuration export KRB5_CONFIG=/dev/null - chmod a+x "$HOME" #running as a USER - chmod a+rX -R $(rpm -E %_builddir) RHEL9HACK="sudo -u $USER" set -o pipefail rlRun "${RHEL9HACK} make ${MAKE_TEST:-test -j$CORES} |& tee $TMPDIR/test.txt" 0-255 "Perform the test, --init-task=/distribution/install/rhel-buildroot is needed" @@ -281,8 +280,8 @@ rlJournalStart # 9.18.29+ uses pytest to run some tests and generates failed output to different place pushd bin/tests/system - for TMPDIR in *_tmp_*/; do - FAILED_TESTS+=" $TMPDIR" + for ONETMPDIR in *_tmp_*/; do + FAILED_TESTS+=" $ONETMPDIR" done popd if [ -n "$FAILED_TESTS" ]; then @@ -351,6 +350,7 @@ rlJournalStart rlServiceRestore "rngd" rlRun "rm -r $TMPDIR" 0 "Removing tmp directory" rlRun "rm -rf $FOUNDERROR" - rlRun "userdel -f -r $USER" + rlLog "Build contents: $BIND_BUILD" + #rlRun "userdel -f -r $USER" rlPhaseEnd rlJournalEnd From 1c263167d84091cdb5e6aae836d3d67ee6272aa6 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 18 Feb 2025 11:48:30 +0100 Subject: [PATCH 100/165] debug log --- Smoke/IpaInstallAndStart/test.sh | 27 +++++++++++---------------- plans/bind/ipa.fmf | 4 +++- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index bce17ac..bfbf566 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -20,7 +20,7 @@ REALM=IPA.TEST fetch_local_ipv4() { - IP4=`ip address | awk '$1 == "inet" { print $2 }' | cut -d/ -f1 | grep -v '^127\.'` + IP4=`ip address | awk '$1 == "inet" { print $2 }' | cut -d/ -f1 | grep -v '^127\.'| tail -n1` } prepareIpaServer() @@ -33,21 +33,12 @@ prepareIpaServer() rlRun "dnf -y install freeipa-server-dns" ORIG_HOSTNAME=${HOSTNAME} # there is longer name at AWS, more than 64char - #hostnamectl set-hostname ipa.ipa #echo '127.0.0.1 ipa.ipa' >> /etc/hosts - HOSTNAME=`hostname|tail -n1` -# not needed after change ^ - if echo $HOSTNAME | grep '\.' - then - rlLog "Using full hostname $HOSTNAME" - else - IP4=`fetch_local_ipv4` - HOSTNAME=`dig +short -x ${IP4}` - HOSTNAME="${HOSTNAME%.}" - ORIG_HOSTNAME=${HOSTNAME} - HOSTNAME=primary.ipa.test - rlRun "hostname ${HOSTNAME}" 0 "Resetting machine hostname to $HOSTNAME" - fi + HOSTNAME='petr.svetr' + hostnamectl hostname petr.svetr + IP4=`fetch_local_ipv4` + hostname ${HOSTNAME} + if ! ipactl status then if ! grep ${HOSTNAME} /etc/hosts @@ -55,7 +46,7 @@ prepareIpaServer() # getent hosts ${HOSTNAME} >> /etc/hosts echo "${IP4} ${HOSTNAME} ${ORIG_HOSTNAME}" >> /etc/hosts fi - rlRun "ipa-server-install -U --hostname ${HOSTNAME} -n ${DOMAIN} -r ${REALM} --setup-dns -p ${DM_SECRET} -a ${ADMIN_SECRET} --auto-forwarders" + rlRun "ipa-server-install -U --hostname ${HOSTNAME} --ip-address ${IP4} -n ${DOMAIN} -r ${REALM} --setup-dns -p ${DM_SECRET} -a ${ADMIN_SECRET} --auto-forwarders" fi } @@ -86,6 +77,8 @@ rlJournalStart rlPhaseEnd rlPhaseStartSetup "Prepare IPA" + rlFileBackup /etc/hosts + echo '' > /etc/hosts prepareIpaServer rpm -qa | grep bind > pkgs rlLog "`cat pkgs`" @@ -120,6 +113,7 @@ rlJournalStart grep _______________end ipa-server-install --uninstall --unattended killall named + rlFileRestore systemctl daemon-reload rlServiceStop systemctl stop named @@ -128,6 +122,7 @@ rlJournalStart rlRun "rm -f $rlRun_LOG" rlRun "popd" rlRun "hostname ${ORIG_HOSTNAME}" + rlRun "hostnamectl hostname ${ORIG_HOSTNAME}" rlRun "rm -r $TmpDir" 0 "Removing tmp directory" rlPhaseEnd rlJournalPrintText diff --git a/plans/bind/ipa.fmf b/plans/bind/ipa.fmf index 9779c9f..5bc04d7 100644 --- a/plans/bind/ipa.fmf +++ b/plans/bind/ipa.fmf @@ -6,6 +6,8 @@ url: "https://src.fedoraproject.org/tests/bind.git" provision: hardware: - memory: ">= 6 GB" + memory: ">= 6 GB" + cpu: + processors: ">= 4" execute: how: tmt From faff45833d98788733267ac77685a65c689e0a37 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 18 Feb 2025 12:03:09 +0100 Subject: [PATCH 101/165] debug log --- Smoke/IpaInstallAndStart/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index bfbf566..4dbe6c2 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -20,7 +20,7 @@ REALM=IPA.TEST fetch_local_ipv4() { - IP4=`ip address | awk '$1 == "inet" { print $2 }' | cut -d/ -f1 | grep -v '^127\.'| tail -n1` + ip address | awk '$1 == "inet" { print $2 }' | cut -d/ -f1 | grep -v '^127\.'| tail -n1 } prepareIpaServer() @@ -46,7 +46,7 @@ prepareIpaServer() # getent hosts ${HOSTNAME} >> /etc/hosts echo "${IP4} ${HOSTNAME} ${ORIG_HOSTNAME}" >> /etc/hosts fi - rlRun "ipa-server-install -U --hostname ${HOSTNAME} --ip-address ${IP4} -n ${DOMAIN} -r ${REALM} --setup-dns -p ${DM_SECRET} -a ${ADMIN_SECRET} --auto-forwarders" + rlRun "ipa-server-install -U --hostname ${HOSTNAME} --ip-address ${IP4} -n ${DOMAIN} -r ${REALM} --setup-dns -p ${DM_SECRET} -a ${ADMIN_SECRET} --auto-forwarders" fi } From b4b5bb0d694cb1664b0c70be9968a081f5b8f707 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 18 Feb 2025 14:11:25 +0100 Subject: [PATCH 102/165] adjust --- .../main.fmf | 18 --------------- .../main.fmf | 19 ---------------- .../main.fmf | 22 ------------------- .../main.fmf | 1 + main.fmf | 2 ++ 5 files changed, 3 insertions(+), 59 deletions(-) diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf index 7d510a7..59a0849 100644 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf +++ b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf @@ -18,24 +18,6 @@ adjust: - enabled: false when: distro < rhel-9.0 continue: false - - require+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - require+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 extra-nitrate: TC#0612648 extra-summary: /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP extra-task: /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf index be4a214..a6b8093 100644 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf +++ b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf @@ -5,25 +5,6 @@ description: | contact: Petr Mensik test: ./runtest.sh framework: beakerlib -adjust: - - require+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - require+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 duration: 5m link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1769876 diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf b/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf index 28384cf..b4616f7 100644 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf +++ b/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf @@ -11,28 +11,6 @@ tag: link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1848169 - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1865785 -adjust: - - enabled: false - when: distro != rhel-8 - continue: false - - require+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - require+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 extra-nitrate: TC#0608023 extra-summary: /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits extra-task: /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits diff --git a/Stub/master-and-stub-server-talks-a-bit/main.fmf b/Stub/master-and-stub-server-talks-a-bit/main.fmf index 4e3ffde..c34324f 100644 --- a/Stub/master-and-stub-server-talks-a-bit/main.fmf +++ b/Stub/master-and-stub-server-talks-a-bit/main.fmf @@ -3,6 +3,7 @@ description: '' contact: Petr Sklenar test: ./runtest.sh framework: beakerlib +recommend: [] duration: 10m enabled: true tag: diff --git a/main.fmf b/main.fmf index aab79c8..2ab2738 100644 --- a/main.fmf +++ b/main.fmf @@ -25,3 +25,5 @@ adjust+: environment+: PACKAGE: bind9.18 when: component == bind9.18 +check: + - how: avc From 272b4314be190e441168428df25fb9c3ad816f22 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 18 Feb 2025 14:23:32 +0100 Subject: [PATCH 103/165] adjust --- Stub/main.fmf | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 Stub/main.fmf diff --git a/Stub/main.fmf b/Stub/main.fmf deleted file mode 100644 index ee5c028..0000000 --- a/Stub/main.fmf +++ /dev/null @@ -1,25 +0,0 @@ -adjust+: - - require+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - require+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 - - require+: - - bind9.18 - - bind9.18-utils - environment+: - PACKAGE: bind9.18 - when: component == bind9.18 From 08464b8b1e1c34b8b180a61ad198afd152abf4be Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 18 Feb 2025 14:42:17 +0100 Subject: [PATCH 104/165] debug --- Stub/master-and-stub-server-talks-a-bit/runtest.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Stub/master-and-stub-server-talks-a-bit/runtest.sh b/Stub/master-and-stub-server-talks-a-bit/runtest.sh index e4d11fd..0a907a9 100755 --- a/Stub/master-and-stub-server-talks-a-bit/runtest.sh +++ b/Stub/master-and-stub-server-talks-a-bit/runtest.sh @@ -33,6 +33,7 @@ rlJournalStart rlPhaseStartSetup "base setup" rlAssertRpm $PACKAGE + rlLog "`rpm -qa | grep bind`" dir='/tmp/bind-for-petr' rm -rf $dir mkdir -p $dir From f8260b33021b231c867e19600dfef5336db1bb49 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 18 Feb 2025 14:55:05 +0100 Subject: [PATCH 105/165] debug --- Stub/master-and-stub-server-talks-a-bit/runtest.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Stub/master-and-stub-server-talks-a-bit/runtest.sh b/Stub/master-and-stub-server-talks-a-bit/runtest.sh index 0a907a9..8840f4b 100755 --- a/Stub/master-and-stub-server-talks-a-bit/runtest.sh +++ b/Stub/master-and-stub-server-talks-a-bit/runtest.sh @@ -33,6 +33,7 @@ rlJournalStart rlPhaseStartSetup "base setup" rlAssertRpm $PACKAGE + rlLog "packages" rlLog "`rpm -qa | grep bind`" dir='/tmp/bind-for-petr' rm -rf $dir From f460c5c003bd06a49ec977f2ae5ba23f2b64ca34 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 11:20:39 +0100 Subject: [PATCH 106/165] debug --- Smoke/IpaInstallAndStart/main.fmf | 2 +- Stub/master-and-stub-server-talks-a-bit/main.fmf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index 47d9f65..08b8ba6 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -3,7 +3,7 @@ test: ./test.sh framework: beakerlib duration: 68m contact: Petr Sklenar -adjust: +adjust+: - enabled: false when: component != bind because: freeipa is not supported with alternative components diff --git a/Stub/master-and-stub-server-talks-a-bit/main.fmf b/Stub/master-and-stub-server-talks-a-bit/main.fmf index c34324f..883a780 100644 --- a/Stub/master-and-stub-server-talks-a-bit/main.fmf +++ b/Stub/master-and-stub-server-talks-a-bit/main.fmf @@ -14,7 +14,7 @@ tag: link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1291185 - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1227189 -adjust: +adjust+: - enabled: false when: distro == rhel-4, rhel-5 continue: false From 7a65c6f3466b2f1faa72a61acb154bc120bb43cb Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 11:46:58 +0100 Subject: [PATCH 107/165] debug --- main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.fmf b/main.fmf index 2ab2738..ed2fb34 100644 --- a/main.fmf +++ b/main.fmf @@ -1,6 +1,6 @@ # QE owner contact: Petr Sklenar -adjust+: +adjust: - require+: - bind - bind-utils From f4c47efd35d6f8f6adffd2a80cc7a8b4cbef5c71 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 11:51:01 +0100 Subject: [PATCH 108/165] debug --- Smoke/main.fmf | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 Smoke/main.fmf diff --git a/Smoke/main.fmf b/Smoke/main.fmf deleted file mode 100644 index ee5c028..0000000 --- a/Smoke/main.fmf +++ /dev/null @@ -1,25 +0,0 @@ -adjust+: - - require+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - require+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 - - require+: - - bind9.18 - - bind9.18-utils - environment+: - PACKAGE: bind9.18 - when: component == bind9.18 From b7525868b290f31168e4657f9f4dc3bbab94abfa Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 11:53:42 +0100 Subject: [PATCH 109/165] debug --- .../bind-does-not-listen-on-all-addresses-over-TCP/main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf index 59a0849..e526c89 100644 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf +++ b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf @@ -14,7 +14,7 @@ tag: - NoRHEL5 link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1999691 -adjust: +adjust+: - enabled: false when: distro < rhel-9.0 continue: false From 89d11f95ae8638d00f0780689f1310af74aea9c1 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 13:32:25 +0100 Subject: [PATCH 110/165] debug --- Sanity/named/geoip-support/runtest.sh | 2 +- Sanity/named/json-support/runtest.sh | 2 +- Sanity/named/main.fmf | 27 ------------------------- Sanity/named/named-checkzone/runtest.sh | 2 +- Sanity/utils/delv-smoke-test/runtest.sh | 2 +- Sanity/utils/main.fmf | 23 --------------------- 6 files changed, 4 insertions(+), 54 deletions(-) delete mode 100644 Sanity/named/main.fmf delete mode 100644 Sanity/utils/main.fmf diff --git a/Sanity/named/geoip-support/runtest.sh b/Sanity/named/geoip-support/runtest.sh index f49b9fb..5fc879f 100755 --- a/Sanity/named/geoip-support/runtest.sh +++ b/Sanity/named/geoip-support/runtest.sh @@ -28,7 +28,7 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -: ${PACKAGE:="bind"} +: ${PACKAGE:=bind} rlJournalStart rlPhaseStartSetup diff --git a/Sanity/named/json-support/runtest.sh b/Sanity/named/json-support/runtest.sh index 64b4d28..8b50d84 100755 --- a/Sanity/named/json-support/runtest.sh +++ b/Sanity/named/json-support/runtest.sh @@ -28,7 +28,7 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -: ${PACKAGE:="bind"} +: ${PACKAGE:=bind} rlJournalStart rlPhaseStartSetup diff --git a/Sanity/named/main.fmf b/Sanity/named/main.fmf deleted file mode 100644 index 56e49bc..0000000 --- a/Sanity/named/main.fmf +++ /dev/null @@ -1,27 +0,0 @@ -tags+: - - named -adjust+: - - require+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - require+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 - - require+: - - bind9.18 - - bind9.18-utils - environment+: - PACKAGE: bind9.18 - when: component == bind9.18 diff --git a/Sanity/named/named-checkzone/runtest.sh b/Sanity/named/named-checkzone/runtest.sh index 3e2b018..630d42f 100755 --- a/Sanity/named/named-checkzone/runtest.sh +++ b/Sanity/named/named-checkzone/runtest.sh @@ -28,7 +28,7 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -: ${PACKAGE:="bind"} +: ${PACKAGE:=bind} rlJournalStart rlPhaseStartSetup diff --git a/Sanity/utils/delv-smoke-test/runtest.sh b/Sanity/utils/delv-smoke-test/runtest.sh index 4ad4c47..737f6e2 100755 --- a/Sanity/utils/delv-smoke-test/runtest.sh +++ b/Sanity/utils/delv-smoke-test/runtest.sh @@ -28,7 +28,7 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -: ${PACKAGE:="bind"} +: ${PACKAGE:=bind} BACKUP_RESOLV="" SOURCE_RESOLV="/etc/resolv.conf" diff --git a/Sanity/utils/main.fmf b/Sanity/utils/main.fmf deleted file mode 100644 index 3e38b4c..0000000 --- a/Sanity/utils/main.fmf +++ /dev/null @@ -1,23 +0,0 @@ -tags+: - - utils -adjust+: - - require+: - - bind-utils - environment+: - PACKAGE: bind - when: component is not defined or component == bind - - require+: - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 - - require+: - - bind9.18-utils - environment+: - PACKAGE: bind9.18 - when: component == bind9.18 From eb54ceaa19286036d7ec7301584fd65475a8b66c Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 13:35:12 +0100 Subject: [PATCH 111/165] debug --- plans/testaarch64.fmf | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 plans/testaarch64.fmf diff --git a/plans/testaarch64.fmf b/plans/testaarch64.fmf deleted file mode 100644 index 5c04276..0000000 --- a/plans/testaarch64.fmf +++ /dev/null @@ -1,12 +0,0 @@ -/archtest: - summary: Internal Tier1 tests - discover: - how: fmf - filter: 'tier: 1' - url: git://pkgs.devel.redhat.com/tests/bind - adjust: - - when: arch != aarch64 - enabled: false - because: components exist only on aarch64 - execute: - how: tmt From ee6aa2c4a98ebc026cf027cd54c76fd956b6dce0 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 14:09:31 +0100 Subject: [PATCH 112/165] debug --- Sanity/named/geoip-support/runtest.sh | 2 ++ Sanity/named/json-support/runtest.sh | 2 ++ Sanity/named/named-checkzone/runtest.sh | 2 ++ Stub/master-and-stub-server-talks-a-bit/runtest.sh | 1 + 4 files changed, 7 insertions(+) diff --git a/Sanity/named/geoip-support/runtest.sh b/Sanity/named/geoip-support/runtest.sh index 5fc879f..e99b9a7 100755 --- a/Sanity/named/geoip-support/runtest.sh +++ b/Sanity/named/geoip-support/runtest.sh @@ -33,6 +33,8 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE + rlLog "PACKAGE=`echo $PACKAGE`" + rlFileBackup /etc/named.conf /var/named/a /var/named/b rlPhaseEnd diff --git a/Sanity/named/json-support/runtest.sh b/Sanity/named/json-support/runtest.sh index 8b50d84..c3d7eb2 100755 --- a/Sanity/named/json-support/runtest.sh +++ b/Sanity/named/json-support/runtest.sh @@ -33,6 +33,8 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE + rlLog "PACKAGE=`echo $PACKAGE`" + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" TESTDIR="`pwd`" rlRun "pushd $TmpDir" diff --git a/Sanity/named/named-checkzone/runtest.sh b/Sanity/named/named-checkzone/runtest.sh index 630d42f..b9871f4 100755 --- a/Sanity/named/named-checkzone/runtest.sh +++ b/Sanity/named/named-checkzone/runtest.sh @@ -33,6 +33,8 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE + rlLog "PACKAGE=`echo $PACKAGE`" + rlRun "ls cptest2.tld.db" rlPhaseEnd diff --git a/Stub/master-and-stub-server-talks-a-bit/runtest.sh b/Stub/master-and-stub-server-talks-a-bit/runtest.sh index 8840f4b..b3dc85b 100755 --- a/Stub/master-and-stub-server-talks-a-bit/runtest.sh +++ b/Stub/master-and-stub-server-talks-a-bit/runtest.sh @@ -33,6 +33,7 @@ rlJournalStart rlPhaseStartSetup "base setup" rlAssertRpm $PACKAGE + rlLog "PACKAGE=`echo $PACKAGE`" rlLog "packages" rlLog "`rpm -qa | grep bind`" dir='/tmp/bind-for-petr' From 88e039ba66088eb494b9922b650f10b346a7bb97 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 14:27:09 +0100 Subject: [PATCH 113/165] debug --- plans/bind9.18/tier1.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plans/bind9.18/tier1.fmf b/plans/bind9.18/tier1.fmf index 835528b..0af95a7 100644 --- a/plans/bind9.18/tier1.fmf +++ b/plans/bind9.18/tier1.fmf @@ -1,4 +1,4 @@ -environment+: +environment: PACKAGE: bind9.18 /public: From 085aebd6e354ced9da1e54bc4652b93ebbe6fe6b Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 14:32:07 +0100 Subject: [PATCH 114/165] debug --- plans/bind9.18/tier1.fmf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plans/bind9.18/tier1.fmf b/plans/bind9.18/tier1.fmf index 0af95a7..12d4ef9 100644 --- a/plans/bind9.18/tier1.fmf +++ b/plans/bind9.18/tier1.fmf @@ -1,4 +1,4 @@ -environment: +environment+: PACKAGE: bind9.18 /public: @@ -11,6 +11,8 @@ environment: how: tmt context: component: bind9.18 + environment+: + PACKAGE: bind9.18 /internal: summary: Internal Tier1 tests From 04ec53ccb0d92080a499cb44bff40b0100f34d7b Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 14:55:07 +0100 Subject: [PATCH 115/165] debug --- plans/bind9.16/others.fmf | 4 ++++ plans/bind9.16/tier1.fmf | 4 ++++ plans/bind9.16/tier2-tier3.fmf | 4 ++++ plans/bind9.18/others.fmf | 4 ++++ plans/bind9.18/tier1.fmf | 4 ++++ plans/bind9.18/tier2-tier3.fmf | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/plans/bind9.16/others.fmf b/plans/bind9.16/others.fmf index a5a63ce..444e3d3 100644 --- a/plans/bind9.16/others.fmf +++ b/plans/bind9.16/others.fmf @@ -11,6 +11,8 @@ environment+: how: tmt context: component: bind9.16 + environment+: + PACKAGE: bind9.16 /internal: @@ -26,3 +28,5 @@ environment+: how: tmt context: component: bind9.16 + environment+: + PACKAGE: bind9.16 diff --git a/plans/bind9.16/tier1.fmf b/plans/bind9.16/tier1.fmf index 1a94301..4c1a8da 100644 --- a/plans/bind9.16/tier1.fmf +++ b/plans/bind9.16/tier1.fmf @@ -11,6 +11,8 @@ environment+: how: tmt context: component: bind9.16 + environment+: + PACKAGE: bind9.16 /internal: summary: Internal Tier1 tests @@ -25,3 +27,5 @@ environment+: how: tmt context: component: bind9.16 + environment+: + PACKAGE: bind9.16 diff --git a/plans/bind9.16/tier2-tier3.fmf b/plans/bind9.16/tier2-tier3.fmf index ea64340..937c5b0 100644 --- a/plans/bind9.16/tier2-tier3.fmf +++ b/plans/bind9.16/tier2-tier3.fmf @@ -11,6 +11,8 @@ environment+: how: tmt context: component: bind9.16 + environment+: + PACKAGE: bind9.16 /internal: summary: Internal Tier2 and Tier3 tests @@ -25,3 +27,5 @@ environment+: how: tmt context: component: bind9.16 + environment+: + PACKAGE: bind9.16 diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index ba80ff8..9db9409 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -11,6 +11,8 @@ environment+: how: tmt context: component: bind9.18 + environment+: + PACKAGE: bind9.18 /internal: @@ -26,4 +28,6 @@ environment+: how: tmt context: component: bind9.18 + environment+: + PACKAGE: bind9.18 diff --git a/plans/bind9.18/tier1.fmf b/plans/bind9.18/tier1.fmf index 12d4ef9..5262540 100644 --- a/plans/bind9.18/tier1.fmf +++ b/plans/bind9.18/tier1.fmf @@ -13,6 +13,8 @@ environment+: component: bind9.18 environment+: PACKAGE: bind9.18 + environment+: + PACKAGE: bind9.18 /internal: summary: Internal Tier1 tests @@ -27,3 +29,5 @@ environment+: how: tmt context: component: bind9.18 + environment+: + PACKAGE: bind9.18 diff --git a/plans/bind9.18/tier2-tier3.fmf b/plans/bind9.18/tier2-tier3.fmf index 59285d6..fa3372f 100644 --- a/plans/bind9.18/tier2-tier3.fmf +++ b/plans/bind9.18/tier2-tier3.fmf @@ -11,6 +11,8 @@ environment+: how: tmt context: component: bind9.18 + environment+: + PACKAGE: bind9.18 /internal: summary: Internal Tier2 and Tier3 tests @@ -25,3 +27,5 @@ environment+: how: tmt context: component: bind9.18 + environment+: + PACKAGE: bind9.18 From 8dcd9fd6eccda3f53b310b0ac0c32c4478a5f762 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 15:06:22 +0100 Subject: [PATCH 116/165] debug --- plans/bind9.16/others.fmf | 3 --- plans/bind9.16/tier1.fmf | 3 --- plans/bind9.16/tier2-tier3.fmf | 3 --- plans/bind9.18/tier1.fmf | 9 ++------- plans/bind9.18/tier2-tier3.fmf | 3 --- 5 files changed, 2 insertions(+), 19 deletions(-) diff --git a/plans/bind9.16/others.fmf b/plans/bind9.16/others.fmf index 444e3d3..e8bb7b2 100644 --- a/plans/bind9.16/others.fmf +++ b/plans/bind9.16/others.fmf @@ -1,6 +1,3 @@ -environment+: - PACKAGE: bind9.16 - /public: summary: Public other tests discover: diff --git a/plans/bind9.16/tier1.fmf b/plans/bind9.16/tier1.fmf index 4c1a8da..c3466ac 100644 --- a/plans/bind9.16/tier1.fmf +++ b/plans/bind9.16/tier1.fmf @@ -1,6 +1,3 @@ -environment+: - PACKAGE: bind9.16 - /public: summary: Public Tier1 tests discover: diff --git a/plans/bind9.16/tier2-tier3.fmf b/plans/bind9.16/tier2-tier3.fmf index 937c5b0..13fc758 100644 --- a/plans/bind9.16/tier2-tier3.fmf +++ b/plans/bind9.16/tier2-tier3.fmf @@ -1,6 +1,3 @@ -environment+: - PACKAGE: bind9.16 - /public: summary: Public Tier2 and Tier3 tests discover: diff --git a/plans/bind9.18/tier1.fmf b/plans/bind9.18/tier1.fmf index 5262540..7ece433 100644 --- a/plans/bind9.18/tier1.fmf +++ b/plans/bind9.18/tier1.fmf @@ -1,6 +1,3 @@ -environment+: - PACKAGE: bind9.18 - /public: summary: Public Tier1 tests discover: @@ -11,9 +8,7 @@ environment+: how: tmt context: component: bind9.18 - environment+: - PACKAGE: bind9.18 - environment+: + environment: PACKAGE: bind9.18 /internal: @@ -29,5 +24,5 @@ environment+: how: tmt context: component: bind9.18 - environment+: + environment: PACKAGE: bind9.18 diff --git a/plans/bind9.18/tier2-tier3.fmf b/plans/bind9.18/tier2-tier3.fmf index fa3372f..df974e2 100644 --- a/plans/bind9.18/tier2-tier3.fmf +++ b/plans/bind9.18/tier2-tier3.fmf @@ -1,6 +1,3 @@ -environment+: - PACKAGE: bind9.18 - /public: summary: Public Tier2 and Tier3 tests discover: From 6dbcd9fd234c601a1b077639eeb72715f2238628 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 15:07:40 +0100 Subject: [PATCH 117/165] debug --- plans/bind9.18/others.fmf | 3 --- 1 file changed, 3 deletions(-) diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index 9db9409..1326608 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -1,6 +1,3 @@ -environment+: - PACKAGE: bind9.18 - /public: summary: Public other tests discover: From c5906b792fd8db94424685b7fd15a343f479c405 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 15:13:08 +0100 Subject: [PATCH 118/165] debug --- plans/bind9.18/others.fmf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index 1326608..0cd4308 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -8,7 +8,7 @@ how: tmt context: component: bind9.18 - environment+: + environment: PACKAGE: bind9.18 @@ -25,6 +25,6 @@ how: tmt context: component: bind9.18 - environment+: + environment: PACKAGE: bind9.18 From f523073db6585680c2b7b10e0e35b4a59634700e Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 15:16:13 +0100 Subject: [PATCH 119/165] debug --- main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.fmf b/main.fmf index ed2fb34..2ab2738 100644 --- a/main.fmf +++ b/main.fmf @@ -1,6 +1,6 @@ # QE owner contact: Petr Sklenar -adjust: +adjust+: - require+: - bind - bind-utils From 98a706ee1b6396f34bec13049849eba5bc8a19ac Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 19 Feb 2025 18:06:51 +0100 Subject: [PATCH 120/165] debug --- plans/bind/ipa.fmf | 4 ++++ plans/bind/others.fmf | 8 ++++++++ plans/bind/tier1.fmf | 8 ++++++++ plans/bind/tier2-tier3.fmf | 8 ++++++++ 4 files changed, 28 insertions(+) diff --git a/plans/bind/ipa.fmf b/plans/bind/ipa.fmf index 5bc04d7..3a727f6 100644 --- a/plans/bind/ipa.fmf +++ b/plans/bind/ipa.fmf @@ -11,3 +11,7 @@ processors: ">= 4" execute: how: tmt + context: + component: bind + environment+: + PACKAGE: bind diff --git a/plans/bind/others.fmf b/plans/bind/others.fmf index 201b6e9..a396c19 100644 --- a/plans/bind/others.fmf +++ b/plans/bind/others.fmf @@ -9,6 +9,10 @@ memory: ">= 4 GB" execute: how: tmt + context: + component: bind + environment+: + PACKAGE: bind /internal: summary: Internal other tests @@ -21,3 +25,7 @@ when: distro == centos-stream or distro == fedora execute: how: tmt + context: + component: bind + environment+: + PACKAGE: bind diff --git a/plans/bind/tier1.fmf b/plans/bind/tier1.fmf index 6ad8b0a..7d3f832 100644 --- a/plans/bind/tier1.fmf +++ b/plans/bind/tier1.fmf @@ -6,6 +6,10 @@ url: "https://src.fedoraproject.org/tests/bind.git" execute: how: tmt + context: + component: bind + environment+: + PACKAGE: bind /internal: summary: Internal Tier1 tests @@ -18,3 +22,7 @@ when: distro == centos-stream or distro == fedora execute: how: tmt + context: + component: bind + environment+: + PACKAGE: bind diff --git a/plans/bind/tier2-tier3.fmf b/plans/bind/tier2-tier3.fmf index e119b90..ead9d59 100644 --- a/plans/bind/tier2-tier3.fmf +++ b/plans/bind/tier2-tier3.fmf @@ -6,6 +6,10 @@ url: "https://src.fedoraproject.org/tests/bind.git" execute: how: tmt + context: + component: bind + environment+: + PACKAGE: bind /internal: summary: Internal Tier2 and Tier3 tests @@ -18,3 +22,7 @@ when: distro == centos-stream or distro == fedora execute: how: tmt + context: + component: bind + environment+: + PACKAGE: bind From aee48bc0a0d37ed9dfb4de7c3f63eabac728384a Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 10:17:46 +0100 Subject: [PATCH 121/165] debug --- .../bind-does-not-listen-on-all-addresses-over-TCP/main.fmf | 2 +- Sanity/named/Run-internal-BIND-test-suite/main.fmf | 2 +- Sanity/named/bind-dyndb-ldap-rebuild/main.fmf | 2 +- Sanity/named/geoip-support/main.fmf | 2 +- Sanity/named/named-checkzone/main.fmf | 2 +- Sanity/utils/delv-smoke-test/main.fmf | 2 +- Smoke/IpaInstallAndStart/main.fmf | 2 +- Stub/master-and-stub-server-talks-a-bit/main.fmf | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf index e526c89..59a0849 100644 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf +++ b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf @@ -14,7 +14,7 @@ tag: - NoRHEL5 link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1999691 -adjust+: +adjust: - enabled: false when: distro < rhel-9.0 continue: false diff --git a/Sanity/named/Run-internal-BIND-test-suite/main.fmf b/Sanity/named/Run-internal-BIND-test-suite/main.fmf index 0e60225..e6ee1dd 100644 --- a/Sanity/named/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/named/Run-internal-BIND-test-suite/main.fmf @@ -32,7 +32,7 @@ recommend: - python3-dns - python3-pytest - opensc -adjust+: +adjust: - enabled: false when: distro == rhel continue: false diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf index 8dc7afb..a5d6fed 100644 --- a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf +++ b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf @@ -6,7 +6,7 @@ framework: beakerlib recommend+: - bind-devel - fedpkg -adjust+: +adjust: - enabled: false when: distro == rhel, centos - enabled: false diff --git a/Sanity/named/geoip-support/main.fmf b/Sanity/named/geoip-support/main.fmf index 502989a..6c244dc 100644 --- a/Sanity/named/geoip-support/main.fmf +++ b/Sanity/named/geoip-support/main.fmf @@ -20,7 +20,7 @@ tag: - bind9.18 link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1564443 -adjust+: +adjust: - enabled: false when: distro < rhel-8 continue: false diff --git a/Sanity/named/named-checkzone/main.fmf b/Sanity/named/named-checkzone/main.fmf index 8c0f39e..95b2a03 100644 --- a/Sanity/named/named-checkzone/main.fmf +++ b/Sanity/named/named-checkzone/main.fmf @@ -12,7 +12,7 @@ tag: - TIP_fedora_pass - TIPfail_infra - TIPpass -adjust+: +adjust: - enabled: false when: distro == rhel-4, rhel-5 continue: false diff --git a/Sanity/utils/delv-smoke-test/main.fmf b/Sanity/utils/delv-smoke-test/main.fmf index d1fe2d6..04c5dc2 100644 --- a/Sanity/utils/delv-smoke-test/main.fmf +++ b/Sanity/utils/delv-smoke-test/main.fmf @@ -14,7 +14,7 @@ tag: - TIPpass link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 -adjust+: +adjust: - enabled: false when: distro == rhel-4, rhel-5, rhel-6 continue: false diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index 08b8ba6..47d9f65 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -3,7 +3,7 @@ test: ./test.sh framework: beakerlib duration: 68m contact: Petr Sklenar -adjust+: +adjust: - enabled: false when: component != bind because: freeipa is not supported with alternative components diff --git a/Stub/master-and-stub-server-talks-a-bit/main.fmf b/Stub/master-and-stub-server-talks-a-bit/main.fmf index 883a780..c34324f 100644 --- a/Stub/master-and-stub-server-talks-a-bit/main.fmf +++ b/Stub/master-and-stub-server-talks-a-bit/main.fmf @@ -14,7 +14,7 @@ tag: link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1291185 - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1227189 -adjust+: +adjust: - enabled: false when: distro == rhel-4, rhel-5 continue: false From 4403912f86f0ce8df2a2a7b71685eb3a3ae2e718 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 10:38:13 +0100 Subject: [PATCH 122/165] debug --- plans/bind/others.fmf | 2 +- plans/bind/tier1.fmf | 2 +- plans/bind/tier2-tier3.fmf | 2 +- plans/bind9.16/others.fmf | 2 +- plans/bind9.16/tier1.fmf | 2 +- plans/bind9.16/tier2-tier3.fmf | 2 +- plans/bind9.18/others.fmf | 2 +- plans/bind9.18/tier1.fmf | 2 +- plans/bind9.18/tier2-tier3.fmf | 2 +- plans/others.fmf | 2 +- plans/tier1.fmf | 2 +- plans/tier2-tier3.fmf | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/plans/bind/others.fmf b/plans/bind/others.fmf index a396c19..dc53850 100644 --- a/plans/bind/others.fmf +++ b/plans/bind/others.fmf @@ -19,7 +19,7 @@ discover: how: fmf filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' - url: git://pkgs.devel.redhat.com/tests/bind + url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/bind/tier1.fmf b/plans/bind/tier1.fmf index 7d3f832..c254834 100644 --- a/plans/bind/tier1.fmf +++ b/plans/bind/tier1.fmf @@ -16,7 +16,7 @@ discover: how: fmf filter: 'tier: 1' - url: git://pkgs.devel.redhat.com/tests/bind + url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/bind/tier2-tier3.fmf b/plans/bind/tier2-tier3.fmf index ead9d59..fc6b05f 100644 --- a/plans/bind/tier2-tier3.fmf +++ b/plans/bind/tier2-tier3.fmf @@ -16,7 +16,7 @@ discover: how: fmf filter: 'tier: 2 | tier: 3' - url: git://pkgs.devel.redhat.com/tests/bind + url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/bind9.16/others.fmf b/plans/bind9.16/others.fmf index e8bb7b2..be4152e 100644 --- a/plans/bind9.16/others.fmf +++ b/plans/bind9.16/others.fmf @@ -17,7 +17,7 @@ discover: how: fmf filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library' - url: git://pkgs.devel.redhat.com/tests/bind + url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/bind9.16/tier1.fmf b/plans/bind9.16/tier1.fmf index c3466ac..838e1ac 100644 --- a/plans/bind9.16/tier1.fmf +++ b/plans/bind9.16/tier1.fmf @@ -16,7 +16,7 @@ discover: how: fmf filter: 'tier: 1 & tag: -library' - url: git://pkgs.devel.redhat.com/tests/bind + url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/bind9.16/tier2-tier3.fmf b/plans/bind9.16/tier2-tier3.fmf index 13fc758..3a3342b 100644 --- a/plans/bind9.16/tier2-tier3.fmf +++ b/plans/bind9.16/tier2-tier3.fmf @@ -16,7 +16,7 @@ discover: how: fmf filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' - url: git://pkgs.devel.redhat.com/tests/bind + url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index 0cd4308..bd54b04 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -17,7 +17,7 @@ discover: how: fmf filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library' - url: git://pkgs.devel.redhat.com/tests/bind + url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/bind9.18/tier1.fmf b/plans/bind9.18/tier1.fmf index 7ece433..f300adb 100644 --- a/plans/bind9.18/tier1.fmf +++ b/plans/bind9.18/tier1.fmf @@ -16,7 +16,7 @@ discover: how: fmf filter: 'tier: 1 & tag: -library' - url: git://pkgs.devel.redhat.com/tests/bind + url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/bind9.18/tier2-tier3.fmf b/plans/bind9.18/tier2-tier3.fmf index df974e2..7692249 100644 --- a/plans/bind9.18/tier2-tier3.fmf +++ b/plans/bind9.18/tier2-tier3.fmf @@ -16,7 +16,7 @@ discover: how: fmf filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' - url: git://pkgs.devel.redhat.com/tests/bind + url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/others.fmf b/plans/others.fmf index 201b6e9..8203a60 100644 --- a/plans/others.fmf +++ b/plans/others.fmf @@ -15,7 +15,7 @@ discover: how: fmf filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' - url: git://pkgs.devel.redhat.com/tests/bind + url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/tier1.fmf b/plans/tier1.fmf index 6ad8b0a..2ac2ed2 100644 --- a/plans/tier1.fmf +++ b/plans/tier1.fmf @@ -12,7 +12,7 @@ discover: how: fmf filter: 'tier: 1' - url: git://pkgs.devel.redhat.com/tests/bind + url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/tier2-tier3.fmf b/plans/tier2-tier3.fmf index e119b90..74d7b07 100644 --- a/plans/tier2-tier3.fmf +++ b/plans/tier2-tier3.fmf @@ -12,7 +12,7 @@ discover: how: fmf filter: 'tier: 2 | tier: 3' - url: git://pkgs.devel.redhat.com/tests/bind + url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false when: distro == centos-stream or distro == fedora From 507f5e9dcd3f456f31453433589e343bdefaf7f2 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 10:57:42 +0100 Subject: [PATCH 123/165] debug --- Sanity/utils/delv-smoke-test/main.fmf | 8 ++++---- Stub/master-and-stub-server-talks-a-bit/main.fmf | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Sanity/utils/delv-smoke-test/main.fmf b/Sanity/utils/delv-smoke-test/main.fmf index 04c5dc2..4f55bd2 100644 --- a/Sanity/utils/delv-smoke-test/main.fmf +++ b/Sanity/utils/delv-smoke-test/main.fmf @@ -14,10 +14,10 @@ tag: - TIPpass link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 -adjust: - - enabled: false - when: distro == rhel-4, rhel-5, rhel-6 - continue: false +#adjust: +# - enabled: false +# when: distro == rhel-4, rhel-5, rhel-6 +# continue: false extra-nitrate: TC#0600760 extra-summary: /CoreOS/bind/Sanity/delv-smoke-test extra-task: /CoreOS/bind/Sanity/delv-smoke-test diff --git a/Stub/master-and-stub-server-talks-a-bit/main.fmf b/Stub/master-and-stub-server-talks-a-bit/main.fmf index c34324f..94ab5f6 100644 --- a/Stub/master-and-stub-server-talks-a-bit/main.fmf +++ b/Stub/master-and-stub-server-talks-a-bit/main.fmf @@ -14,13 +14,13 @@ tag: link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1291185 - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1227189 -adjust: - - enabled: false - when: distro == rhel-4, rhel-5 - continue: false - - enabled: false - when: arch == ppc64le - continue: false +#adjust: +# - enabled: false +# when: distro == rhel-4, rhel-5 +# continue: false +# - enabled: false +# when: arch == ppc64le +# continue: false extra-nitrate: TC#0518539 extra-summary: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit extra-task: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit From 40d588274bc2e564a3e3df966544c64046dbf973 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 11:15:10 +0100 Subject: [PATCH 124/165] debug --- main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.fmf b/main.fmf index 2ab2738..ed2fb34 100644 --- a/main.fmf +++ b/main.fmf @@ -1,6 +1,6 @@ # QE owner contact: Petr Sklenar -adjust+: +adjust: - require+: - bind - bind-utils From 21c3fab33f599e4bdc65ca3880c1fe10081b5188 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 12:23:43 +0100 Subject: [PATCH 125/165] debug --- plans/bind9.18/others.fmf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index bd54b04..c206aa5 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -1,3 +1,8 @@ +context: + component: bind9.18 +environment: + PACKAGE: bind9.18 + /public: summary: Public other tests discover: From 46bffb078b1a96706a09ee3311c0dd7d3e6a570b Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 12:47:07 +0100 Subject: [PATCH 126/165] debug --- plans/bind9.18/others.fmf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index c206aa5..113d19a 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -1,6 +1,6 @@ -context: +context+: component: bind9.18 -environment: +environment+: PACKAGE: bind9.18 /public: @@ -11,9 +11,9 @@ environment: url: "https://src.fedoraproject.org/tests/bind.git" execute: how: tmt - context: + context+: component: bind9.18 - environment: + environment+: PACKAGE: bind9.18 @@ -28,8 +28,8 @@ environment: when: distro == centos-stream or distro == fedora execute: how: tmt - context: - component: bind9.18 - environment: + context+: + component+: bind9.18 + environment+: PACKAGE: bind9.18 From dec1d582f506ef73831ed1a19dcf8da87c634712 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 12:54:17 +0100 Subject: [PATCH 127/165] debug --- plans/bind9.18/others.fmf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index 113d19a..a1f5d5a 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -11,10 +11,10 @@ environment+: url: "https://src.fedoraproject.org/tests/bind.git" execute: how: tmt - context+: - component: bind9.18 - environment+: - PACKAGE: bind9.18 + #context+: + # component: bind9.18 + #environment+: + # PACKAGE: bind9.18 /internal: @@ -28,8 +28,8 @@ environment+: when: distro == centos-stream or distro == fedora execute: how: tmt - context+: - component+: bind9.18 - environment+: - PACKAGE: bind9.18 + #context+: + # component+: bind9.18 + #environment+: + # PACKAGE: bind9.18 From 842a757635e657cd5e1f94f6a601be4ae632f6dc Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 13:08:42 +0100 Subject: [PATCH 128/165] debug --- main.fmf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.fmf b/main.fmf index ed2fb34..ff475b4 100644 --- a/main.fmf +++ b/main.fmf @@ -1,12 +1,12 @@ # QE owner contact: Petr Sklenar adjust: - - require+: + - when: component is not defined or component == bind + require+: - bind - bind-utils environment+: PACKAGE: bind - when: component is not defined or component == bind - require+: - bind9-next - bind9-next-utils From de150084bb1144ea9884f38b57a85c1f121e4e9f Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 13:13:20 +0100 Subject: [PATCH 129/165] debug --- main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.fmf b/main.fmf index ff475b4..1695ce6 100644 --- a/main.fmf +++ b/main.fmf @@ -1,7 +1,7 @@ # QE owner contact: Petr Sklenar adjust: - - when: component is not defined or component == bind + - when: component is not defined #or component == bind require+: - bind - bind-utils From ade535498defd59f92770843f40a0b1184fb793a Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 13:32:48 +0100 Subject: [PATCH 130/165] debug --- main.fmf | 2 +- plans/bind9.18/others.fmf | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/main.fmf b/main.fmf index 1695ce6..e8722c2 100644 --- a/main.fmf +++ b/main.fmf @@ -1,7 +1,7 @@ # QE owner contact: Petr Sklenar adjust: - - when: component is not defined #or component == bind + - when: component == bind # or component is not defined require+: - bind - bind-utils diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index a1f5d5a..099bc4e 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -2,6 +2,10 @@ context+: component: bind9.18 environment+: PACKAGE: bind9.18 +require+: + - bind9.16 + - bind9.16-utils + /public: summary: Public other tests From 64f7d7c1d60a5ce4f60c3bbe5edde4456c31fa86 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 14:03:52 +0100 Subject: [PATCH 131/165] debug --- main.fmf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.fmf b/main.fmf index e8722c2..ed2fb34 100644 --- a/main.fmf +++ b/main.fmf @@ -1,12 +1,12 @@ # QE owner contact: Petr Sklenar adjust: - - when: component == bind # or component is not defined - require+: + - require+: - bind - bind-utils environment+: PACKAGE: bind + when: component is not defined or component == bind - require+: - bind9-next - bind9-next-utils From 175ef383ec9c99ea216e291a59aa86caee989c95 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 14:15:01 +0100 Subject: [PATCH 132/165] debug --- plans/bind9.18/others.fmf | 1 + 1 file changed, 1 insertion(+) diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index 099bc4e..4c522d7 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -5,6 +5,7 @@ environment+: require+: - bind9.16 - bind9.16-utils +component: bind9.18 /public: From 581ef9c92ade7f730f779a801c25c358c6769634 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 14:35:44 +0100 Subject: [PATCH 133/165] debug --- plans/bind9.18/others.fmf | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index 4c522d7..387390f 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -2,13 +2,21 @@ context+: component: bind9.18 environment+: PACKAGE: bind9.18 -require+: - - bind9.16 - - bind9.16-utils component: bind9.18 +discover: + how: fmf + adjust-tests: + require+: + - bind9.18 + - bind9.18-utils /public: + context+: + component: bind9.18 + environment+: + PACKAGE: bind9.18 + component: bind9.18 summary: Public other tests discover: how: fmf @@ -16,11 +24,6 @@ component: bind9.18 url: "https://src.fedoraproject.org/tests/bind.git" execute: how: tmt - #context+: - # component: bind9.18 - #environment+: - # PACKAGE: bind9.18 - /internal: summary: Internal other tests From cf9a083b7f6d106ed471b0769edf3a376dde254e Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 15:01:02 +0100 Subject: [PATCH 134/165] debug --- plans/bind9.18/others.fmf | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index 387390f..0f6e1fa 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -1,22 +1,9 @@ -context+: - component: bind9.18 -environment+: - PACKAGE: bind9.18 -component: bind9.18 - -discover: - how: fmf - adjust-tests: - require+: - - bind9.18 - - bind9.18-utils +#context+: +# component: bind9.18 +#environment+: +# PACKAGE: bind9.18 /public: - context+: - component: bind9.18 - environment+: - PACKAGE: bind9.18 - component: bind9.18 summary: Public other tests discover: how: fmf From fd070f9680e36567eeb2c692e0a0da528fa8f46a Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 15:16:10 +0100 Subject: [PATCH 135/165] debug --- plans/bind9.18/others.fmf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index 0f6e1fa..2442f1e 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -1,7 +1,7 @@ -#context+: -# component: bind9.18 -#environment+: -# PACKAGE: bind9.18 +context+: + component: bind9.18 +environment+: + PACKAGE: bind9.18 /public: summary: Public other tests From fda456525c6422414ae4b1bb3ef3437379f4743f Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 15:27:20 +0100 Subject: [PATCH 136/165] debug --- .../main.fmf | 2 +- Sanity/named/Run-internal-BIND-test-suite/main.fmf | 2 +- Sanity/named/bind-dyndb-ldap-rebuild/main.fmf | 2 +- Sanity/named/geoip-support/main.fmf | 2 +- Sanity/named/named-checkzone/main.fmf | 2 +- Sanity/utils/delv-smoke-test/main.fmf | 8 ++++---- Smoke/IpaInstallAndStart/main.fmf | 2 +- Stub/master-and-stub-server-talks-a-bit/main.fmf | 14 +++++++------- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf index 59a0849..e526c89 100644 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf +++ b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf @@ -14,7 +14,7 @@ tag: - NoRHEL5 link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1999691 -adjust: +adjust+: - enabled: false when: distro < rhel-9.0 continue: false diff --git a/Sanity/named/Run-internal-BIND-test-suite/main.fmf b/Sanity/named/Run-internal-BIND-test-suite/main.fmf index e6ee1dd..0e60225 100644 --- a/Sanity/named/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/named/Run-internal-BIND-test-suite/main.fmf @@ -32,7 +32,7 @@ recommend: - python3-dns - python3-pytest - opensc -adjust: +adjust+: - enabled: false when: distro == rhel continue: false diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf index a5d6fed..8dc7afb 100644 --- a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf +++ b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf @@ -6,7 +6,7 @@ framework: beakerlib recommend+: - bind-devel - fedpkg -adjust: +adjust+: - enabled: false when: distro == rhel, centos - enabled: false diff --git a/Sanity/named/geoip-support/main.fmf b/Sanity/named/geoip-support/main.fmf index 6c244dc..502989a 100644 --- a/Sanity/named/geoip-support/main.fmf +++ b/Sanity/named/geoip-support/main.fmf @@ -20,7 +20,7 @@ tag: - bind9.18 link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1564443 -adjust: +adjust+: - enabled: false when: distro < rhel-8 continue: false diff --git a/Sanity/named/named-checkzone/main.fmf b/Sanity/named/named-checkzone/main.fmf index 95b2a03..8c0f39e 100644 --- a/Sanity/named/named-checkzone/main.fmf +++ b/Sanity/named/named-checkzone/main.fmf @@ -12,7 +12,7 @@ tag: - TIP_fedora_pass - TIPfail_infra - TIPpass -adjust: +adjust+: - enabled: false when: distro == rhel-4, rhel-5 continue: false diff --git a/Sanity/utils/delv-smoke-test/main.fmf b/Sanity/utils/delv-smoke-test/main.fmf index 4f55bd2..d1fe2d6 100644 --- a/Sanity/utils/delv-smoke-test/main.fmf +++ b/Sanity/utils/delv-smoke-test/main.fmf @@ -14,10 +14,10 @@ tag: - TIPpass link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 -#adjust: -# - enabled: false -# when: distro == rhel-4, rhel-5, rhel-6 -# continue: false +adjust+: + - enabled: false + when: distro == rhel-4, rhel-5, rhel-6 + continue: false extra-nitrate: TC#0600760 extra-summary: /CoreOS/bind/Sanity/delv-smoke-test extra-task: /CoreOS/bind/Sanity/delv-smoke-test diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index 47d9f65..08b8ba6 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -3,7 +3,7 @@ test: ./test.sh framework: beakerlib duration: 68m contact: Petr Sklenar -adjust: +adjust+: - enabled: false when: component != bind because: freeipa is not supported with alternative components diff --git a/Stub/master-and-stub-server-talks-a-bit/main.fmf b/Stub/master-and-stub-server-talks-a-bit/main.fmf index 94ab5f6..883a780 100644 --- a/Stub/master-and-stub-server-talks-a-bit/main.fmf +++ b/Stub/master-and-stub-server-talks-a-bit/main.fmf @@ -14,13 +14,13 @@ tag: link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1291185 - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1227189 -#adjust: -# - enabled: false -# when: distro == rhel-4, rhel-5 -# continue: false -# - enabled: false -# when: arch == ppc64le -# continue: false +adjust+: + - enabled: false + when: distro == rhel-4, rhel-5 + continue: false + - enabled: false + when: arch == ppc64le + continue: false extra-nitrate: TC#0518539 extra-summary: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit extra-task: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit From a87bb0e8196fa7bb205dd533ed89b7e924c9cb18 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 15:30:12 +0100 Subject: [PATCH 137/165] debug --- main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.fmf b/main.fmf index ed2fb34..e89125e 100644 --- a/main.fmf +++ b/main.fmf @@ -6,7 +6,7 @@ adjust: - bind-utils environment+: PACKAGE: bind - when: component is not defined or component == bind + when: component == bind - require+: - bind9-next - bind9-next-utils From 589fcc4ddcfecf270171993394d974d22cd58c50 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Feb 2025 15:39:39 +0100 Subject: [PATCH 138/165] debug --- plans/bind9.18/others.fmf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index 2442f1e..248ec7e 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -1,6 +1,6 @@ -context+: +context: component: bind9.18 -environment+: +environment: PACKAGE: bind9.18 /public: From 9c25e3c494967b73b5a76f277c910f39124633ee Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 24 Feb 2025 14:19:25 +0100 Subject: [PATCH 139/165] rhel8 specific --- Smoke/IpaInstallAndStart/test.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 4dbe6c2..3c6118e 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -88,7 +88,8 @@ rlJournalStart for i in `seq 5 10`;do rlRun "ipactl restart" sleep $i - rlRun "systemctl restart named.service" + #rhel8 mask named service. Also named restart is probably not needed. + uname -a | grep 'el8' || rlRun "systemctl restart named.service" sleep $i done rlPhaseEnd @@ -115,14 +116,14 @@ rlJournalStart killall named rlFileRestore systemctl daemon-reload - rlServiceStop + rlServiceStop named systemctl stop named pkill -9 named killall -9 named rlRun "rm -f $rlRun_LOG" rlRun "popd" rlRun "hostname ${ORIG_HOSTNAME}" - rlRun "hostnamectl hostname ${ORIG_HOSTNAME}" + hostnamectl status && rlRun "hostnamectl hostname ${ORIG_HOSTNAME}" rlRun "rm -r $TmpDir" 0 "Removing tmp directory" rlPhaseEnd rlJournalPrintText From a2d17d63028fc9d1d12c9bc16cdc1bab04016a7e Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 24 Feb 2025 14:29:31 +0100 Subject: [PATCH 140/165] debug --- Sanity/named/caching-forwarder-dnssec/test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sanity/named/caching-forwarder-dnssec/test.sh b/Sanity/named/caching-forwarder-dnssec/test.sh index d724749..92eea57 100755 --- a/Sanity/named/caching-forwarder-dnssec/test.sh +++ b/Sanity/named/caching-forwarder-dnssec/test.sh @@ -247,6 +247,8 @@ for I in {1..3}; do KEYID=$(buDigKskId @localhost .) rlAssertNotEquals "Check keyId is not empty." "$KEYID" "" rlAssertGreater "Check $KEYID is non-zero" "$KEYID" 0 + rlLog "`echo dig_cmd1;dig +nocrypto +short -t dnskey @localhost .| tail -n1 | awk '$1 == 257 { sub("]", "", $7); print $7 }'`" + rlLog "echo dig_cmd2;dig +nocrypto +short -t dnskey @localhost ." TEST1=$(dig +multi $KEYID DNSKEY) rlLog "`echo dig_for_dnskey;echo $TEST1`" rlRun "rndc secroots" From 0876fb85232296576e38b5810a00ac600b1fe228 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 24 Feb 2025 16:12:38 +0100 Subject: [PATCH 141/165] more attempts --- Sanity/named/caching-forwarder-dnssec/test.sh | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/Sanity/named/caching-forwarder-dnssec/test.sh b/Sanity/named/caching-forwarder-dnssec/test.sh index 92eea57..c711c28 100755 --- a/Sanity/named/caching-forwarder-dnssec/test.sh +++ b/Sanity/named/caching-forwarder-dnssec/test.sh @@ -237,22 +237,42 @@ rlJournalStart rndc -h 2>&1 | grep -q 'managed-keys status' && HAS_MANAGED_KEYS='y' rlPhaseEnd -for I in {1..3}; do +for I in {1..30}; do rlPhaseStartTest "Basic test #$I" rlRun "rlServiceStart named" sleep 5 # this test works randomly buDigSuccessSecure @localhost . DNSKEY buDigSuccessSecure @localhost - KEYID=$(buDigKskId @localhost .) - rlAssertNotEquals "Check keyId is not empty." "$KEYID" "" - rlAssertGreater "Check $KEYID is non-zero" "$KEYID" 0 - rlLog "`echo dig_cmd1;dig +nocrypto +short -t dnskey @localhost .| tail -n1 | awk '$1 == 257 { sub("]", "", $7); print $7 }'`" - rlLog "echo dig_cmd2;dig +nocrypto +short -t dnskey @localhost ." - TEST1=$(dig +multi $KEYID DNSKEY) + #KEYID=$(buDigKskId @localhost .) + #rlAssertGreater "Check $KEYID is non-zero" "$KEYID" 0 + #rlAssertNotEquals "Check keyId is not empty." "$KEYID" "" + +################ + EMPTY_COUNT=0 + KEYID="" + + for i in {1..5}; do + KEYID=$(buDigKskId @localhost .) + + if [[ -z "$KEYID" ]]; then + ((EMPTY_COUNT++)) + rlLog "Attempt $i: Empty result ($EMPTY_COUNT empty so far)" + else + rlLog "Attempt $i: Got KEYID = $KEYID" + LAST_WORKING_KEYID=$KEYID + fi + + sleep 0.2 + done + # If more than 3 failures, exit with error + rlAssertLesserOrEqual "Check EMPTY_COUNT is non-zero LESS than 15" "$EMPTY_COUNT" 15 +################ + + TEST1=$(dig +multi $LAST_WORKING_KEYID DNSKEY) rlLog "`echo dig_for_dnskey;echo $TEST1`" rlRun "rndc secroots" - rlRun "grep \"^./RSASHA256/$KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" + rlRun "grep \"^./RSASHA256/$LAST_WORKING_KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" [ "$HAS_MANAGED_KEYS" = y ] && rlRun "rndc managed-keys status" rlPhaseEnd done From b770d068059c6ef10ac686c75c268fcfece6df76 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 24 Feb 2025 16:15:43 +0100 Subject: [PATCH 142/165] more attempts --- Sanity/named/caching-forwarder-dnssec/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sanity/named/caching-forwarder-dnssec/test.sh b/Sanity/named/caching-forwarder-dnssec/test.sh index c711c28..5e7a9fd 100755 --- a/Sanity/named/caching-forwarder-dnssec/test.sh +++ b/Sanity/named/caching-forwarder-dnssec/test.sh @@ -237,7 +237,7 @@ rlJournalStart rndc -h 2>&1 | grep -q 'managed-keys status' && HAS_MANAGED_KEYS='y' rlPhaseEnd -for I in {1..30}; do +for I in {1..5}; do rlPhaseStartTest "Basic test #$I" rlRun "rlServiceStart named" sleep 5 # this test works randomly @@ -252,7 +252,7 @@ for I in {1..30}; do EMPTY_COUNT=0 KEYID="" - for i in {1..5}; do + for i in {1..30}; do KEYID=$(buDigKskId @localhost .) if [[ -z "$KEYID" ]]; then From e68dd7d032f00f0082cf537fb1bee31ea92edebc Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 24 Feb 2025 16:24:44 +0100 Subject: [PATCH 143/165] more attempts --- Sanity/named/caching-forwarder-dnssec/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sanity/named/caching-forwarder-dnssec/test.sh b/Sanity/named/caching-forwarder-dnssec/test.sh index 5e7a9fd..bc4da20 100755 --- a/Sanity/named/caching-forwarder-dnssec/test.sh +++ b/Sanity/named/caching-forwarder-dnssec/test.sh @@ -266,7 +266,7 @@ for I in {1..5}; do sleep 0.2 done # If more than 3 failures, exit with error - rlAssertLesserOrEqual "Check EMPTY_COUNT is non-zero LESS than 15" "$EMPTY_COUNT" 15 + rlAssertLesserOrEqual "Check EMPTY_COUNT is non-zero LESS than 20" "$EMPTY_COUNT" 20 ################ TEST1=$(dig +multi $LAST_WORKING_KEYID DNSKEY) From 0ad1aa4b16cc723a203dda0799f1a60792e10ed2 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 24 Feb 2025 17:30:23 +0100 Subject: [PATCH 144/165] IPA tests --- Smoke/IpaInstallAndStart/test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 3c6118e..9dde95b 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -105,6 +105,11 @@ rlJournalStart echo "nsupdate -g -d update\n---------" /usr/bin/nsupdate -g -d update echo "=============== END of DEBUG" + rlRun "host -t SOA $DOMAIN localhost" 0 "Check localhost service is running" + rlRun "host -t NS $DOMAIN localhost" 0 "Check localhost nameservers work" + rlRun "host -t SOA $DOMAIN" 0 "Check default resolver reaches local domain" + rlRun "host -t NS $DOMAIN" 0 "Check default resolver reaches local nameserver" + rlPhaseEnd rlPhaseStartCleanup From 4d9734f2afb027de185bbb59e7660d991a9cb8d5 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Mon, 24 Feb 2025 18:38:06 +0100 Subject: [PATCH 145/165] IPA tests --- Smoke/IpaInstallAndStart/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index 9dde95b..dd363bb 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -128,7 +128,7 @@ rlJournalStart rlRun "rm -f $rlRun_LOG" rlRun "popd" rlRun "hostname ${ORIG_HOSTNAME}" - hostnamectl status && rlRun "hostnamectl hostname ${ORIG_HOSTNAME}" + rlRun "hostnamectl hostname ${ORIG_HOSTNAME}" 0-255 rlRun "rm -r $TmpDir" 0 "Removing tmp directory" rlPhaseEnd rlJournalPrintText From 20b73dcc398989d56da8413c5d3ac1f8f8de7f5d Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 25 Feb 2025 12:35:32 +0100 Subject: [PATCH 146/165] avc not needed --- Smoke/IpaInstallAndStart/main.fmf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index 08b8ba6..7ee39c2 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -9,4 +9,8 @@ adjust+: because: freeipa is not supported with alternative components extra-nitrate: TC#0617581 tag: ipaMoreMem -id: d4375cba-a2fd-4b33-bb8a-83cda760e237 +id: d4375cba-a2fd-4b33-bb8a-83cda760e237\ +check: + - how: avc + result: info + when: distro < rhel-9 From 97c6f97e30cbea2fc33caa67b1e656398c2f2b25 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 25 Feb 2025 16:54:47 +0100 Subject: [PATCH 147/165] rhel8 only --- Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf b/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf index b4616f7..8a28ac7 100644 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf +++ b/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf @@ -8,6 +8,11 @@ enabled: true tag: - TIPpass - TIPpass_infra +adjust+: + - enabled: false + when: distro != rhel-8 + continue: false + because: there is an issue https://issues.redhat.com/browse/RHEL-80353 link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1848169 - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1865785 From f66d9539bd062c99bc00e7802bb5e93c5e48eb6d Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 26 Feb 2025 08:29:25 +0100 Subject: [PATCH 148/165] add into plan with more mem and cpu --- Smoke/IpaInstallAndStart/main.fmf | 2 +- plans/bind/ipa.fmf | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 plans/bind/ipa.fmf diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf index 7ee39c2..8bf4036 100644 --- a/Smoke/IpaInstallAndStart/main.fmf +++ b/Smoke/IpaInstallAndStart/main.fmf @@ -8,7 +8,7 @@ adjust+: when: component != bind because: freeipa is not supported with alternative components extra-nitrate: TC#0617581 -tag: ipaMoreMem +tag: morecpu id: d4375cba-a2fd-4b33-bb8a-83cda760e237\ check: - how: avc diff --git a/plans/bind/ipa.fmf b/plans/bind/ipa.fmf deleted file mode 100644 index 3a727f6..0000000 --- a/plans/bind/ipa.fmf +++ /dev/null @@ -1,17 +0,0 @@ -/public: - summary: IPA test with more mem - discover: - how: fmf - filter: 'tag: ipaMoreMem' - url: "https://src.fedoraproject.org/tests/bind.git" - provision: - hardware: - memory: ">= 6 GB" - cpu: - processors: ">= 4" - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind From 5abdbc54c17b6ed65ff0f940047a7f8f85d8d18c Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 26 Feb 2025 08:40:53 +0100 Subject: [PATCH 149/165] add into plan with more mem and cpu --- plans/bind/morecpu.fmf | 23 +++++++++++++++++++++++ plans/bind9.16/morecpu.fmf | 23 +++++++++++++++++++++++ plans/bind9.18/morecpu.fmf | 23 +++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 plans/bind/morecpu.fmf create mode 100644 plans/bind9.16/morecpu.fmf create mode 100644 plans/bind9.18/morecpu.fmf diff --git a/plans/bind/morecpu.fmf b/plans/bind/morecpu.fmf new file mode 100644 index 0000000..3c9fd14 --- /dev/null +++ b/plans/bind/morecpu.fmf @@ -0,0 +1,23 @@ +context: + component: bind +environment: + PACKAGE: bind + +/moremem: + summary: tests with more MEM and CPU + discover: + - name: public + how: fmf + filter: 'tag: morecpu' + url: "https://src.fedoraproject.org/tests/bind.git" + - name: internal + how: fmf + filter: 'tag: morecpu' + url: https://gitlab.com/redhat/rhel/tests/bind + provision: + hardware: + memory: ">= 6 GB" + cpu: + processors: ">= 8" + execute: + how: tmt diff --git a/plans/bind9.16/morecpu.fmf b/plans/bind9.16/morecpu.fmf new file mode 100644 index 0000000..05f9e53 --- /dev/null +++ b/plans/bind9.16/morecpu.fmf @@ -0,0 +1,23 @@ +context: + component: bind9.16 +environment: + PACKAGE: bind9.16 + +/moremem: + summary: tests with more MEM and CPU + discover: + - name: public + how: fmf + filter: 'tag: morecpu' + url: "https://src.fedoraproject.org/tests/bind.git" + - name: internal + how: fmf + filter: 'tag: morecpu' + url: https://gitlab.com/redhat/rhel/tests/bind + provision: + hardware: + memory: ">= 6 GB" + cpu: + processors: ">= 8" + execute: + how: tmt diff --git a/plans/bind9.18/morecpu.fmf b/plans/bind9.18/morecpu.fmf new file mode 100644 index 0000000..d9560b3 --- /dev/null +++ b/plans/bind9.18/morecpu.fmf @@ -0,0 +1,23 @@ +context: + component: bind9.18 +environment: + PACKAGE: bind9.18 + +/moremem: + summary: tests with more MEM and CPU + discover: + - name: public + how: fmf + filter: 'tag: morecpu' + url: "https://src.fedoraproject.org/tests/bind.git" + - name: internal + how: fmf + filter: 'tag: morecpu' + url: https://gitlab.com/redhat/rhel/tests/bind + provision: + hardware: + memory: ">= 6 GB" + cpu: + processors: ">= 8" + execute: + how: tmt From aefeb07f878593d30b61587483e8c7e56b40cd1f Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 26 Feb 2025 08:56:33 +0100 Subject: [PATCH 150/165] add into plan with more mem and cpu --- plans/bind/morecpu.fmf | 2 +- plans/bind9.16/morecpu.fmf | 2 +- plans/bind9.18/morecpu.fmf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plans/bind/morecpu.fmf b/plans/bind/morecpu.fmf index 3c9fd14..58bfb8b 100644 --- a/plans/bind/morecpu.fmf +++ b/plans/bind/morecpu.fmf @@ -3,7 +3,7 @@ context: environment: PACKAGE: bind -/moremem: +/tagmorecpu: summary: tests with more MEM and CPU discover: - name: public diff --git a/plans/bind9.16/morecpu.fmf b/plans/bind9.16/morecpu.fmf index 05f9e53..efcdbe1 100644 --- a/plans/bind9.16/morecpu.fmf +++ b/plans/bind9.16/morecpu.fmf @@ -3,7 +3,7 @@ context: environment: PACKAGE: bind9.16 -/moremem: +/tagmorecpu: summary: tests with more MEM and CPU discover: - name: public diff --git a/plans/bind9.18/morecpu.fmf b/plans/bind9.18/morecpu.fmf index d9560b3..bbe128a 100644 --- a/plans/bind9.18/morecpu.fmf +++ b/plans/bind9.18/morecpu.fmf @@ -3,7 +3,7 @@ context: environment: PACKAGE: bind9.18 -/moremem: +/tagmorecpu: summary: tests with more MEM and CPU discover: - name: public From 81e9b1853d596dd06764d49e4911dcd23c32eca3 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Wed, 26 Feb 2025 09:32:53 +0100 Subject: [PATCH 151/165] add into plan with more mem and cpu --- plans/bind/others.fmf | 4 ++-- plans/bind9.16/others.fmf | 4 ++-- plans/bind9.18/others.fmf | 4 ++-- plans/others.fmf | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plans/bind/others.fmf b/plans/bind/others.fmf index dc53850..b869b00 100644 --- a/plans/bind/others.fmf +++ b/plans/bind/others.fmf @@ -2,7 +2,7 @@ summary: Public other tests discover: how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -moremem' url: "https://src.fedoraproject.org/tests/bind.git" provision: hardware: @@ -18,7 +18,7 @@ summary: Internal other tests discover: how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -moremem' url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false diff --git a/plans/bind9.16/others.fmf b/plans/bind9.16/others.fmf index be4152e..94fac3c 100644 --- a/plans/bind9.16/others.fmf +++ b/plans/bind9.16/others.fmf @@ -2,7 +2,7 @@ summary: Public other tests discover: how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library' + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library & tag: -moremem' url: "https://src.fedoraproject.org/tests/bind.git" execute: how: tmt @@ -16,7 +16,7 @@ summary: Internal other tests discover: how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library' + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library & tag: -moremem' url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf index 248ec7e..33815b8 100644 --- a/plans/bind9.18/others.fmf +++ b/plans/bind9.18/others.fmf @@ -7,7 +7,7 @@ environment: summary: Public other tests discover: how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library' + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library & tag: -moremem' url: "https://src.fedoraproject.org/tests/bind.git" execute: how: tmt @@ -16,7 +16,7 @@ environment: summary: Internal other tests discover: how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library' + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library & tag: -moremem' url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false diff --git a/plans/others.fmf b/plans/others.fmf index 8203a60..30ac53b 100644 --- a/plans/others.fmf +++ b/plans/others.fmf @@ -2,7 +2,7 @@ summary: Public other tests discover: how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -moremem' url: "https://src.fedoraproject.org/tests/bind.git" provision: hardware: @@ -14,7 +14,7 @@ summary: Internal other tests discover: how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -moremem' url: https://gitlab.com/redhat/rhel/tests/bind adjust: enabled: false From 4093372ae516bab0411db49122201a6d503609ab Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 6 Mar 2025 12:13:54 +0100 Subject: [PATCH 152/165] init --- Sanity/named/dnstap-logging/Makefile | 63 +++++++++++++++++++ Sanity/named/dnstap-logging/PURPOSE | 4 ++ Sanity/named/dnstap-logging/main.fmf | 20 ++++++ Sanity/named/dnstap-logging/named.conf | 17 ++++++ Sanity/named/dnstap-logging/runtest.sh | 85 ++++++++++++++++++++++++++ 5 files changed, 189 insertions(+) create mode 100644 Sanity/named/dnstap-logging/Makefile create mode 100644 Sanity/named/dnstap-logging/PURPOSE create mode 100644 Sanity/named/dnstap-logging/main.fmf create mode 100644 Sanity/named/dnstap-logging/named.conf create mode 100755 Sanity/named/dnstap-logging/runtest.sh diff --git a/Sanity/named/dnstap-logging/Makefile b/Sanity/named/dnstap-logging/Makefile new file mode 100644 index 0000000..ee7d5bf --- /dev/null +++ b/Sanity/named/dnstap-logging/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/bind/dnstap-logging +# Description: dnstap logging +# Author: psklenar@redhat.com +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2025 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/bind/dnstap-logging +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: psklenar@redhat.com " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: dnstap logging" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: bind" >> $(METADATA) + @echo "Requires: bind" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/Sanity/named/dnstap-logging/PURPOSE b/Sanity/named/dnstap-logging/PURPOSE new file mode 100644 index 0000000..faa2fa7 --- /dev/null +++ b/Sanity/named/dnstap-logging/PURPOSE @@ -0,0 +1,4 @@ +PURPOSE of /CoreOS/bind/dnstap-logging +Description: dnstap logging +Author: psklenar@redhat.com +Bug summary: dnstap logging diff --git a/Sanity/named/dnstap-logging/main.fmf b/Sanity/named/dnstap-logging/main.fmf new file mode 100644 index 0000000..f162df3 --- /dev/null +++ b/Sanity/named/dnstap-logging/main.fmf @@ -0,0 +1,20 @@ +summary: 'Test for: (dnstap logging)' +description: dnstap logging +contact: Petr Sklenar +test: ./runtest.sh +framework: beakerlib +duration: 15m +enabled: true +tag: + - NoRHEL6 + - NoRHEL7 + - Tier3 + - bind-utils +tier: '3' +adjust+: + - enabled: false + when: distro < rhel-9 + continue: false + - enabled: false + when: distro = rhel-alt-7 + continue: false diff --git a/Sanity/named/dnstap-logging/named.conf b/Sanity/named/dnstap-logging/named.conf new file mode 100644 index 0000000..1f497a3 --- /dev/null +++ b/Sanity/named/dnstap-logging/named.conf @@ -0,0 +1,17 @@ +options { + directory "/var/named"; + + // Enable dnstap logging + dnstap { all; }; + dnstap-output file "/var/named/data/dnstap.bin" versions 2; + + listen-on port 53 { any; }; + allow-query { any; }; + recursion yes; + dnssec-validation no; +}; + +zone "." IN { + type hint; + file "named.ca"; +}; diff --git a/Sanity/named/dnstap-logging/runtest.sh b/Sanity/named/dnstap-logging/runtest.sh new file mode 100755 index 0000000..e525966 --- /dev/null +++ b/Sanity/named/dnstap-logging/runtest.sh @@ -0,0 +1,85 @@ +#!/usr/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/bind/dnstap-logging +# Description: Test for dnstap logging +# Author: psklenar@redhat.com +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2025 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE=${PACKAGE:-bind} + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE || rlDie "Package $PACKAGE not installed" + TESTDIR=$(pwd) + DEFAULT_IF="$(ip a)" + rlLog "Arch: $(arch), PC name: $(hostname), $(hostname -A) User: $(whoami)" + rlLog "$DEFAULT_IF" + + + rlIsRHEL && repos="--enablerepo=rhel-CRB --enablerepo=rhel-buildroot" + rlIsCentOS && repos="--enablerepo=crb" + rlIsRHELLike && rlRun "dnf install -y $(rlGetRecommended) $repos" + rlCheckDependencies + rm -f /var/named/data/dnstap* + + rlPhaseEnd + + rlPhaseStartTest + rlFileBackup /etc/named/conf + cp named.conf /etc/named.conf + rlRun "rlServiceStart named" + sleep 5 + dig @127.0.0.1 fedoraproject.org + dig @127.0.0.1 fedoraproject.org + dig @127.0.0.1 fedoraproject.org + dig @127.0.0.1 ibm.com + dig @127.0.0.1 ibm.com + dig @127.0.0.1 ibm.com + sleep 1 + + rlLog "Is file readable?" + rlLog "`dnstap-read /var/named/data/dnstap.bin|tail`" + rlRun "dnstap-read /var/named/data/dnstapXXX.bin" + if [ $(wc -l < /var/named/data/dnstap.bin) -gt 2 ]; then + rlPass "File has more than 2 lines" + else + rlFail "File has 2 or fewer lines" + fi + + rlLog "rollout logs" + rlRun "rndc dnstap -roll 3" + rlRun "dnstap-read /var/named/data/dnstap.bin.0" + + rlPhaseEnd + + rlPhaseStartCleanup + rlLog 'Cleanup' + rm -f /var/named/data/dnstap.bin.0 /var/named/data/dnstap.bin + rlFileRestore + rlServiceRestore + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From 9b4f7282a7ad26f02fa02b0d49b7c261776b16ea Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Thu, 20 Mar 2025 07:35:25 +0100 Subject: [PATCH 153/165] install deps is not needed --- Sanity/named/dnstap-logging/runtest.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Sanity/named/dnstap-logging/runtest.sh b/Sanity/named/dnstap-logging/runtest.sh index e525966..68beb74 100755 --- a/Sanity/named/dnstap-logging/runtest.sh +++ b/Sanity/named/dnstap-logging/runtest.sh @@ -38,11 +38,6 @@ rlJournalStart rlLog "Arch: $(arch), PC name: $(hostname), $(hostname -A) User: $(whoami)" rlLog "$DEFAULT_IF" - - rlIsRHEL && repos="--enablerepo=rhel-CRB --enablerepo=rhel-buildroot" - rlIsCentOS && repos="--enablerepo=crb" - rlIsRHELLike && rlRun "dnf install -y $(rlGetRecommended) $repos" - rlCheckDependencies rm -f /var/named/data/dnstap* rlPhaseEnd From 075c23ab291caff84d30154d74de082aeb95bd21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 24 Mar 2025 19:04:36 +0100 Subject: [PATCH 154/165] Copy of delv test with modifications --- Sanity/utils/pkcs11-tools/main.fmf | 21 +++ Sanity/utils/pkcs11-tools/runtest.sh | 104 +++++++++++++++ .../utils/pkcs11-tools/setup-named-softhsm.sh | 123 ++++++++++++++++++ 3 files changed, 248 insertions(+) create mode 100644 Sanity/utils/pkcs11-tools/main.fmf create mode 100755 Sanity/utils/pkcs11-tools/runtest.sh create mode 100755 Sanity/utils/pkcs11-tools/setup-named-softhsm.sh diff --git a/Sanity/utils/pkcs11-tools/main.fmf b/Sanity/utils/pkcs11-tools/main.fmf new file mode 100644 index 0000000..7c0daf1 --- /dev/null +++ b/Sanity/utils/pkcs11-tools/main.fmf @@ -0,0 +1,21 @@ +summary: PKCS11 tools and operations test +description: | + Bug summary: PKCS11 key operations using tools + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 +contact: Petr Sklenar +test: ./runtest.sh +framework: beakerlib +duration: 15m +enabled: true +tag: + - TIPpass +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 +adjust+: + - enabled: false + when: distro == rhel-4, rhel-5, rhel-6 + continue: false +recommends+: + - bind-utils + - softhsm + - opensc diff --git a/Sanity/utils/pkcs11-tools/runtest.sh b/Sanity/utils/pkcs11-tools/runtest.sh new file mode 100755 index 0000000..737f6e2 --- /dev/null +++ b/Sanity/utils/pkcs11-tools/runtest.sh @@ -0,0 +1,104 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/bind/Sanity/delv-smoke-test +# Description: Test for BZ#1578128 ([RFE] Provide delv functionality) +# Author: Petr Sklenar +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2019 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +: ${PACKAGE:=bind} +BACKUP_RESOLV="" +SOURCE_RESOLV="/etc/resolv.conf" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE-utils + rlRun "REAL_RESOLV=$(realpath /etc/resolv.conf)" + rlRun "BACKUP_RESOLV=$(mktemp /etc/resolv-XXXXXX.conf)" + rlRun "rm -f $BACKUP_RESOLV" + rlRun -l "hostnamectl" 0-255 "Record type of used machine" + if [ "$REAL_RESOLV" = /run/systemd/resolve/stub-resolv.conf ]; then + rlWarning "systemd-resolved stub detected, temporary switching..." + rlRun "mv /etc/resolv.conf $BACKUP_RESOLV" + SOURCE_RESOLV="/run/systemd/resolve/resolv.conf" + else + rlRun "mv /etc/resolv.conf $BACKUP_RESOLV" + SOURCE_RESOLV="$BACKUP_RESOLV" + fi + rlRun "cp $SOURCE_RESOLV /etc/resolv.conf" + rlRun -l "cat /etc/resolv.conf" + DNSSEC="" + for NS in $(awk '$1 == "nameserver" { print $2 }' /etc/resolv.conf) + do + if dig +dnssec @$NS | grep -q RRSIG; then + rlLog "nameserver $NS supports DNSSEC" + DNSSEC=yes + else + rlLogWarning "nameserver $NS does not support DNSSEC!" + rlRun -l "dig +short @$NS -t txt -c ch -q version.bind" 0 "Query version of server $NS" + rlRun "sed -e '/$NS/ d' -i /etc/resolv.conf" + fi + rlRun -c "dig @$NS | grep -w RRSIG" 1 "Check signatures are not present always on $NS" + done + if [ -z "$DNSSEC" ]; then + DNSSEC=no + rlLogWarning "Infrastructure does not support DNSSEC at all!" + rlRun "cp $SOURCE_RESOLV /etc/resolv.conf" + fi + rlRun -l "cat /etc/resolv.conf" 0 "after modifications" + rlPhaseEnd + + rlPhaseStartTest + rlRun -l -s "delv redhat.com" + rlAssertGrep 'IN' $rlRun_LOG + rlRun -s "delv redhat.com soa +multi" + rlAssertGrep 'serial' $rlRun_LOG + rlRun -s "delv +multi +vtrace" + rlRun "LINES=$(wc -l <$rlRun_LOG)" + rlRun -l "cat $rlRun_LOG" + rlAssertGreater "delv +vtrace should show few lines" "$LINES" "10" + rlRun "delv +vtrace | grep 'fully validated'" + if [ "$DNSSEC" = yes ]; then + rlRun -s "delv" + rlAssertGrep 'fully validated' $rlRun_LOG + rlRun -s "delv example.net" + rlAssertGrep 'fully validated' $rlRun_LOG + rlRun -s "delv +vtrace fedoraproject.org" + rlAssertGrep 'fully validated' $rlRun_LOG + rlAssertGrep 'marking as secure' $rlRun_LOG + + fi + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm -f $rlRun_LOG" + if [ -n "$BACKUP_RESOLV" ]; then + rlRun "rm -f /etc/resolv.conf" + rlRun "mv $BACKUP_RESOLV /etc/resolv.conf" + fi + rlPhaseEnd + +rlJournalPrintText +rlJournalEnd diff --git a/Sanity/utils/pkcs11-tools/setup-named-softhsm.sh b/Sanity/utils/pkcs11-tools/setup-named-softhsm.sh new file mode 100755 index 0000000..a13c91e --- /dev/null +++ b/Sanity/utils/pkcs11-tools/setup-named-softhsm.sh @@ -0,0 +1,123 @@ +#!/bin/sh +# +# This script will initialise token storage of softhsm PKCS11 provider +# in custom location. Is useful to store tokens in non-standard location. +# +# Output can be evaluated from bash, it will prepare it for usage of temporary tokens. +# Recommended use: +# eval $(bash setup-named-softhsm.sh -A) +# + +SOFTHSM2_CONF="$1" +TOKENPATH="$2" +GROUPNAME="$3" +# Do not use this script for real keys worth protection +# This is intended for crypto accelerators using PKCS11 interface. +# Uninitialized token would fail any crypto operation. +PIN=1234 +SO_PIN=1234 +LABEL=rpm + +set -e + +echo_i() +{ + echo "#" $@ +} + +random() +{ + if [ -x "$(which openssl 2>/dev/null)" ]; then + openssl rand -base64 $1 + else + dd if=/dev/urandom bs=1c count=$1 | base64 + fi +} + +usage() +{ + echo "Usage: $0 -A [token directory] [group]" + echo " or: $0 [group]" +} + +if [ "$SOFTHSM2_CONF" = "-A" -a -z "$TOKENPATH" ]; then + TOKENPATH=$(mktemp -d /var/tmp/softhsm-XXXXXX) +fi + +if [ -z "$SOFTHSM2_CONF" -o -z "$TOKENPATH" ]; then + usage >&2 + exit 1 +fi + +if [ "$SOFTHSM2_CONF" = "-A" ]; then + # Automagic mode instead + MODE=secure + SOFTHSM2_CONF="$TOKENPATH/softhsm2.conf" + PIN_SOURCE="$TOKENPATH/pin" + SOPIN_SOURCE="$TOKENPATH/so-pin" + TOKENPATH="$TOKENPATH/tokens" +else + MODE=legacy +fi + +[ -d "$TOKENPATH" ] || mkdir -p "$TOKENPATH" + +umask 0022 + +if ! [ -f "$SOFTHSM2_CONF" ]; then +cat << SED > "$SOFTHSM2_CONF" +# SoftHSM v2 configuration file + +directories.tokendir = ${TOKENPATH} +objectstore.backend = file + +# ERROR, WARNING, INFO, DEBUG +log.level = ERROR + +# If CKF_REMOVABLE_DEVICE flag should be set +slots.removable = false +SED +else + echo_i "Config file $SOFTHSM2_CONF already exists" >&2 +fi + +if [ -n "$PIN_SOURCE" ]; then + touch "$PIN_SOURCE" "$SOPIN_SOURCE" + chmod 0600 "$PIN_SOURCE" "$SOPIN_SOURCE" + if [ -n "$GROUPNAME" ]; then + chgrp "$GROUPNAME" "$PIN_SOURCE" "$SOPIN_SOURCE" + chmod g+r "$PIN_SOURCE" "$SOPIN_SOURCE" + fi +fi + +export SOFTHSM2_CONF + +if softhsm2-util --show-slots | grep 'Initialized:[[:space:]]*yes' > /dev/null +then + echo_i "Token in ${TOKENPATH} is already initialized" >&2 + + [ -f "$PIN_SOURCE" ] && PIN=$(cat "$PIN_SOURCE") + [ -f "$SOPIN_SOURCE" ] && SO_PIN=$(cat "$SOPIN_SOURCE") +else + PIN=$(random 6) + SO_PIN=$(random 18) + if [ -n "$PIN_SOURCE" ]; then + echo -n "$PIN" > "$PIN_SOURCE" + echo -n "$SO_PIN" > "$SOPIN_SOURCE" + fi + + echo_i "Initializing tokens to ${TOKENPATH}..." + softhsm2-util --init-token --free --label "$LABEL" --pin "$PIN" --so-pin "$SO_PIN" | sed -e 's/^/# /' + + if [ -n "$GROUPNAME" ]; then + chgrp -R -- "$GROUPNAME" "$TOKENPATH" + chmod -R -- g=rX,o= "$TOKENPATH" + fi +fi + +echo "export SOFTHSM2_CONF=\"$SOFTHSM2_CONF\"" +echo "export PIN_SOURCE=\"$PIN_SOURCE\"" +echo "export SOPIN_SOURCE=\"$SOPIN_SOURCE\"" +# These are intentionaly not exported +echo "PIN=\"$PIN\"" +echo "SO_PIN=\"$SO_PIN\"" From 673709f10eeb973940eb7da43a39e1cfdd3ec14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 24 Mar 2025 23:16:53 +0100 Subject: [PATCH 155/165] Make test working with used engine --- Sanity/utils/pkcs11-tools/runtest.sh | 151 +++++++++++++++++---------- 1 file changed, 94 insertions(+), 57 deletions(-) diff --git a/Sanity/utils/pkcs11-tools/runtest.sh b/Sanity/utils/pkcs11-tools/runtest.sh index 737f6e2..98e4251 100755 --- a/Sanity/utils/pkcs11-tools/runtest.sh +++ b/Sanity/utils/pkcs11-tools/runtest.sh @@ -1,5 +1,5 @@ #!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k expandtab sts=4 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # runtest.sh of /CoreOS/bind/Sanity/delv-smoke-test @@ -31,73 +31,110 @@ : ${PACKAGE:=bind} BACKUP_RESOLV="" SOURCE_RESOLV="/etc/resolv.conf" +: ${ENGINE:=-E pkcs11} + +make_openssl_conf() { + cat << EOF +HOME = . + +# Use this in order to automatically load providers. +openssl_conf = openssl_init + +[openssl_init] +providers = provider_sect + +[provider_sect] +default = default_sect +pkcs11 = pkcs11_sect + +[default_sect] +activate = 1 + +[pkcs11_sect] +module = ${PROVIDER_MODULE} +pkcs11-module-path = ${SOFTHSM2_MODULE} +pkcs11-module-token-pin = ${PIN_SOURCE} +activate = 1 +EOF +} + +make_localhost_zone() { + cat << 'EOF' +$TTL 10m +@ IN SOA @ rname.invalid. ( + 0 ; serial + 1D ; refresh + 1H ; retry + 1W ; expire + 3H ) ; minimum + NS @ + A 127.0.0.1 + AAAA ::1 + +EOF +} + +pkcs11_tool_object_uri() { + awk '"uri:" == $1 { print $2 }' +} rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE-utils - rlRun "REAL_RESOLV=$(realpath /etc/resolv.conf)" - rlRun "BACKUP_RESOLV=$(mktemp /etc/resolv-XXXXXX.conf)" - rlRun "rm -f $BACKUP_RESOLV" - rlRun -l "hostnamectl" 0-255 "Record type of used machine" - if [ "$REAL_RESOLV" = /run/systemd/resolve/stub-resolv.conf ]; then - rlWarning "systemd-resolved stub detected, temporary switching..." - rlRun "mv /etc/resolv.conf $BACKUP_RESOLV" - SOURCE_RESOLV="/run/systemd/resolve/resolv.conf" - else - rlRun "mv /etc/resolv.conf $BACKUP_RESOLV" - SOURCE_RESOLV="$BACKUP_RESOLV" + + TmpDir="$(mktemp -d)" + SETUP_SOFTHSM=`readlink -f setup-named-softhsm.sh` + SOFTHSM2_MODULE="$(rpm -E '%{_libdir}/pkcs11/libsofthsm2.so')" + PROVIDER_MODULE="$(rpm -E '%{_libdir}/ossl-modules/pkcs11.so')" + # Used by OpenSSL + PKCS11_PROVIDER_MODULE="$SOFTHSM2_MODULE" + export PKCS11_PROVIDER_MODULE PROVIDER_MODULE + export PKCS11_PROVIDER_DEBUG=file:$TmpDir/provider-debug.log,level:2 + + if [ -x "$SOFTHSM2_MODULE" ]; then + export SOFTHSM2_MODULE fi - rlRun "cp $SOURCE_RESOLV /etc/resolv.conf" - rlRun -l "cat /etc/resolv.conf" - DNSSEC="" - for NS in $(awk '$1 == "nameserver" { print $2 }' /etc/resolv.conf) - do - if dig +dnssec @$NS | grep -q RRSIG; then - rlLog "nameserver $NS supports DNSSEC" - DNSSEC=yes - else - rlLogWarning "nameserver $NS does not support DNSSEC!" - rlRun -l "dig +short @$NS -t txt -c ch -q version.bind" 0 "Query version of server $NS" - rlRun "sed -e '/$NS/ d' -i /etc/resolv.conf" - fi - rlRun -c "dig @$NS | grep -w RRSIG" 1 "Check signatures are not present always on $NS" - done - if [ -z "$DNSSEC" ]; then - DNSSEC=no - rlLogWarning "Infrastructure does not support DNSSEC at all!" - rlRun "cp $SOURCE_RESOLV /etc/resolv.conf" - fi - rlRun -l "cat /etc/resolv.conf" 0 "after modifications" + + rlRun "softhsm2-util --show-slots | grep 'Initialized: *yes'" 1 "Check no slot is initialized already" + rlRun "eval $(bash $SETUP_SOFTHSM -A)" 0 "Preparing PKCS#11 token slot" + rlLog "Vars: conf=$SOFTHSM2_CONF pin=$PIN_SOURCE sopin=$SOPIN_SOURCE" + + rlRun "pushd $TmpDir" + rlRun "make_openssl_conf | tee openssl.conf" 0 "Make provider enabled OpenSSL configuration" + rlRun "make_localhost_zone > test.zone" 0 "Create test zone" + export OPENSSL_CONF="$TmpDir/openssl.conf" + rlLog "OPENSSL_CONF=$TmpDir/openssl.conf" rlPhaseEnd - rlPhaseStartTest - rlRun -l -s "delv redhat.com" - rlAssertGrep 'IN' $rlRun_LOG - rlRun -s "delv redhat.com soa +multi" - rlAssertGrep 'serial' $rlRun_LOG - rlRun -s "delv +multi +vtrace" - rlRun "LINES=$(wc -l <$rlRun_LOG)" - rlRun -l "cat $rlRun_LOG" - rlAssertGreater "delv +vtrace should show few lines" "$LINES" "10" - rlRun "delv +vtrace | grep 'fully validated'" - if [ "$DNSSEC" = yes ]; then - rlRun -s "delv" - rlAssertGrep 'fully validated' $rlRun_LOG - rlRun -s "delv example.net" - rlAssertGrep 'fully validated' $rlRun_LOG - rlRun -s "delv +vtrace fedoraproject.org" - rlAssertGrep 'fully validated' $rlRun_LOG - rlAssertGrep 'marking as secure' $rlRun_LOG + rlPhaseStartSetup "Prepare token" + rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -L" 0 "check slots" + rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -T" 0 "check tokens" + rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:2048 --label test-zsk" 0 "generate new pair" + rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:4096 --label test-ksk" 0 "generate new pair" + rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -O" 0 "check objects saved" + rlRun "ZSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN -O --label test-zsk --type privkey | pkcs11_tool_object_uri)" 0 "Obtain slot zsk URI" + rlRun "KSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN -O --label test-ksk --type privkey | pkcs11_tool_object_uri)" 0 "Obtain slot ksk URI" + rlRun "test -n \"$ZSK_URI\"" 0 "Check URI were obtained" + rlRun "test -n \"$KSK_URI\"" 0 "Check URI were obtained" + rlRun "openssl pkey -in '$ZSK_URI?pin-source=$PIN_SOURCE' -check" 0,1 "Test OpenSSL knows the public ZSK key" + rlRun "openssl pkey -in '$KSK_URI?pin-source=$PIN_SOURCE' -check" 0,1 "Test OpenSSL knows the public KSK key" + rlPhaseEnd - fi + rlPhaseStartTest "Test DNSSEC operations on token" + rlRun "dnssec-keyfromlabel -a RSASHA256 $ENGINE -l \"$ZSK_URI?pin-source=$PIN_SOURCE\" test" 0 "Import dnssec ZSK" + rlRun "dnssec-keyfromlabel -a RSASHA256 $ENGINE -l \"$KSK_URI?pin-source=$PIN_SOURCE\" -f KSK test" 0 "Import dnssec KSK" + rlRun "dnssec-signzone $ENGINE -S -o test test.zone" 0 "Create zone signatures" + rlRun "test -e test.zone.signed" 0 "Check signed zone were created." + rlRun "dnssec-verify $ENGINE -o test test.zone.signed" 0 "Check zone were signed ok" + rlRun "named-checkzone test test.zone" + rlRun "named-checkzone test test.zone.signed" + [ "$DEBUG" = y ] && PS1="test-debug $PS1" bash -i rlPhaseEnd rlPhaseStartCleanup - rlRun "rm -f $rlRun_LOG" - if [ -n "$BACKUP_RESOLV" ]; then - rlRun "rm -f /etc/resolv.conf" - rlRun "mv $BACKUP_RESOLV /etc/resolv.conf" - fi + rlRun "softhsm2-util --token rpm --delete-token" + rlRun "popd" + rlRun "rm -rf $TmpDir" rlPhaseEnd rlJournalPrintText From 404dbb9c4cecda180d56c2fa8b6b8e2470c916b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 24 Mar 2025 23:27:44 +0100 Subject: [PATCH 156/165] Explicitly request pkcs11-provider --- Sanity/utils/pkcs11-tools/main.fmf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sanity/utils/pkcs11-tools/main.fmf b/Sanity/utils/pkcs11-tools/main.fmf index 7c0daf1..5542452 100644 --- a/Sanity/utils/pkcs11-tools/main.fmf +++ b/Sanity/utils/pkcs11-tools/main.fmf @@ -2,7 +2,7 @@ summary: PKCS11 tools and operations test description: | Bug summary: PKCS11 key operations using tools Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 -contact: Petr Sklenar +contact: Petr Mensik test: ./runtest.sh framework: beakerlib duration: 15m @@ -19,3 +19,4 @@ recommends+: - bind-utils - softhsm - opensc + - pkcs11-provider From d6837c5fe0e7b477c4a7874229d8bd66510901b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Thu, 27 Mar 2025 14:08:14 +0100 Subject: [PATCH 157/165] Conditionalize usage of engine in a better way Pass engine parameters only when appropriate for given version. Make it simple to switch to provider or engine based testing. --- Sanity/utils/pkcs11-tools/main.fmf | 3 ++- Sanity/utils/pkcs11-tools/runtest.sh | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Sanity/utils/pkcs11-tools/main.fmf b/Sanity/utils/pkcs11-tools/main.fmf index 5542452..0f36b0f 100644 --- a/Sanity/utils/pkcs11-tools/main.fmf +++ b/Sanity/utils/pkcs11-tools/main.fmf @@ -15,8 +15,9 @@ adjust+: - enabled: false when: distro == rhel-4, rhel-5, rhel-6 continue: false -recommends+: +recommend+: - bind-utils + - bind-dnssec-utils - softhsm - opensc - pkcs11-provider diff --git a/Sanity/utils/pkcs11-tools/runtest.sh b/Sanity/utils/pkcs11-tools/runtest.sh index 98e4251..3502a6c 100755 --- a/Sanity/utils/pkcs11-tools/runtest.sh +++ b/Sanity/utils/pkcs11-tools/runtest.sh @@ -31,7 +31,8 @@ : ${PACKAGE:=bind} BACKUP_RESOLV="" SOURCE_RESOLV="/etc/resolv.conf" -: ${ENGINE:=-E pkcs11} +: ${ENGINE:=pkcs11} +: ${USE_ENGINE:=y} make_openssl_conf() { cat << EOF @@ -107,6 +108,8 @@ rlJournalStart rlPhaseEnd rlPhaseStartSetup "Prepare token" + # This test prepares token to be used by the root user, not really complicating it with file access rights. + # It may not emulare properly what is used by named rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -L" 0 "check slots" rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -T" 0 "check tokens" rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:2048 --label test-zsk" 0 "generate new pair" @@ -121,11 +124,15 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest "Test DNSSEC operations on token" - rlRun "dnssec-keyfromlabel -a RSASHA256 $ENGINE -l \"$ZSK_URI?pin-source=$PIN_SOURCE\" test" 0 "Import dnssec ZSK" - rlRun "dnssec-keyfromlabel -a RSASHA256 $ENGINE -l \"$KSK_URI?pin-source=$PIN_SOURCE\" -f KSK test" 0 "Import dnssec KSK" - rlRun "dnssec-signzone $ENGINE -S -o test test.zone" 0 "Create zone signatures" + DNSSEC_ENGINE="" + if [ "$USE_ENGINE" = y ]; then + DNSSEC_ENGINE="-E $ENGINE" + fi + rlRun "dnssec-keyfromlabel -a RSASHA256 $DNSSEC_ENGINE -l \"$ZSK_URI?pin-source=$PIN_SOURCE\" test" 0 "Import dnssec ZSK" + rlRun "dnssec-keyfromlabel -a RSASHA256 $DNSSEC_ENGINE -l \"$KSK_URI?pin-source=$PIN_SOURCE\" -f KSK test" 0 "Import dnssec KSK" + rlRun "dnssec-signzone $DNSSEC_ENGINE -S -o test test.zone" 0 "Create zone signatures" rlRun "test -e test.zone.signed" 0 "Check signed zone were created." - rlRun "dnssec-verify $ENGINE -o test test.zone.signed" 0 "Check zone were signed ok" + rlRun "dnssec-verify $DNSSEC_ENGINE -o test test.zone.signed" 0 "Check zone were signed ok" rlRun "named-checkzone test test.zone" rlRun "named-checkzone test test.zone.signed" [ "$DEBUG" = y ] && PS1="test-debug $PS1" bash -i From 0161c5854db627a6cd99b8fa204d9a909c626337 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Fri, 28 Mar 2025 09:10:01 +0100 Subject: [PATCH 158/165] real numbers from long term run --- Sanity/named/caching-forwarder-dnssec/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sanity/named/caching-forwarder-dnssec/test.sh b/Sanity/named/caching-forwarder-dnssec/test.sh index bc4da20..d4675d0 100755 --- a/Sanity/named/caching-forwarder-dnssec/test.sh +++ b/Sanity/named/caching-forwarder-dnssec/test.sh @@ -266,7 +266,7 @@ for I in {1..5}; do sleep 0.2 done # If more than 3 failures, exit with error - rlAssertLesserOrEqual "Check EMPTY_COUNT is non-zero LESS than 20" "$EMPTY_COUNT" 20 + rlAssertLesserOrEqual "Check EMPTY_COUNT is non-zero LESS than 21" "$EMPTY_COUNT" 21 ################ TEST1=$(dig +multi $LAST_WORKING_KEYID DNSKEY) From 0cb08fa39e46f9e0199d841e63f0c03dc68403ea Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Fri, 28 Mar 2025 09:21:42 +0100 Subject: [PATCH 159/165] its OK --- plans/bind/morecpu.fmf | 4 ++-- plans/bind9.16/morecpu.fmf | 4 ++-- plans/bind9.18/morecpu.fmf | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plans/bind/morecpu.fmf b/plans/bind/morecpu.fmf index 58bfb8b..24a0150 100644 --- a/plans/bind/morecpu.fmf +++ b/plans/bind/morecpu.fmf @@ -16,8 +16,8 @@ environment: url: https://gitlab.com/redhat/rhel/tests/bind provision: hardware: - memory: ">= 6 GB" + memory: ">= 4 GB" cpu: - processors: ">= 8" + processors: ">= 6" execute: how: tmt diff --git a/plans/bind9.16/morecpu.fmf b/plans/bind9.16/morecpu.fmf index efcdbe1..dca2833 100644 --- a/plans/bind9.16/morecpu.fmf +++ b/plans/bind9.16/morecpu.fmf @@ -16,8 +16,8 @@ environment: url: https://gitlab.com/redhat/rhel/tests/bind provision: hardware: - memory: ">= 6 GB" + memory: ">= 4 GB" cpu: - processors: ">= 8" + processors: ">= 6" execute: how: tmt diff --git a/plans/bind9.18/morecpu.fmf b/plans/bind9.18/morecpu.fmf index bbe128a..e753077 100644 --- a/plans/bind9.18/morecpu.fmf +++ b/plans/bind9.18/morecpu.fmf @@ -16,8 +16,8 @@ environment: url: https://gitlab.com/redhat/rhel/tests/bind provision: hardware: - memory: ">= 6 GB" + memory: ">= 4 GB" cpu: - processors: ">= 8" + processors: ">= 6" execute: how: tmt From c789722fec1932cddea81265c3040f51917b424f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 31 Mar 2025 15:19:52 +0200 Subject: [PATCH 160/165] Choose OpenSSL provider or engine automatically Do not rely on manual configuration, choose engine usage for older releases, but switch to provider on recent enough versions. --- Sanity/utils/pkcs11-tools/runtest.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Sanity/utils/pkcs11-tools/runtest.sh b/Sanity/utils/pkcs11-tools/runtest.sh index 3502a6c..a1bea4a 100755 --- a/Sanity/utils/pkcs11-tools/runtest.sh +++ b/Sanity/utils/pkcs11-tools/runtest.sh @@ -32,7 +32,8 @@ BACKUP_RESOLV="" SOURCE_RESOLV="/etc/resolv.conf" : ${ENGINE:=pkcs11} -: ${USE_ENGINE:=y} +# auto to choose based on release, y to force engine usage +: ${USE_ENGINE:=auto} make_openssl_conf() { cat << EOF @@ -54,7 +55,7 @@ activate = 1 [pkcs11_sect] module = ${PROVIDER_MODULE} pkcs11-module-path = ${SOFTHSM2_MODULE} -pkcs11-module-token-pin = ${PIN_SOURCE} +pkcs11-module-token-pin = file:${PIN_SOURCE} activate = 1 EOF } @@ -125,8 +126,16 @@ rlJournalStart rlPhaseStartTest "Test DNSSEC operations on token" DNSSEC_ENGINE="" + if [ "$USE_ENGINE" = auto ]; then + if rlIsRHEL '<10' || rlIsFedora '<32' || rlIsCentOS '<10'; then + USE_ENGINE='y' + fi + fi if [ "$USE_ENGINE" = y ]; then - DNSSEC_ENGINE="-E $ENGINE" + rlLog "Using OpenSSL engine, legacy mode" + DNSSEC_ENGINE="-E $ENGINE" + else + rlLog "Not using engine, using OpenSSL provider" fi rlRun "dnssec-keyfromlabel -a RSASHA256 $DNSSEC_ENGINE -l \"$ZSK_URI?pin-source=$PIN_SOURCE\" test" 0 "Import dnssec ZSK" rlRun "dnssec-keyfromlabel -a RSASHA256 $DNSSEC_ENGINE -l \"$KSK_URI?pin-source=$PIN_SOURCE\" -f KSK test" 0 "Import dnssec KSK" From ce5efed7cb660f62e08da950b340374f47c4136f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Tue, 1 Apr 2025 14:25:14 +0200 Subject: [PATCH 161/165] Fetch URI of pkcs11 object to contain both objects Contain both type=private AND type=public object in URI provided by the test. Both are required for correct operation of provider. Fetch correct URI by using public object, then remove type=public part from the URI. --- Sanity/utils/pkcs11-tools/runtest.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sanity/utils/pkcs11-tools/runtest.sh b/Sanity/utils/pkcs11-tools/runtest.sh index a1bea4a..e15d3ff 100755 --- a/Sanity/utils/pkcs11-tools/runtest.sh +++ b/Sanity/utils/pkcs11-tools/runtest.sh @@ -116,8 +116,10 @@ rlJournalStart rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:2048 --label test-zsk" 0 "generate new pair" rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:4096 --label test-ksk" 0 "generate new pair" rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -O" 0 "check objects saved" - rlRun "ZSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN -O --label test-zsk --type privkey | pkcs11_tool_object_uri)" 0 "Obtain slot zsk URI" - rlRun "KSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN -O --label test-ksk --type privkey | pkcs11_tool_object_uri)" 0 "Obtain slot ksk URI" + rlRun "ZSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE -O --label test-zsk --type pubkey | pkcs11_tool_object_uri)" 0 "Obtain slot zsk URI" + rlRun "KSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE -O --label test-ksk --type pubkey | pkcs11_tool_object_uri)" 0 "Obtain slot ksk URI" + rlRun "ZSK_URI=\"${ZSK_URI%;type=public}\"" 0 "Remove public type from ZSK URI" + rlRun "KSK_URI=\"${KSK_URI%;type=public}\"" 0 "Remove public type from KSK URI" rlRun "test -n \"$ZSK_URI\"" 0 "Check URI were obtained" rlRun "test -n \"$KSK_URI\"" 0 "Check URI were obtained" rlRun "openssl pkey -in '$ZSK_URI?pin-source=$PIN_SOURCE' -check" 0,1 "Test OpenSSL knows the public ZSK key" From f95d760c0faa3e95eaf3a9b2aea02618f5ac3bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 7 Apr 2025 18:45:23 +0200 Subject: [PATCH 162/165] Prepare more separated zone processing --- Sanity/utils/pkcs11-tools/main.fmf | 7 ++- Sanity/utils/pkcs11-tools/runtest.sh | 69 ++++++++++++++++------------ 2 files changed, 44 insertions(+), 32 deletions(-) diff --git a/Sanity/utils/pkcs11-tools/main.fmf b/Sanity/utils/pkcs11-tools/main.fmf index 0f36b0f..de123e1 100644 --- a/Sanity/utils/pkcs11-tools/main.fmf +++ b/Sanity/utils/pkcs11-tools/main.fmf @@ -1,7 +1,9 @@ summary: PKCS11 tools and operations test description: | Bug summary: PKCS11 key operations using tools - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 + Issue link: https://issues.redhat.com/browse/RHEL-33729 + Generate softhsm token RSA keys, each for KSK and ZSK. + Then use bind tools to actually create small signed content and verify it is dnssec compatible. contact: Petr Mensik test: ./runtest.sh framework: beakerlib @@ -10,7 +12,7 @@ enabled: true tag: - TIPpass link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 + - relates: https://issues.redhat.com/browse/RHEL-33729 adjust+: - enabled: false when: distro == rhel-4, rhel-5, rhel-6 @@ -21,3 +23,4 @@ recommend+: - softhsm - opensc - pkcs11-provider + - openssl-engine diff --git a/Sanity/utils/pkcs11-tools/runtest.sh b/Sanity/utils/pkcs11-tools/runtest.sh index e15d3ff..e57646f 100755 --- a/Sanity/utils/pkcs11-tools/runtest.sh +++ b/Sanity/utils/pkcs11-tools/runtest.sh @@ -105,29 +105,9 @@ rlJournalStart rlRun "make_openssl_conf | tee openssl.conf" 0 "Make provider enabled OpenSSL configuration" rlRun "make_localhost_zone > test.zone" 0 "Create test zone" export OPENSSL_CONF="$TmpDir/openssl.conf" - rlLog "OPENSSL_CONF=$TmpDir/openssl.conf" - rlPhaseEnd - - rlPhaseStartSetup "Prepare token" - # This test prepares token to be used by the root user, not really complicating it with file access rights. - # It may not emulare properly what is used by named - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -L" 0 "check slots" - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -T" 0 "check tokens" - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:2048 --label test-zsk" 0 "generate new pair" - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:4096 --label test-ksk" 0 "generate new pair" - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -O" 0 "check objects saved" - rlRun "ZSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE -O --label test-zsk --type pubkey | pkcs11_tool_object_uri)" 0 "Obtain slot zsk URI" - rlRun "KSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE -O --label test-ksk --type pubkey | pkcs11_tool_object_uri)" 0 "Obtain slot ksk URI" - rlRun "ZSK_URI=\"${ZSK_URI%;type=public}\"" 0 "Remove public type from ZSK URI" - rlRun "KSK_URI=\"${KSK_URI%;type=public}\"" 0 "Remove public type from KSK URI" - rlRun "test -n \"$ZSK_URI\"" 0 "Check URI were obtained" - rlRun "test -n \"$KSK_URI\"" 0 "Check URI were obtained" - rlRun "openssl pkey -in '$ZSK_URI?pin-source=$PIN_SOURCE' -check" 0,1 "Test OpenSSL knows the public ZSK key" - rlRun "openssl pkey -in '$KSK_URI?pin-source=$PIN_SOURCE' -check" 0,1 "Test OpenSSL knows the public KSK key" - rlPhaseEnd - - rlPhaseStartTest "Test DNSSEC operations on token" + rlLog "OPENSSL_CONF=$OPENSSL_CONF" DNSSEC_ENGINE="" + OSSL_ENGINE="" if [ "$USE_ENGINE" = auto ]; then if rlIsRHEL '<10' || rlIsFedora '<32' || rlIsCentOS '<10'; then USE_ENGINE='y' @@ -136,17 +116,46 @@ rlJournalStart if [ "$USE_ENGINE" = y ]; then rlLog "Using OpenSSL engine, legacy mode" DNSSEC_ENGINE="-E $ENGINE" + OSSL_ENGINE="-engine $ENGINE" else rlLog "Not using engine, using OpenSSL provider" fi - rlRun "dnssec-keyfromlabel -a RSASHA256 $DNSSEC_ENGINE -l \"$ZSK_URI?pin-source=$PIN_SOURCE\" test" 0 "Import dnssec ZSK" - rlRun "dnssec-keyfromlabel -a RSASHA256 $DNSSEC_ENGINE -l \"$KSK_URI?pin-source=$PIN_SOURCE\" -f KSK test" 0 "Import dnssec KSK" - rlRun "dnssec-signzone $DNSSEC_ENGINE -S -o test test.zone" 0 "Create zone signatures" - rlRun "test -e test.zone.signed" 0 "Check signed zone were created." - rlRun "dnssec-verify $DNSSEC_ENGINE -o test test.zone.signed" 0 "Check zone were signed ok" - rlRun "named-checkzone test test.zone" - rlRun "named-checkzone test test.zone.signed" - [ "$DEBUG" = y ] && PS1="test-debug $PS1" bash -i + rlPhaseEnd + + rlPhaseStartSetup "Prepare token" + # This test prepares token to be used by the root user, not really complicating it with file access rights. + # It may not emulare properly what is used by named + rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -L" 0 "check slots" + rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -T" 0 "check tokens" + rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:2048 --label test-zsk" 0 "generate new pair" + rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:4096 --label test-ksk" 0 "generate new pair" + rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -O" 0 "check objects saved" + rlRun "ZSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE -O --label test-zsk --type pubkey | pkcs11_tool_object_uri)" 0 "Obtain slot zsk URI" + rlRun "KSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE -O --label test-ksk --type pubkey | pkcs11_tool_object_uri)" 0 "Obtain slot ksk URI" + rlRun "ZSK_URI=\"${ZSK_URI%;type=public}\"" 0 "Remove public type from ZSK URI" + rlRun "KSK_URI=\"${KSK_URI%;type=public}\"" 0 "Remove public type from KSK URI" + rlRun "test -n \"$ZSK_URI\"" 0 "Check URI were obtained" + rlRun "test -n \"$KSK_URI\"" 0 "Check URI were obtained" + rlRun "openssl pkey $OSSL_ENGINE -in '$KSK_URI?pin-source=$PIN_SOURCE' -pubout" 0,1 "Test OpenSSL knows the public KSK key" + rlRun "openssl pkey $OSSL_ENGINE -in '$ZSK_URI?pin-source=$PIN_SOURCE' -pubout" 0,1 "Test OpenSSL knows the public ZSK key" + if openssl storeutl -help >& /dev/null; then + rlRun "openssl storeutl $OSSL_ENGINE -text '$KSK_URI?pin-source=$PIN_SOURCE'" 0,1 "Test OpenSSL knows the public KSK key" + rlRun "openssl storeutl $OSSL_ENGINE -text '$ZSK_URI?pin-source=$PIN_SOURCE'" 0,1 "Test OpenSSL knows the public ZSK key" + fi + rlPhaseEnd + + rlPhaseStartTest "Test DNSSEC operations on token" + rlRun "ORIGIN='test'" + rlRun "ZONEFILE='test.zone'" + rlRun "SIGNEDFILE='test.zone.signed'" + rlRun "dnssec-keyfromlabel -a RSASHA256 $DNSSEC_ENGINE -l \"$ZSK_URI?pin-source=$PIN_SOURCE\" $ORIGIN" 0 "Import dnssec ZSK" + rlRun "dnssec-keyfromlabel -a RSASHA256 $DNSSEC_ENGINE -l \"$KSK_URI?pin-source=$PIN_SOURCE\" -f KSK $ORIGIN" 0 "Import dnssec KSK" + rlRun "dnssec-signzone $DNSSEC_ENGINE -S -o $ORIGIN -f $SIGNEDFILE $ZONEFILE" 0 "Create zone signatures" + rlRun "test -e $SIGNEDFILE" 0 "Check signed zone were created." + rlRun "dnssec-verify $DNSSEC_ENGINE -o $ORIGIN $SIGNEDFILE" 0 "Check zone were signed ok" + rlRun "named-checkzone $ORIGIN $ZONEFILE" 0 "Validate input zone file" + rlRun "named-checkzone $ORIGIN $SIGNEDFILE" 0 "Validate signed zone file" + [ "$DEBUG" = y ] && PS1="test-debug $PS1" bash -i rlPhaseEnd rlPhaseStartCleanup From a4e0194f441f8b759dc40fa944dc9a09536d5623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 7 Apr 2025 22:41:15 +0200 Subject: [PATCH 163/165] Disable on rhel7 and 8 pkcs11-tool does not provide URI of token object there. Not simple to convert. Probably could use p11tool from gnutls, which prints URI even there. --- Sanity/utils/pkcs11-tools/main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sanity/utils/pkcs11-tools/main.fmf b/Sanity/utils/pkcs11-tools/main.fmf index de123e1..724fa32 100644 --- a/Sanity/utils/pkcs11-tools/main.fmf +++ b/Sanity/utils/pkcs11-tools/main.fmf @@ -15,7 +15,7 @@ link: - relates: https://issues.redhat.com/browse/RHEL-33729 adjust+: - enabled: false - when: distro == rhel-4, rhel-5, rhel-6 + when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-8 continue: false recommend+: - bind-utils From ac03f67987d658e8a65b839029cbba0e79f70238 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 13 May 2025 12:56:57 +0200 Subject: [PATCH 164/165] only for el10 --- Sanity/utils/pkcs11-tools/main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sanity/utils/pkcs11-tools/main.fmf b/Sanity/utils/pkcs11-tools/main.fmf index 724fa32..7393fd3 100644 --- a/Sanity/utils/pkcs11-tools/main.fmf +++ b/Sanity/utils/pkcs11-tools/main.fmf @@ -15,7 +15,7 @@ link: - relates: https://issues.redhat.com/browse/RHEL-33729 adjust+: - enabled: false - when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-8 + when: distro < rhel-10 continue: false recommend+: - bind-utils From 75486ceb75cb27e163535bcc4416b1559cc68ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 13 Jul 2026 14:09:09 +0200 Subject: [PATCH 165/165] All tests were moved to CentOS Stream gitlab.com: https://gitlab.com/redhat/centos-stream/tests/bind --- .fmf/version | 1 - LICENSE | 339 ---------------- README.md | 26 -- .../Makefile | 64 --- .../PURPOSE | 5 - .../main.fmf | 24 -- .../reproducer.sh | 53 --- .../runtest.sh | 44 --- .../Makefile | 65 --- .../PURPOSE | 5 - .../bad.db | 12 - .../fakeroot.db | 13 - .../main.fmf | 15 - .../runtest.sh | 117 ------ .../Makefile | 64 --- .../PURPOSE | 3 - .../bad.conf | 3 - .../main.fmf | 22 -- .../runtest.sh | 45 --- Regression/note | 0 Sanity/caching-resolver-dnssec/test.sh | 371 ------------------ .../Run-internal-BIND-test-suite/Makefile | 77 ---- .../Run-internal-BIND-test-suite/PURPOSE | 6 - .../bind-systest-filter.sh | 47 --- .../Run-internal-BIND-test-suite/knownerror | 1 - .../Run-internal-BIND-test-suite/main.fmf | 91 ----- .../Run-internal-BIND-test-suite/runtest.sh | 356 ----------------- .../setup-named-softhsm.sh | 123 ------ Sanity/named/bind-dyndb-ldap-rebuild/main.fmf | 13 - Sanity/named/bind-dyndb-ldap-rebuild/test.sh | 51 --- .../named/caching-forwarder-dnssec/main.fmf | 17 - Sanity/named/caching-forwarder-dnssec/test.sh | 306 --------------- Sanity/named/dnstap-logging/Makefile | 63 --- Sanity/named/dnstap-logging/PURPOSE | 4 - Sanity/named/dnstap-logging/main.fmf | 20 - Sanity/named/dnstap-logging/named.conf | 17 - Sanity/named/dnstap-logging/runtest.sh | 80 ---- Sanity/named/geoip-support/Makefile | 63 --- Sanity/named/geoip-support/PURPOSE | 3 - Sanity/named/geoip-support/a | 18 - Sanity/named/geoip-support/b | 18 - Sanity/named/geoip-support/c | 18 - Sanity/named/geoip-support/main.fmf | 30 -- Sanity/named/geoip-support/named.conf | 94 ----- Sanity/named/geoip-support/notes | 42 -- Sanity/named/geoip-support/runtest.sh | 85 ---- Sanity/named/json-support/Makefile | 64 --- Sanity/named/json-support/PURPOSE | 5 - Sanity/named/json-support/main.fmf | 17 - Sanity/named/json-support/readstats.py | 21 - Sanity/named/json-support/runtest.sh | 67 ---- Sanity/named/named-checkzone/Makefile | 63 --- Sanity/named/named-checkzone/PURPOSE | 3 - Sanity/named/named-checkzone/cptest2.tld.db | 30 -- Sanity/named/named-checkzone/main.fmf | 22 -- Sanity/named/named-checkzone/runtest.sh | 47 --- Sanity/utils/delv-smoke-test/Makefile | 64 --- Sanity/utils/delv-smoke-test/PURPOSE | 5 - Sanity/utils/delv-smoke-test/main.fmf | 24 -- Sanity/utils/delv-smoke-test/runtest.sh | 104 ----- Sanity/utils/pkcs11-tools/main.fmf | 26 -- Sanity/utils/pkcs11-tools/runtest.sh | 168 -------- .../utils/pkcs11-tools/setup-named-softhsm.sh | 123 ------ Smoke/IpaInstallAndStart/main.fmf | 16 - Smoke/IpaInstallAndStart/test.sh | 136 ------- .../Makefile | 62 --- .../PURPOSE | 1 - .../main.fmf | 27 -- .../named.conf.MASTER | 21 - .../named.conf.STUB | 26 -- .../petr.god.zone | 16 - .../runtest.sh | 77 ---- dead.package | 2 + main.fmf | 29 -- plans/bind/ci.fmf | 8 - plans/bind/morecpu.fmf | 23 -- plans/bind/others.fmf | 31 -- plans/bind/tier1.fmf | 28 -- plans/bind/tier2-tier3.fmf | 28 -- plans/bind9.16/morecpu.fmf | 23 -- plans/bind9.16/others.fmf | 29 -- plans/bind9.16/tier1.fmf | 28 -- plans/bind9.16/tier2-tier3.fmf | 28 -- plans/bind9.18/morecpu.fmf | 23 -- plans/bind9.18/others.fmf | 30 -- plans/bind9.18/tier1.fmf | 28 -- plans/bind9.18/tier2-tier3.fmf | 28 -- plans/ci.fmf | 8 - plans/others.fmf | 23 -- plans/tier1.fmf | 20 - plans/tier2-tier3.fmf | 20 - 91 files changed, 2 insertions(+), 4604 deletions(-) delete mode 100644 .fmf/version delete mode 100644 LICENSE delete mode 100644 README.md delete mode 100644 Regression/bind-does-not-listen-on-all-addresses-over-TCP/Makefile delete mode 100644 Regression/bind-does-not-listen-on-all-addresses-over-TCP/PURPOSE delete mode 100644 Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf delete mode 100644 Regression/bind-does-not-listen-on-all-addresses-over-TCP/reproducer.sh delete mode 100755 Regression/bind-does-not-listen-on-all-addresses-over-TCP/runtest.sh delete mode 100644 Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/Makefile delete mode 100644 Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/PURPOSE delete mode 100644 Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/bad.db delete mode 100644 Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/fakeroot.db delete mode 100644 Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf delete mode 100755 Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/runtest.sh delete mode 100644 Regression/bz1848169-named-checkconf-cidr-host-bits/Makefile delete mode 100644 Regression/bz1848169-named-checkconf-cidr-host-bits/PURPOSE delete mode 100644 Regression/bz1848169-named-checkconf-cidr-host-bits/bad.conf delete mode 100644 Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf delete mode 100755 Regression/bz1848169-named-checkconf-cidr-host-bits/runtest.sh delete mode 100644 Regression/note delete mode 100755 Sanity/caching-resolver-dnssec/test.sh delete mode 100644 Sanity/named/Run-internal-BIND-test-suite/Makefile delete mode 100644 Sanity/named/Run-internal-BIND-test-suite/PURPOSE delete mode 100755 Sanity/named/Run-internal-BIND-test-suite/bind-systest-filter.sh delete mode 100644 Sanity/named/Run-internal-BIND-test-suite/knownerror delete mode 100644 Sanity/named/Run-internal-BIND-test-suite/main.fmf delete mode 100755 Sanity/named/Run-internal-BIND-test-suite/runtest.sh delete mode 100755 Sanity/named/Run-internal-BIND-test-suite/setup-named-softhsm.sh delete mode 100644 Sanity/named/bind-dyndb-ldap-rebuild/main.fmf delete mode 100755 Sanity/named/bind-dyndb-ldap-rebuild/test.sh delete mode 100644 Sanity/named/caching-forwarder-dnssec/main.fmf delete mode 100755 Sanity/named/caching-forwarder-dnssec/test.sh delete mode 100644 Sanity/named/dnstap-logging/Makefile delete mode 100644 Sanity/named/dnstap-logging/PURPOSE delete mode 100644 Sanity/named/dnstap-logging/main.fmf delete mode 100644 Sanity/named/dnstap-logging/named.conf delete mode 100755 Sanity/named/dnstap-logging/runtest.sh delete mode 100644 Sanity/named/geoip-support/Makefile delete mode 100644 Sanity/named/geoip-support/PURPOSE delete mode 100644 Sanity/named/geoip-support/a delete mode 100644 Sanity/named/geoip-support/b delete mode 100644 Sanity/named/geoip-support/c delete mode 100644 Sanity/named/geoip-support/main.fmf delete mode 100644 Sanity/named/geoip-support/named.conf delete mode 100644 Sanity/named/geoip-support/notes delete mode 100755 Sanity/named/geoip-support/runtest.sh delete mode 100644 Sanity/named/json-support/Makefile delete mode 100644 Sanity/named/json-support/PURPOSE delete mode 100644 Sanity/named/json-support/main.fmf delete mode 100755 Sanity/named/json-support/readstats.py delete mode 100755 Sanity/named/json-support/runtest.sh delete mode 100644 Sanity/named/named-checkzone/Makefile delete mode 100644 Sanity/named/named-checkzone/PURPOSE delete mode 100644 Sanity/named/named-checkzone/cptest2.tld.db delete mode 100644 Sanity/named/named-checkzone/main.fmf delete mode 100755 Sanity/named/named-checkzone/runtest.sh delete mode 100644 Sanity/utils/delv-smoke-test/Makefile delete mode 100644 Sanity/utils/delv-smoke-test/PURPOSE delete mode 100644 Sanity/utils/delv-smoke-test/main.fmf delete mode 100755 Sanity/utils/delv-smoke-test/runtest.sh delete mode 100644 Sanity/utils/pkcs11-tools/main.fmf delete mode 100755 Sanity/utils/pkcs11-tools/runtest.sh delete mode 100755 Sanity/utils/pkcs11-tools/setup-named-softhsm.sh delete mode 100644 Smoke/IpaInstallAndStart/main.fmf delete mode 100755 Smoke/IpaInstallAndStart/test.sh delete mode 100644 Stub/master-and-stub-server-talks-a-bit/Makefile delete mode 100644 Stub/master-and-stub-server-talks-a-bit/PURPOSE delete mode 100644 Stub/master-and-stub-server-talks-a-bit/main.fmf delete mode 100644 Stub/master-and-stub-server-talks-a-bit/named.conf.MASTER delete mode 100644 Stub/master-and-stub-server-talks-a-bit/named.conf.STUB delete mode 100644 Stub/master-and-stub-server-talks-a-bit/petr.god.zone delete mode 100755 Stub/master-and-stub-server-talks-a-bit/runtest.sh create mode 100644 dead.package delete mode 100644 main.fmf delete mode 100644 plans/bind/ci.fmf delete mode 100644 plans/bind/morecpu.fmf delete mode 100644 plans/bind/others.fmf delete mode 100644 plans/bind/tier1.fmf delete mode 100644 plans/bind/tier2-tier3.fmf delete mode 100644 plans/bind9.16/morecpu.fmf delete mode 100644 plans/bind9.16/others.fmf delete mode 100644 plans/bind9.16/tier1.fmf delete mode 100644 plans/bind9.16/tier2-tier3.fmf delete mode 100644 plans/bind9.18/morecpu.fmf delete mode 100644 plans/bind9.18/others.fmf delete mode 100644 plans/bind9.18/tier1.fmf delete mode 100644 plans/bind9.18/tier2-tier3.fmf delete mode 100644 plans/ci.fmf delete mode 100644 plans/others.fmf delete mode 100644 plans/tier1.fmf delete mode 100644 plans/tier2-tier3.fmf diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d159169..0000000 --- a/LICENSE +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/README.md b/README.md deleted file mode 100644 index 11dd5e0..0000000 --- a/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Fedora BIND tests - -Initial part of these test were provided by Red Hat. -They provide Continuous Integration on [Fedora](https://fedoraproject.org) BIND builds and merge requests. -It would be used from [standard-test-roles](https://docs.fedoraproject.org/en-US/ci/standard-test-roles/) interface. - -Basic metadata are in [fmf](https://fmf.readthedocs.io/en/latest/overview.html), -tests are written in [beakerlib](https://github.com/beakerlib/beakerlib). - -Use `fmf show` tool to filter current tests. -Fedora tests moved to [test namespace](https://src.fedoraproject.org/tests/bind) in Fedora Package Sources. - -## Test run - -Container check not yet works, but localhost default is unsafe! -In future, it should be possible to run this testsuite using these commands: - - dnf install -y tmt podman - tmt run - -It is possible to test on local machine. -Testing on temporary machines is suggested, it might change existing configuration! - -To test in on local machine, run: - - tmt run --all provision --how local diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/Makefile b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/Makefile deleted file mode 100644 index b8a90f5..0000000 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP -# Description: Test for BZ#1999691 (bind does not listen on all addresses over TCP) -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer.sh - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1999691 (bind does not listen on all addresses over TCP)" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 15m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind lsof" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1999691" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/PURPOSE b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/PURPOSE deleted file mode 100644 index b3414eb..0000000 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP -Description: Test for BZ#1999691 (bind does not listen on all addresses over TCP) -Author: Petr Sklenar -Bug summary: bind does not listen on all addresses over TCP when listen-on/listen-on-v6 has specific IPs or any listed -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1999691 diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf deleted file mode 100644 index e526c89..0000000 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf +++ /dev/null @@ -1,24 +0,0 @@ -summary: Test for BZ#1999691 (bind does not listen on all addresses over TCP) -description: | - Bug summary: bind does not listen on all addresses over TCP when listen-on/listen-on-v6 has specific IPs or any listed - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1999691 -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -recommend: - - lsof -duration: 15m -enabled: true -tag: - - NoRHEL4 - - NoRHEL5 -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1999691 -adjust+: - - enabled: false - when: distro < rhel-9.0 - continue: false -extra-nitrate: TC#0612648 -extra-summary: /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP -extra-task: /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP -id: 5914328a-2eec-4235-adea-12eb62aaaf79 diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/reproducer.sh b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/reproducer.sh deleted file mode 100644 index f554637..0000000 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/reproducer.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# modified reproducer from upstream issue -# https://gitlab.isc.org/isc-projects/bind9/-/issues/2852 - -# Pause bind on loading this file -mkfifo _bind.nta - -named -g -c <(echo "options { port 5300; listen-on { any; }; listen-on-v6 { any; }; }; controls {};") -n 1 & -NAMED_PID=$! - -sleep 2 -for i in {2..32}; do - sleep 0.05 - sudo ip addr add 127.0.0.$i/32 dev lo - [ "$i" = 6 ] && echo -n '' > _bind.nta && GO=1 -done - -lsof -n -p ${NAMED_PID} | grep :domain -TCP=$(lsof -n -p ${NAMED_PID} | grep 'TCP 127.0.0.' | wc -l) -UDP=$(lsof -n -p ${NAMED_PID} | grep 'UDP 127.0.0.' | wc -l) -echo "TCP: $TCP UDP: $UDP" - -if [ "$DEBUG" = y ]; then - TCPL=$(lsof -n -p ${NAMED_PID} | grep 'TCP 127.0.0.') - UDPL=$(lsof -n -p ${NAMED_PID} | grep 'UDP 127.0.0.') - - cat << EOF -TCP: -${TCPL} - -UDP: -${UDPL} -EOF -fi - -sleep 5 -#echo "Done adding addresses, press ENTER to terminate." -#read - -kill -TERM "${NAMED_PID}" -timeout 5 cat _bind.nta -wait "${NAMED_PID}" -rm -f _bind.nta - -for i in {2..32}; do - sudo ip addr del 127.0.0.$i/32 dev lo -done -echo "TCP: $TCP UDP: $UDP" -if [ "$TCP" -ne "$UDP" ]; then - echo "Mismatching listeners!" - exit 1 -fi - diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/runtest.sh b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/runtest.sh deleted file mode 100755 index 3b89f2c..0000000 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/runtest.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP -# Description: Test for BZ#1999691 (bind does not listen on all addresses over TCP) -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:="bind"} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlPhaseEnd - - rlPhaseStartTest - # see reproducer.sh : - rlRun "bash ./reproducer.sh" - rlPhaseEnd - -rlJournalPrintText -rlJournalEnd diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/Makefile b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/Makefile deleted file mode 100644 index 7c4ce3e..0000000 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key -# Description: Test for BZ#1769876 (BIND stops DNSKEY lookup in get_dst_key() when a) -# Author: Petr Mensik -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE fakeroot.db bad.db - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Mensik " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1769876 (BIND stops DNSKEY lookup in get_dst_key() when a)" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind bind-utils" >> $(METADATA) - @echo "RhtsRequires: library(bind/bind-utils)" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1769876" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/PURPOSE b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/PURPOSE deleted file mode 100644 index 83680ff..0000000 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key -Description: Test for BZ#1769876 (BIND stops DNSKEY lookup in get_dst_key() when a) -Author: Petr Mensik -Bug summary: BIND stops DNSKEY lookup in get_dst_key() when a key with unsupported algorithm is found first -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1769876 diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/bad.db b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/bad.db deleted file mode 100644 index 6d26565..0000000 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/bad.db +++ /dev/null @@ -1,12 +0,0 @@ -$TTL 600 -@ IN SOA @ rname.invalid. ( - 0 ; serial - 1D ; refresh - 1H ; retry - 1W ; expire - 3H ) ; minimum - NS ns.fakeroot. - -h1 A 127.0.0.1 -h2 A 127.0.0.2 - diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/fakeroot.db b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/fakeroot.db deleted file mode 100644 index fb5c596..0000000 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/fakeroot.db +++ /dev/null @@ -1,13 +0,0 @@ -$TTL 600 -@ IN SOA @ rname.invalid. ( - 0 ; serial - 1D ; refresh - 1H ; retry - 1W ; expire - 3H ) ; minimum - NS ns.fakeroot -bad NS ns.fakeroot -bad3 NS ns.fakeroot -localhost. A 127.0.0.1 - AAAA ::1 -ns.fakeroot A 127.0.0.1 diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf deleted file mode 100644 index a6b8093..0000000 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf +++ /dev/null @@ -1,15 +0,0 @@ -summary: Test for BZ#1769876 (BIND stops DNSKEY lookup in get_dst_key() when a) -description: | - Bug summary: BIND stops DNSKEY lookup in get_dst_key() when a key with unsupported algorithm is found first - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1769876 -contact: Petr Mensik -test: ./runtest.sh -framework: beakerlib -duration: 5m -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1769876 -extra-summary: /CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key -extra-task: /CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key -enabled: false -extra-nitrate: TC#0617578 -id: b8609264-51d5-4484-bff1-a9ca60567868 diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/runtest.sh b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/runtest.sh deleted file mode 100755 index 114f115..0000000 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/runtest.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key -# Description: Test for BZ#1769876 (BIND stops DNSKEY lookup in get_dst_key() when a) -# Author: Petr Mensik -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:="bind"} -PHASE=${PHASE:-Test} - -rlJournalStart - rlPhaseStartSetup "Configuring common part" - rlImport "bind/bind-utils" - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "rlServiceStart rngd" - rlFileBackup /etc/named.conf /var/named - rlRun "cp fakeroot.db bad.db /var/named" - rlRun "pushd $TmpDir" - rlPhaseEnd - - if [[ "$PHASE" =~ "Test" ]]; then - rlPhaseStartSetup "Creating local server" - rlRun "sed -e 's/\(listen-on.*\){.*}/\1{ any; }/' -e 's/\(allow-query *\){ localhost; }/\1{ any; }/' -i /etc/named.conf" - cat >> /etc/named.conf << CONF - zone "." IN { - type master; - file "fakeroot.db.signed"; - }; - - zone "bad" IN { - type master; - file "bad.db.signed"; - }; - - zone "bad3" IN { - type master; - file "bad3.db.signed"; - }; - - # Include generated trust anchor - include "root.conf"; -CONF - rlPhaseEnd - - rlPhaseStartTest "Testing local server" - rlRun "pushd /var/named" - rlRun "cp bad.db bad3.db" - rlRun "bad_KSK=$(dnssec-keygen -f KSK -a RSASHA512 -b 2048 bad)" - rlRun "bad_ZSK=$(dnssec-keygen -a ECDSAP256SHA256 -n ZONE -b 2048 bad)" - rlRun "echo '\$INCLUDE $bad_KSK.key' >> bad.db" - rlRun "echo '\$INCLUDE $bad_ZSK.key' >> bad.db" - rlRun "dnssec-signzone -A -k $bad_KSK -z -N INCREMENT -o bad -t bad.db" - - rlRun "bad3_KSK=$(dnssec-keygen -f KSK -a RSASHA512 -b 2048 bad3)" - rlRun "bad3_ZSK=$(dnssec-keygen -a ECDSAP256SHA256 -n ZONE -b 2048 bad3)" - rlRun "echo '\$INCLUDE $bad3_KSK.key' >> bad3.db" - rlRun "echo '\$INCLUDE $bad3_ZSK.key' >> bad3.db" - rlRun "dnssec-signzone -A -k $bad3_KSK -z -3 9911c319070e83f8 -N INCREMENT -o bad3 -t bad3.db" - - rlRun "buZoneGenerateSign -o . -f fakeroot.db -A root" 0 "Generate signed root" - rlRun "rlServiceStart named" - rlRun -s "dig +dnssec +multi @localhost h1.bad." - rlAssertGrep 'status: NOERROR' "$rlRun_LOG" - if [ -x /usr/bin/delv ]; then - rlRun -s "delv @::1 -a root.conf h1.bad." - rlAssertGrep 'fully validated' "$rlRun_LOG" - rlRun -s "delv @::1 -a root.conf h1.bad3." - rlAssertGrep 'fully validated' "$rlRun_LOG" - fi - rlPhaseEnd - fi - - if [[ "$PHASE" =~ "Client" ]]; then - rlPhaseStartSetup "Creating local server" - rlRun "test -n \"$MASTER\"" - rlRun "buFetchManagedKeys . $MASTER > /etc/named/root.conf" - rlRun "echo 'include \"/etc/named/root.conf\";' >> /etc/named.conf" - # FIXME: create forwarding somehow! - rlPhaseEnd - fi - - rlPhaseStartCleanup - [ "$DEBUGTEST" = y ] && PS1="Interrupted test $PS1" bash -i - rm -f $rlRun_LOG - rlRun "rm -f {Kbad.,Kbad3.,K.}+* {bad,bad3}.db" - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlFileRestore - rlRun "rlServiceRestore named" - rlRun "rlServiceRestore rngd" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/Makefile b/Regression/bz1848169-named-checkconf-cidr-host-bits/Makefile deleted file mode 100644 index 419210d..0000000 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits -# Description: What the test does -# Author: Tomas Korbar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2020 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE bad.conf - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Tomas Korbar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: What the test does" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1848169 1865785" >> $(METADATA) - @echo "Releases: RHEL8" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/PURPOSE b/Regression/bz1848169-named-checkconf-cidr-host-bits/PURPOSE deleted file mode 100644 index 985e289..0000000 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits -Description: What the test does -Author: Tomas Korbar diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/bad.conf b/Regression/bz1848169-named-checkconf-cidr-host-bits/bad.conf deleted file mode 100644 index c794774..0000000 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/bad.conf +++ /dev/null @@ -1,3 +0,0 @@ -controls { - inet 172.17.1.98 port 953 allow { 172.17.1.1/24; }; -}; diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf b/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf deleted file mode 100644 index 8a28ac7..0000000 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf +++ /dev/null @@ -1,22 +0,0 @@ -summary: What the test does -description: '' -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -duration: 5m -enabled: true -tag: - - TIPpass - - TIPpass_infra -adjust+: - - enabled: false - when: distro != rhel-8 - continue: false - because: there is an issue https://issues.redhat.com/browse/RHEL-80353 -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1848169 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1865785 -extra-nitrate: TC#0608023 -extra-summary: /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits -extra-task: /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits -id: 911c9541-d475-4f5a-9d33-e31892328a47 diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/runtest.sh b/Regression/bz1848169-named-checkconf-cidr-host-bits/runtest.sh deleted file mode 100755 index f39c94a..0000000 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/runtest.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits -# Description: What the test does -# Author: Tomas Korbar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2020 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:="bind"} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlPhaseEnd - - rlPhaseStartTest - rlRun "named-checkconf ./bad.conf" 0 "Check configuration file" - rlPhaseEnd - - rlPhaseStartCleanup - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Regression/note b/Regression/note deleted file mode 100644 index e69de29..0000000 diff --git a/Sanity/caching-resolver-dnssec/test.sh b/Sanity/caching-resolver-dnssec/test.sh deleted file mode 100755 index adaf00a..0000000 --- a/Sanity/caching-resolver-dnssec/test.sh +++ /dev/null @@ -1,371 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${CLEAN_ANCHORS:=y} -: ${NAMED_OPTIONS:=} -# How many times to check basic root check -: ${BASIC_TRIES:=3} -# How many times to check host checks -: ${HOSTS_TRIES:=3} -# On which host check pass require successful responses? -: ${HOSTS_PASSING:=2} -# Delay after named service start -: ${DELAY_START:=5} -# Delay between tests -: ${DELAY_TEST:=5} - -bu_FALLBACK_SERVERS="8.8.8.8 8.8.4.4 9.9.9.9" -bu_DELV=$(type -p delv 2>/dev/null) -bu_DIG=$(type -p dig 2>/dev/null) -# Servers which failed DNSSEC-awareness check -bu_FAILED_SERVERS="" -bu_ROOT_HINTS=/var/named/named.ca - -buGetRootServerAddresses4() { - local HINTS="${1:-$bu_ROOT_HINTS}" - # a.root-servers.net. 518400 IN A 198.41.0.4 - # A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 - awk -v IGNORECASE=1 -- '$1 ~ /[a-m]\.root-servers\.net\./ && $3 == "A" { print $4 } $3 == "IN" && $4 == "A" { print $5 }' "$HINTS" -} - -buGetRootServerAddresses6() { - local HINTS="${1:-$bu_ROOT_HINTS}" - awk -v IGNORECASE=1 -- '$1 ~ /[a-m]\.root-servers\.net\./ && $3 == "AAAA" { print $4 } $3 == "IN" && $4 == "AAAA" { print $5 }' "$HINTS" -} - -# Get list of nameservers from resolv.conf file on standard output -buGetServersConf() { - local RESOLV_CONF=${1:-/etc/resolv.conf} - awk '$1 == "nameserver" { printf "%s%s", DL, $2; DL=" " }' "$RESOLV_CONF" -} - -# Get list of resolv-conf (like) files, which might contain useful DNS servers -# Ordered in preference, tries to avoid DNSSEC-unaware servers -buGetCandidateResolvConf() { - local -a CONF_FILES=() - systemctl is-active --quiet NetworkManager && CONF_FILES+=("/run/NetworkManager/no-stub-resolv.conf") - systemctl is-active --quiet systemd-resolved && CONF_FILES+=("/run/systemd/resolve/resolv.conf") - CONF_FILES+=("/etc/resolv.conf") - echo "${CONF_FILES[@]}" -} - -# Print list of nameservers addresses, space separated. -# No check on them is done. -buGetNameservers() { - # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly - for CONF in $(buGetCandidateResolvConf) - do - local SERVERS - # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often - if [ -r "$CONF" ] && SERVERS=$(buGetServersConf "$CONF") && [ -n "$SERVERS" ]; then - echo "$SERVERS" - break - fi - done -} - -# Test server IP addresses give as parameters to find those, who -# are security-aware. -# Param1: space separated IP addresses of DNS servers -buCheckSecureNameservers() { - local SERVERS="$1" - bu_SECURE_SERVERS="" - - if [ -z "$bu_DELV" ] && [ -z "$bu_DIG" ]; then - rlFail "Both delv and dig from bind-utils are missing!" - return 1 - fi - for NS in ${SERVERS}; do - # use tcp to fail faster on ipv6 global route not available - if [ -n "$bu_DELV" ]; then - if $bu_DELV +tcp @$NS | grep -q '^; fully validated'; then - bu_SECURE_SERVERS+="$NS " - else - bu_FAILED_SERVERS+="$NS " - fi - elif [ -n "$bu_DIG" ]; then - - if $bu_DIG +tcp +noall +answer +dnssec @$NS | grep -qw RRSIG; then - bu_SECURE_SERVERS+="$NS " - else - bu_FAILED_SERVERS+="$NS " - fi - fi - done - [ -n "$bu_SECURE_SERVERS" ] -} - -# Try to find DNSSEC capable network provided forwarders. -# If that fails try to verify $bu_FALLBACK_SERVERS works and use them. -# If no working server is found, call rlDie to stop the test. -# Outputs found servers into bu_SECURE_SERVERS and bu_FAILED_SERVERS -# variables -buGetSecureNameservers() { - bu_FAILED_SERVERS="" - local SERVERS="" - - # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly - for CONF in $(buGetCandidateResolvConf) - do - # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often - if [ -r "$CONF" ] && SERVERS=$(buGetServersConf "$CONF") && [ -n "$SERVERS" ]; then - rlLogDebug "Checking servers from $CONF..." - buCheckSecureNameservers "$SERVERS" && break - fi - done - if [ -z "${bu_SECURE_SERVERS}${bu_FAILED_SERVERS}" ]; then - rlDie "No nameservers obtained, tried files: $(buGetCandidateResolvConf)" - return 1 - fi - if [ -z "$bu_SECURE_SERVERS" ]; then - rlLog "Found resolv files..." - for CONF in $(buGetCandidateResolvConf) - do - rlRun -l "cat $CONF" - done - rlLog "Versions of network provided nameservers..." - for NS in ${SERVERS} - do - rlRun -l "dig @$NS txt ch version.bind" 0-255 - done - if [ -n "$bu_FALLBACK_SERVERS" ]; then - # If we have access to public DNS servers, use them instead. They are known to support DNSSEC. - buCheckSecureNameservers "$bu_FALLBACK_SERVERS" - rlLogWarning "No network provided servers (${SERVERS}) support DNSSEC! Fix the infrastructure!" - SERVERS+=" $bu_FALLBACK_SERVERS" - fi - fi - if [ -z "$bu_SECURE_SERVERS" ]; then - rlDie "No servers from ${SERVERS} support DNSSEC! Fix the infrastructure!" - return 1 - fi - - if [ -n "$bu_FAILED_SERVERS" ]; then - rlLogWarning "Servers not supporting DNSSEC: ${bu_FAILED_SERVERS}" - fi - rlLogInfo "Found security-aware servers: $bu_SECURE_SERVERS" -} - -# Create bind forwarder configuration from servers entered as parameters -buMakeForwarders() -{ - echo 'forwarders {'; - for NS in "$@" - do - printf "\t%s;\n" $NS - done - echo '}; # autogenerated' -} - -# Prints formatted used options in bind config -buPrintOptions() -{ - named-checkconf -px "$@" | sed -ne '/^options {/,/^};/ p' -} - -# Check whether option in $1 is used in options {} global block -buHasOption() -{ - local OPTION="$1" - buPrintOptions | grep -qw "^\s*${OPTION}" -} - -# Filter dig to print only desired section -# Input is dig output -buDigGetSection() -{ - local SECTION="${1:-ANSWER}" - sed -ne "/^;; ${SECTION} SECTION:/,/^$/ p" | grep -vE '^(\s*$|;.*$)' -} - -# Filter dig to print only desired value from double comment lines -# Input is dig output -buDigGetField() -{ - local FIELD="$1" - grep "^;;.*\s${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" -} - -# Filter dig input to print pseudosection contents only -buDigPseudosection() -{ - sed -ne "/^;; OPT PSEUDOSECTION:/,/^;; QUESTION SECTION/ p" | grep -vE '^;; (OPT PSEUDO|QUESTION )SECTION:' -} - -# Filter dig to print only desired value from single comment lines -# Useful for pseudosection -# Input is dig output -buDigGetField1() -{ - local FIELD="$1" - grep "^;\s\(.*\s\)\?${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" -} - -# just receive any response, no matter what status -buDig() -{ - rlRun -s "dig $*" -} - -# Ensure reply has noerror status -buDigSuccess() -{ - rlRun -s "dig $*" - local STATUS="$(buDigGetField status < $rlRun_LOG)" - rlAssertEquals "Check result was positive" "$STATUS" NOERROR -} - -# Ensure reply is signed and verified -buDigSuccessSecure() -{ - rlRun -s "dig $*" - local STATUS="$(buDigGetField status < $rlRun_LOG)" - rlAssertEquals "Check dig result was positive" "$STATUS" NOERROR - local FLAGS="$(buDigGetField flags < $rlRun_LOG)" - rlRun "echo $FLAGS | grep -w ad" 0 "Check dig result has AD bit set" -} - -# Ensure reply is positive but insecure -buDigSuccessInsecure() -{ - rlRun -s "dig $*" - local STATUS="$(buDigGetField status < $rlRun_LOG)" - rlAssertEquals "Check dig result was positive" "$STATUS" NOERROR - local FLAGS="$(buDigGetField flags < $rlRun_LOG)" - rlRun "echo $FLAGS | grep -vw ad" 0 "Check dig result has AD bit unset" -} - -# Extract KSK key id from dig -buDigKskId() -{ - dig +nocrypto +short -t dnskey "$@" | awk '$1 == 257 { sub("]", "", $7); print $7 }' -} - - -rlJournalStart - rlPhaseStartSetup - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - rlRun "set -o pipefail" - rlRun "named -V" - rlRun "dig -v" - rlFileBackup /etc/named.conf - rlRun "named-checkconf" 0 "Test generated configuration is acccepted" - rlRun "rlServiceStop named" - if [ "$CLEAN_ANCHORS" = y ]; then - rlFileBackup --clean /var/named/dynamic/managed-keys.bind{,.jnl} - rlRun "rm -f /var/named/dynamic/managed-keys.bind{,.jnl}" - fi - rlAssertExists $bu_ROOT_HINTS - # use buCheckSecureNameservers - rlRun "HINTS4=\"$(buGetRootServerAddresses4 $bu_ROOT_HINTS)\"" - rlRun "HINTS6=\"$(buGetRootServerAddresses6 $bu_ROOT_HINTS)\"" - rlRun "HINTS4_NUM=$(echo \"$HINTS4\" | wc -l)" - rlRun "HINTS6_NUM=$(echo \"$HINTS6\" | wc -l)" - HINTS4_WORKS='' - HINTS6_WORKS='' - if [ "$NAMED_OPTIONS" = auto ]; then - # TODO: is this complication desirable? - if [ "$HINTS4_NUM" -gt 0 ] && buCheckSecureNameservers "$HINTS4"; then - SECURE_SERVERS4="$bu_SECURE_SERVERS" - FAILED_SERVERS4="$bu_FAILED_SERVERS" - HINTS4_WORKS=y - fi - if [ "$HINTS6_NUM" -gt 0 ] && buCheckSecureNameservers "$HINTS6"; then - SECURE_SERVERS6="$bu_SECURE_SERVERS" - FAILED_SERVERS6="$bu_FAILED_SERVERS" - [ -n "$FAILED_SERVERS4" ] && bu_FAILED_SERVERS+=" $FAILED_SERVERS4" - [ -n "$SECURE_SERVERS4" ] && bu_SECURE_SERVERS+=" $SECURE_SERVERS4" - HINTS6_WORKS=y - fi - if [ "$HINTS4_WORKS" = y ] && [ -z "$HINTS6_WORKS" ]; then - rlRun "NAMED_OPTIONS='-4'" - elif [ "$HINTS6_WORKS" = y ] && [ -z "$HINTS4_WORKS" ]; then - rlRun "NAMED_OPTIONS='-6'" - else - rlRun "NAMED_OPTIONS=''" - fi - else - rlRun "buCheckSecureNameservers \"$HINTS4 $HINTS6\"" && HINTS4_WORKS=y && HINTS4_WORKS=y - fi - if [ -n "$NAMED_OPTIONS" ]; then - rlFileBackup /etc/sysconfig/named - echo "OPTIONS+=\"$NAMED_OPTIONS\"" >> /etc/sysconfig/named - rlRun "grep OPTIONS /etc/sysconfig/named" - fi - SKIP_TEST='' - if [ -z "$HINTS6_WORKS" ] && [ -z "$HINTS4_WORKS" ] - then - SKIP_TEST=y - rlLogWarning "No root-servers reachable, skipping the test." - fi - WORKING_NUM=0 - for NSIP in ${bu_SECURE_SERVERS}; do - WORKING_NUM=$((WORKING_NUM+1)) - done - rlAssertGreater "Check we have at least some working root servers" "$WORKING_NUM" 5 - rlLog "Working root-servers: $bu_SECURE_SERVERS" - [ -n "$bu_FAILED_SERVERS" ] && rlLogWarning "Failed root-servers: $bu_FAILED_SERVERS" - - HAS_MANAGED_KEYS='' - rndc -h 2>&1 | grep -q 'managed-keys status' && HAS_MANAGED_KEYS='y' - rlPhaseEnd - -if [ "$SKIP_TEST" != y ]; then - -for I in {1..3}; do - rlPhaseStartTest "Basic test #$I" - rlRun "rlServiceStart named" - # give it chance to warm up - sleep ${DELAY_START} - buDigSuccessSecure @localhost . DNSKEY - buDigSuccessSecure @localhost - - KEYID=$(buDigKskId @localhost .) - rlAssertNotEquals "Check keyId is not empty." "$KEYID" "" - rlAssertGreater "Check keyId is non-zero" "$KEYID" 0 - rlRun "rndc secroots" - rlRun "grep \"^./RSASHA256/$KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" - [ "$HAS_MANAGED_KEYS" = y ] && rlRun "rndc managed-keys status" - rlPhaseEnd - sleep ${DELAY_TEST} -done - -DIG_SEC=buDig -DIG_INSEC=buDig - -for I in $(seq $HOSTS_TRIES); do - rlPhaseStartTest "Host tests #$I" - if [ "$I" = "$HOSTS_PASSING" ]; then - DIG_SEC=buDigSuccessSecure - DIG_INSEC=buDigSuccessInsecure - fi - for H in example.{org,com,net} fedoraproject.org isc.org - do - $DIG_SEC @localhost $H A - $DIG_SEC @localhost $H AAAA - done - for H in {org,com,net} - do - $DIG_SEC @localhost $H NS - $DIG_SEC @localhost $H DS - done - for H in {a,d,f}.root-servers.net ipv4only.arpa - do - $DIG_INSEC @localhost $H A - $DIG_INSEC @localhost $H AAAA - done - rlPhaseEnd - sleep ${DELAY_TEST} -done -fi - - rlPhaseStartCleanup - [ "$DEBUG" = y ] && PS1="test-debug $PS1" $SHELL -i - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlFileRestore - rlRun "rlServiceRestore named" - rlPhaseEnd -rlJournalEnd diff --git a/Sanity/named/Run-internal-BIND-test-suite/Makefile b/Sanity/named/Run-internal-BIND-test-suite/Makefile deleted file mode 100644 index ef0d6e4..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Sanity/Run-internal-BIND-test-suite -# Description: Run internal BIND test suite -# Author: Martin Cermak -# Author: Petr Mensik -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 Red Hat, Inc. All rights reserved. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Sanity/Run-internal-BIND-test-suite -export TESTVERSION=1.7 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE knownerror* setup-named-softhsm.sh bind-systest-filter.sh -PACKAGE?=bind - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Run internal BIND test suite" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 14h" >> $(METADATA) - @echo "RunFor: $(PACKAGE)" >> $(METADATA) - @echo "Requires: $(PACKAGE) rpm-build $(PACKAGE)-utils $(PACKAGE)-devel" >> $(METADATA) - @echo "Requires: $(PACKAGE)-pkcs11 $(PACKAGE)-pkcs11-utils softhsm" >> $(METADATA) - @echo "Requires: openssl-devel libtool autoconf" >> $(METADATA) - @echo "Requires: perl perl(Net::DNS) perl(Net::DNS::Nameserver) perl(Time::HiRes)" >> $(METADATA) - @echo "Requires: perl(IO::Socket::INET6)" >> $(METADATA) - @echo "Requires: python3-pytest" >> $(METADATA) - @echo "Requires: libcap-devel libidn-devel libxml2-devel kyua" >> $(METADATA) - @echo "Requires: openldap-devel postgresql-devel" >> $(METADATA) - @echo "Requires: sqlite-devel krb5-devel net-tools iproute" >> $(METADATA) - @echo "Requires: yum-utils dnf-utils rng-tools" >> $(METADATA) - @echo "Requires: gcc-c++" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 642970 1832812 1869502 1956777" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Sanity/named/Run-internal-BIND-test-suite/PURPOSE b/Sanity/named/Run-internal-BIND-test-suite/PURPOSE deleted file mode 100644 index 3fcf82b..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/PURPOSE +++ /dev/null @@ -1,6 +0,0 @@ -PURPOSE of /CoreOS/bind/Sanity/Run-internal-BIND-test-suite -Description: Run internal BIND test suite -Author: Martin Cermak -Bug summary: Run internal BIND test suite -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=642970 - diff --git a/Sanity/named/Run-internal-BIND-test-suite/bind-systest-filter.sh b/Sanity/named/Run-internal-BIND-test-suite/bind-systest-filter.sh deleted file mode 100755 index 8a153a1..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/bind-systest-filter.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This script will filter out output from BINDs tests -# It supports form from BIND 9.9 and BIND 9.11 -# Its purpose is to display only failed tests from list of all tests - -CURRENT_TEST= -CURRENT_OUTPUT= -STATUS_ONLY= - -for P; do - case "$P" in - -s|--status) STATUS_ONLY=yes; shift ;; - esac -done - -cat $@ | while read LINE; do - if [ "${LINE#S:}" != "$LINE" ]; then - CURRENT_TEST=`echo $LINE | cut -d: -f2` - CURRENT_OUTPUT="$LINE"$'\n' - elif [ "${LINE#R:}" != "$LINE" ]; then - # echo "$CURRENT_TEST $LINE" - if [ "${LINE/#R:*:*}" != "$LINE" ]; then - # more recent results contain test name - # R:dlz:FAIL - CURRENT_TEST="${LINE#R:}" - CURRENT_TEST="${CURRENT_TEST/%:*}" - RESULT="${LINE/#*:}" - else - # S:dlz:time - # R:FAIL - RESULT="${LINE/#R*:/}" - fi - if [ "$RESULT" != "PASS" ]; then - if [ -n "$STATUS_ONLY" ]; then - echo "$RESULT $CURRENT_TEST" - else - CURRENT_OUTPUT+="$LINE" - echo "$CURRENT_OUTPUT" - echo - fi - fi - CURRENT_OUTPUT= - else - CURRENT_OUTPUT+="$LINE"$'\n' - fi -done diff --git a/Sanity/named/Run-internal-BIND-test-suite/knownerror b/Sanity/named/Run-internal-BIND-test-suite/knownerror deleted file mode 100644 index f9618b6..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/knownerror +++ /dev/null @@ -1 +0,0 @@ -A:System test dlz diff --git a/Sanity/named/Run-internal-BIND-test-suite/main.fmf b/Sanity/named/Run-internal-BIND-test-suite/main.fmf deleted file mode 100644 index 0e60225..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/main.fmf +++ /dev/null @@ -1,91 +0,0 @@ -summary: Run internal BIND test suite -description: | - Bug summary: Run internal BIND test suite - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=642970 - -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -recommend: - - rpm-build - - softhsm - - openssl-devel - - libtool - - autoconf - - perl - - perl(Net::DNS) - - perl(Net::DNS::Nameserver) - - perl(Time::HiRes) - - perl(IO::Socket::INET6) - - libcap-devel - - libidn2-devel - - libxml2-devel - - openldap-devel - - sqlite-devel - - krb5-devel - - net-tools - - iproute - - yum-utils - - dnf-utils - - rng-tools - - gcc-c++ - - python3-dns - - python3-pytest - - opensc -adjust+: - - enabled: false - when: distro == rhel - continue: false - because: Slightly different copy resides in internal tests. - - recommend+: - - bind-pkcs11 - - bind-pkcs11-utils - when: component is not defined or component == bind - - recommend+: - - pytest - when: component == bind9.16 - - recommend+: - - kyua - when: distro < fedora-37 or distro <= rhel-9 or distro <= centos-9 - because: only bind <=9.16 uses kyua for unit tests - - recommend+: - - postgresql-devel - when: component == bind and distro < fedora-33 or distro < rhel-9 or distro < centos-9 - because: only bind-sdb in bind <=9.11 needs those databases - - recommend+: - - libidn-devel - when: distro < rhel-8 or distro < centos-8 -duration: 14h -enabled: true -tag: - - CI-Tier-1 - - TIPfail - - buildroot - - notier - - notip - - rhel-buildroot - - rhel8-buildroot -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=642970 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1832812 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1869502 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1956777 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=672514 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=703494 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1704328 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1876492 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=623122 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1679766 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1882040 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1683009 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=643012 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1683015 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=906312 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1679307 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1664863 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1832814 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=653817 -extra-nitrate: TC#0126580 -extra-summary: /CoreOS/bind/Sanity/Run-internal-BIND-test-suite -extra-task: /CoreOS/bind/Sanity/Run-internal-BIND-test-suite -id: af6d1878-449e-4577-819a-bef95cc51311 diff --git a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh deleted file mode 100755 index ffbdf16..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Sanity/Run-internal-BIND-test-suite -# Description: Run internal BIND test suite -# Authors: pemensik@redhat.com psklenar@redhat.com mcermak@redhat.com -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 Red Hat, Inc. All rights reserved. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Usable variables: -# override make target to start testing on more threads -# MAKE_TEST='-j4 test' -# Do not clean existing build if already built -# REUSE_BUILD=y -# Make retest faster, skip build if possible -# QUICK=y - -# Include rhts environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} -#USER="user$RANDOM" -USER="nobody" -: ${CORES:=auto} -# Limit maximal number of cores used at the same time. -# May cause more failures. -: ${MAXCORES:=8} -: ${WITHOUT:=--without DOC --without EXPORT_LIBS} -# Override default crypto-policy -: ${CRYPTO_POLICY:=} - -rlJournalStart - rlPhaseStartSetup - #rlRun "useradd $USER" - rlLog "Available entropy: $(cat /proc/sys/kernel/random/entropy_avail)" - rpm -q perl-Net-DNS-Nameserver || yum install -y perl-Net-DNS-Nameserver - rlLog "`rpm -q perl-Net-DNS-Nameserver`" - # package assertions - rlAssertRpm $PACKAGE - rlAssertRpm rpm-build - rlRun "rpm -q $PACKAGE-devel || yum install -y $PACKAGE-devel $PACKAGE-utils" - rlServiceStart "rngd" - rngd -r /dev/urandom -o /dev/random - sleep 60 - rlLog "Available entropy: $(cat /proc/sys/kernel/random/entropy_avail)" - - #pwd - ORIG=`pwd` - FOUNDERROR=`mktemp` - SETUP_SOFTHSM=`readlink -f setup-named-softhsm.sh` - FILTER=`readlink -f bind-systest-filter.sh` - - TAG=generic - if [ -f /etc/os-release ]; then - # extract platform tag - VERSION_ID=`(source /etc/os-release && echo ${ID}-${VERSION_ID})` - TAG=`(source /etc/os-release && echo ${PLATFORM_ID#platform:})` - else - rlIsRHEL '6' && TAG=el6 - fi - - if [ -f "knownerror.$VERSION_ID" ]; then - KNOWNERROR=`readlink -f knownerror.$VERSION_ID` - elif [ -f "knownerror.$TAG" ]; then - KNOWNERROR=`readlink -f knownerror.$TAG` - elif [ -f "knownerror" ]; then - KNOWNERROR=`readlink -f knownerror` - fi - - if [ -z "$CORES" ] || [ "$CORES" = "auto" ]; then - rlRun "CORES=$(lscpu -p | grep -v '^\s*#' | wc -l)" 0 "Get available CPU cores" - [[ CORES -lt 1 ]] && CORES=1 - [[ MAXCORES -gt 0 ]] && [[ CORES -gt MAXCORES ]] && rlRun "CORES=$MAXCORES" 0 "Limit max used cores" - fi - - if [ -n "$QUICK" ]; then - REUSE_BUILD=y - MAKE_TEST="test -j$CORES" - fi - - #tempdir - rlRun "TMPDIR=\`mktemp -d\`" 0 "Creating tmp directory" - rlRun "pushd $TMPDIR" - - if rlIsRHEL '>= 8' && dnf config-manager --help >/dev/null; then - # Some build dependencies are not in repositories enabled - # by default: libidn2-devel, softshm - # 1mt and beaker uses different names for repo, find those present - for REPO in $(dnf -q repolist --disabled {rhel,beaker}-{buildroot,CRB} | awk '$1 != "repo" && $2 != "id" { print $1 }') - do - rlRun "dnf config-manager --set-enabled $REPO" - done - fi - if rlIsRHEL 9; then - CRYPTO_POLICY=DEFAULT:SHA1 - fi - - # topdir - if rlIsRHEL 3 || rlIsRHEL 4 || rlIsRHEL 5; then - TOPDIR="/usr/src/redhat" - else - TOPDIR="/root/rpmbuild" - fi - - # cleanup in topdir - mkdir -p $TOPDIR/{BUILD,SOURCES,SPECS} - if [ "$REUSE_BUILD" != y ] - then - rlRun "rm -rf $TOPDIR/{BUILD,SOURCES,SPECS}/*" - else - rlLog "Not cleaning previous build" - fi - - # download src rpm - BINDVER=$(rpm -q $PACKAGE) - SRPM="${BINDVER%%.$(arch)}.src.rpm" - if [ -f "$ORIG/$SRPM" ]; then - rlLog "Found predownloaded package $ORIG/$SRPM" - rlRun "rpm -i \"$ORIG/$SRPM\"" - else - rlFetchSrcForInstalled "$PACKAGE" - if ! ls ${PACKAGE}*.src.rpm; then - rlRun "yumdownloader --source ${PACKAGE}" 0 "Trying alternative fetch from repository" - rlRun "rpm -i ${PACKAGE}*.src.rpm" - fi - fi - - rlRun "rpm --define '_topdir $TOPDIR' -Uvh *rpm &> $TMPDIR/install.txt" - rlRun "cd $TOPDIR/SPECS" - - # softhsm is no longer in normal repository. Enable idm module on RHEL8 to make softhsm module available - if rlIsRHEL 8 - then - rlLog "this can fail at rhel8 zstream as no module in profiles" - dnf module reset idm:DL1 -y - rlRun "dnf -y module enable idm:DL1" - fi - - if dnf builddep --help >/dev/null; then - SKIP='' - #rhel81 doesnt now --skip-unavailable option - dnf builddep --skip-unavailable --help 2>/dev/null && SKIP="--skip-unavailable" - rlRun "dnf -y builddep -D '_with_SYSTEMTEST 1' --nobest *.spec $SKIP" - elif which yum-builddep; then - rlRun "yum-builddep -y -D '_with_SYSTEMTEST 1' *.spec" - else - rlWarn "there is nor yum-utils neither dnf-utils for install dependencies, ENJOY!" - fi - -#DEBUG smtg - rlRun "rpm -q softhsm || yum install softhsm -y --enablerepo=\*" 0-255 - rlRun "rpm -q perl-IO-Socket-INET6 || yum install -y 'perl(IO::Socket::INET6)' --enablerepo=\*" 0-255 - # stop bind if it is running - service named stop - - if [ -n "$CRYPTO_POLICY" ]; then - rlRun "BACKUP_CRYPTO_POLICY=$(update-crypto-policies --show)" 0 "Store original crypto policy" - rlRun "update-crypto-policies --set $CRYPTO_POLICY" 0 "Change crypto policy" - fi - - SOFTHSM2_MODULE="$(rpm -E '%{_libdir}/pkcs11/libsofthsm2.so')" - if [ -x "$SOFTHSM2_MODULE" ]; then - export SOFTHSM2_MODULE - fi - rlPhaseEnd - - rlPhaseStartTest - rlRun "rpmbuild -bc $WITHOUT --short-circuit --define '__spec_build_pre echo RPM_BUILD_DIR=%{_builddir}; echo RPM_NAME=%{name}; echo RPM_VER=%{version}; echo RPM_REL=%{release}; exit 0' *.spec > $TMPDIR/build.env" 0 "Obtain some build variables" - rlRun "eval $(grep '^\w\+=' $TMPDIR/build.env)" - if [ -z "$RPM_BUILD_DIR" ]; then - RPM_BUILD_DIR=$(rpm -E %_builddir) - fi - if [ -z "$RPM_BUILD_DIR" ]; then - RPM_BUILD_DIR="$TOPDIR/BUILD" - fi - if [ -n "$RPM_NAME" ] && [ -n "$RPM_VER" ]; then - BIND_BUILD="$RPM_BUILD_DIR/$RPM_NAME-$RPM_VER" - else - rlRun "rmdir $RPM_BUILD_DIR/bind*-SPECPARTS" 0-255 "Cleanup specparts" - BIND_BUILD="$(ls -l "$RPM_BUILD_DIR"/bind*)" - fi - - if [ "$REUSE_BUILD" = y ] && [ -d "$BIND_BUILD" ] > /dev/null - then - rlLog "Skipping $PACKAGE build" - else - # rebuild from source - rlRun "rpmbuild -bc $WITHOUT --noclean *.spec &> $TMPDIR/build.txt" 0 "Building bind" - fi - - # the test - rlRun "cd $BIND_BUILD" - - rlLogInfo "Test takes place in `pwd`" - - rlRun "chown -R root ." - - if [ -x "$SETUP_SOFTHSM" ] && type -p pkcs11-tokens; then - rlRun "eval $(bash $SETUP_SOFTHSM -A)" 0 "Preparing PKCS#11 token slot" - rlRun "pkcs11-tokens" 0 "Testing token slot availability" - else - rlLog "PKCS#11 not initialized" - fi - - if [ -d build ]; then - BUILD=build - # In case tests are executed in srcdir, put conf.sh there also - # Happens with 9.18 - rlRun "cp -p $BUILD/bin/tests/system/conf.sh bin/tests/system" - else - BUILD=. - fi - - HOMEPERM=$(stat --printf='%a' "$HOME") - if [ "$HOMEPERM" != "${HOMEPERM%0}" ]; then - # runtime tests under root requires access for nobody user - rlLog "Enabling access to $HOME" - rlRun "chmod o+x \"$HOME\"" - fi - - # required by idna test - export LC_ALL=en_US.UTF-8 - - # bin/tests/system receives logs by mistake, but allow it for now. - rlRun "chgrp -R $USER $BUILD bin/tests/system/" - rlRun "chmod g+rw -R $BUILD bin/tests/system/" - rlRun "pushd $BUILD" - rlRun "ls -l ./bin/tests/system/ifconfig.sh" - rlRun "./bin/tests/system/ifconfig.sh up" 0 "Setup fake network interfaces." - rlRun "chown -R $USER:$USER bin/tests/system/" - - # keep separate results on 9.11+ - rlRun "sed -e 's/testsummary.sh/& -n/' -i bin/tests/system/Makefile" 0 "Modify to keep results" - # dlz test is broken because specific build way we use. It is supported only by named-sdb - # but that is not even tested by testsuite - rlRun "sed -e 's/ dlz / /' -i bin/tests/system/Makefile" 0 "Skip always failing dlz test" - - ###### T:cds:1:A ../conf.sh: line 40: DNSSEC_VARIANT: unbound variable - ###### remove later (today 2021 Aug) - sed -ie 's/set -eu/set -e/' bin/tests/system/cds/setup.sh - - rlRun "chmod a+x bin/tests/system/*.sh" 0 "Ensure all test shell scripts are executable" - UMASK_ORIG=$(umask) - rlRun "umask 0002" - - [ "$DEBUG" = y ] && PS1="pretest-debug $PS1" bash -i - - # Try to fix tssgsig failures on some machines, do not use system kerberos configuration - export KRB5_CONFIG=/dev/null - RHEL9HACK="sudo -u $USER" - set -o pipefail - rlRun "${RHEL9HACK} make ${MAKE_TEST:-test -j$CORES} |& tee $TMPDIR/test.txt" 0-255 "Perform the test, --init-task=/distribution/install/rhel-buildroot is needed" - set +o pipefail - export -n KRB5_CONFIG - rlRun "umask $UMASK_ORIG" 0 "Return original umask" - - # This would catch just errors on 9.11+ - if [ -f bin/tests/system/testsummary.sh ]; then - FAILED_TESTS=`grep '^R:[a-z0-9_-][a-z0-9_-]*:FAIL' $TMPDIR/test.txt | cut -d':' -f2 | sort | xargs echo` - PASSED_TESTS=`grep '^R:[a-z0-9_-][a-z0-9_-]*:PASS' $TMPDIR/test.txt | cut -d':' -f2 | sort | xargs echo` - - # 9.18.29+ uses pytest to run some tests and generates failed output to different place - pushd bin/tests/system - for ONETMPDIR in *_tmp_*/; do - FAILED_TESTS+=" $ONETMPDIR" - done - popd - if [ -n "$FAILED_TESTS" ]; then - rlLog "Failed tests: $FAILED_TESTS" - rlRun "tar czf $TMPDIR/failed-artifacts.tar.gz -C bin/tests/system $FAILED_TESTS" 0 "Archiving failed artifacts in tests" - else - rlLog "No failed tests" - fi - else - FAILED_TESTS=:any: - PASSED_TESTS=:any: - rlRun "tar czf $TMPDIR/failed-artifacts.tar.gz bin/tests/system" 0 "Archiving all system tests" - fi - - - [ "$DEBUG" = y ] && PS1="posttest-debug $PS1" bash -i - rlRun "./bin/tests/system/ifconfig.sh down" 0 "Remove fake network interfaces." - rlRun "popd" - - rlRun "grep -C 10 FAIL $TMPDIR/test.txt" 0-255 "Quickly show the test error (if any)." - rlRun "grep PASS $TMPDIR/test.txt" 0 "Quickly show passed tests." - - #list of failures: - rlRun "$FILTER $TMPDIR/test.txt" 0 "Showing unsuccessful tests" - rlRun "$FILTER -s $TMPDIR/test.txt > $FOUNDERROR" 0 - rlRun "ls $KNOWNERROR $FOUNDERROR $TMPDIR/test.txt" 0 'check if there are needed files' - rlLog "`echo list;cat $FOUNDERROR`" - - FAILED_FOUND="$(grep '^FAIL' $FOUNDERROR | wc -l)" - FAILED_KNOWN="$(wc -l <$KNOWNERROR)" - rlAssertLesserOrEqual "Checking number of found errors is in limits" "$FAILED_FOUND" "$FAILED_KNOWN" - cat $FOUNDERROR | while read STATUS TEST ; do - if [ "$STATUS" = FAIL ]; then - rlRun "grep '$TEST' $KNOWNERROR" 0 "Check $TEST failure is expected" - else - rlLog "$STATUS $TEST" - fi - done - - if [ "$FAILED_TESTS" = ':any:' ] && [ "$FAILED_FOUND" -le "$FAILED_KNOWN" ] - then - # Newer version produces archive only when some error occured - rlLog "No error found, not uploading artifacts" - rm -f "$TMPDIR/failed-artifacts.tar.gz" - fi - if [ "$HOMEPERM" != "${HOMEPERM%0}" ]; then - rlLog "Restoring home access rights to $HOMEPERM" - rlRun "chmod 0${HOMEPERM} \"$HOME\"" - fi - rlPhaseEnd - - rlPhaseStartCleanup "`echo Cores:$CORES;echo ' RESULT_' ;cat $FOUNDERROR|grep 'FAIL'`" - #this phase is only due to report to webUI without needs of open file - rlLog "`echo RESULT_ ;cat $FOUNDERROR|grep FAIL`" - rlPhaseEnd - - rlPhaseStartCleanup - rlBundleLogs "TEST_LOGS" "$TMPDIR/install.txt" "$TMPDIR/builddeps.txt" "$TMPDIR/build.txt" "$TMPDIR/test.txt" - if [ -r "$TMPDIR/failed-artifacts.tar.gz" ]; then - rlFileSubmit "$TMPDIR/failed-artifacts.tar.gz" failed-artifacts.tar.gz - fi - if [ -n "$CRYPTO_POLICY" ]; then - rlRun "update-crypto-policies --set $BACKUP_CRYPTO_POLICY" 0 "Restore original crypto policy" - fi - rlRun "popd" - rlServiceRestore "rngd" - rlRun "rm -r $TMPDIR" 0 "Removing tmp directory" - rlRun "rm -rf $FOUNDERROR" - rlLog "Build contents: $BIND_BUILD" - #rlRun "userdel -f -r $USER" - rlPhaseEnd -rlJournalEnd diff --git a/Sanity/named/Run-internal-BIND-test-suite/setup-named-softhsm.sh b/Sanity/named/Run-internal-BIND-test-suite/setup-named-softhsm.sh deleted file mode 100755 index a13c91e..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/setup-named-softhsm.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh -# -# This script will initialise token storage of softhsm PKCS11 provider -# in custom location. Is useful to store tokens in non-standard location. -# -# Output can be evaluated from bash, it will prepare it for usage of temporary tokens. -# Recommended use: -# eval $(bash setup-named-softhsm.sh -A) -# - -SOFTHSM2_CONF="$1" -TOKENPATH="$2" -GROUPNAME="$3" -# Do not use this script for real keys worth protection -# This is intended for crypto accelerators using PKCS11 interface. -# Uninitialized token would fail any crypto operation. -PIN=1234 -SO_PIN=1234 -LABEL=rpm - -set -e - -echo_i() -{ - echo "#" $@ -} - -random() -{ - if [ -x "$(which openssl 2>/dev/null)" ]; then - openssl rand -base64 $1 - else - dd if=/dev/urandom bs=1c count=$1 | base64 - fi -} - -usage() -{ - echo "Usage: $0 -A [token directory] [group]" - echo " or: $0 [group]" -} - -if [ "$SOFTHSM2_CONF" = "-A" -a -z "$TOKENPATH" ]; then - TOKENPATH=$(mktemp -d /var/tmp/softhsm-XXXXXX) -fi - -if [ -z "$SOFTHSM2_CONF" -o -z "$TOKENPATH" ]; then - usage >&2 - exit 1 -fi - -if [ "$SOFTHSM2_CONF" = "-A" ]; then - # Automagic mode instead - MODE=secure - SOFTHSM2_CONF="$TOKENPATH/softhsm2.conf" - PIN_SOURCE="$TOKENPATH/pin" - SOPIN_SOURCE="$TOKENPATH/so-pin" - TOKENPATH="$TOKENPATH/tokens" -else - MODE=legacy -fi - -[ -d "$TOKENPATH" ] || mkdir -p "$TOKENPATH" - -umask 0022 - -if ! [ -f "$SOFTHSM2_CONF" ]; then -cat << SED > "$SOFTHSM2_CONF" -# SoftHSM v2 configuration file - -directories.tokendir = ${TOKENPATH} -objectstore.backend = file - -# ERROR, WARNING, INFO, DEBUG -log.level = ERROR - -# If CKF_REMOVABLE_DEVICE flag should be set -slots.removable = false -SED -else - echo_i "Config file $SOFTHSM2_CONF already exists" >&2 -fi - -if [ -n "$PIN_SOURCE" ]; then - touch "$PIN_SOURCE" "$SOPIN_SOURCE" - chmod 0600 "$PIN_SOURCE" "$SOPIN_SOURCE" - if [ -n "$GROUPNAME" ]; then - chgrp "$GROUPNAME" "$PIN_SOURCE" "$SOPIN_SOURCE" - chmod g+r "$PIN_SOURCE" "$SOPIN_SOURCE" - fi -fi - -export SOFTHSM2_CONF - -if softhsm2-util --show-slots | grep 'Initialized:[[:space:]]*yes' > /dev/null -then - echo_i "Token in ${TOKENPATH} is already initialized" >&2 - - [ -f "$PIN_SOURCE" ] && PIN=$(cat "$PIN_SOURCE") - [ -f "$SOPIN_SOURCE" ] && SO_PIN=$(cat "$SOPIN_SOURCE") -else - PIN=$(random 6) - SO_PIN=$(random 18) - if [ -n "$PIN_SOURCE" ]; then - echo -n "$PIN" > "$PIN_SOURCE" - echo -n "$SO_PIN" > "$SOPIN_SOURCE" - fi - - echo_i "Initializing tokens to ${TOKENPATH}..." - softhsm2-util --init-token --free --label "$LABEL" --pin "$PIN" --so-pin "$SO_PIN" | sed -e 's/^/# /' - - if [ -n "$GROUPNAME" ]; then - chgrp -R -- "$GROUPNAME" "$TOKENPATH" - chmod -R -- g=rX,o= "$TOKENPATH" - fi -fi - -echo "export SOFTHSM2_CONF=\"$SOFTHSM2_CONF\"" -echo "export PIN_SOURCE=\"$PIN_SOURCE\"" -echo "export SOPIN_SOURCE=\"$SOPIN_SOURCE\"" -# These are intentionaly not exported -echo "PIN=\"$PIN\"" -echo "SO_PIN=\"$SO_PIN\"" diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf deleted file mode 100644 index 8dc7afb..0000000 --- a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf +++ /dev/null @@ -1,13 +0,0 @@ -summary: bind-dyndb-ldap build with current bind-devel -description: | - Checks whether bind-devel is okay to build bind-dyndb-ldap for freeipa. -test: ./test.sh -framework: beakerlib -recommend+: - - bind-devel - - fedpkg -adjust+: - - enabled: false - when: distro == rhel, centos - - enabled: false - when: component is defined and component != bind diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/test.sh b/Sanity/named/bind-dyndb-ldap-rebuild/test.sh deleted file mode 100755 index a4dd96e..0000000 --- a/Sanity/named/bind-dyndb-ldap-rebuild/test.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} - -rlJournalStart - rlPhaseStartSetup - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - rlRun "source /etc/os-release" - case "$ID" in - fedora) - PKG=fedpkg - BRANCH=rawhide - EXTRA_REPOS='' - ;; - centos) - PKG=centpkg - BRANCH=c${VERSION}s - EXTRA_REPOS="--enablerepo=epel --enablerepo=crb" - ;; - rhel) - PKG=rhpkg - BRANCH=rhel-${VERSION}-main - EXTRA_REPOS=" --enablerepo='*CRB' --enablerepo='*buildroot'" - ;; - *) - rlLogFatal "Unsupported distribution $ID" ;; - esac - rlRun "rpm -q $PACKAGE-devel || dnf install -y $EXTRA_REPOS $PACKAGE-devel" - rlRun "rpm -q $PKG || dnf install -y $EXTRA_REPOS $PKG" - rlAssertRpm $PACKAGE-devel - rlRun "$PKG clone -a bind-dyndb-ldap" - rlRun "pushd bind-dyndb-ldap" - rlRun "ls -l *.spec" - rlRun "dnf builddep -y $EXTRA_REPOS *.spec" 0,1 - rlPhaseEnd - - rlPhaseStartTest - rlRun "git checkout $BRANCH" - rlRun "$PKG local" - rlRun "rpm -qpl $(arch)/bind-dyndb-ldap-*.$(arch).rpm | grep bind/ldap.so" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "popd" - rlRun "rm -rf $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalEnd diff --git a/Sanity/named/caching-forwarder-dnssec/main.fmf b/Sanity/named/caching-forwarder-dnssec/main.fmf deleted file mode 100644 index 9df6dd9..0000000 --- a/Sanity/named/caching-forwarder-dnssec/main.fmf +++ /dev/null @@ -1,17 +0,0 @@ -summary: Configure bind as caching and validating forwarder -contact: Petr Sklenar -test: ./test.sh -framework: beakerlib -description: | - Configures named as a caching forwarder. Keep dnssec-validation enabled and try to - workaround for buggy nameservers provided from the network. - - Test signed zones are validated and include ad bit. Check unsigned zones are - missing ad bit in responses. Requires security-aware DNS servers to be supplied by - the network. -recommend+: - - sed - - awk -tier: 2 -extra-nitrate: TC#0617579 -id: 3525bab3-7884-4252-b0ad-1688de267812 diff --git a/Sanity/named/caching-forwarder-dnssec/test.sh b/Sanity/named/caching-forwarder-dnssec/test.sh deleted file mode 100755 index d4675d0..0000000 --- a/Sanity/named/caching-forwarder-dnssec/test.sh +++ /dev/null @@ -1,306 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${CLEAN_ANCHORS:=y} - -bu_FALLBACK_SERVERS="8.8.8.8 8.8.4.4 9.9.9.9" -bu_DELV=$(type -p delv 2>/dev/null) -bu_DIG=$(type -p dig 2>/dev/null) -# Servers which failed DNSSEC-awareness check -bu_FAILED_SERVERS="" - -buGetServersConf() { - local RESOLV_CONF=${1:-/etc/resolv.conf} - awk '$1 == "nameserver" { printf "%s%s", DL, $2; DL=" " }' "$RESOLV_CONF" -} - -# Get list of resolv-conf (like) files, which might contain useful DNS servers -# Ordered in preference, tries to avoid DNSSEC-unaware servers -buGetCandidateResolvConf() { - local -a CONF_FILES=() - systemctl is-active --quiet NetworkManager && CONF_FILES+=("/run/NetworkManager/no-stub-resolv.conf") - systemctl is-active --quiet systemd-resolved && CONF_FILES+=("/run/systemd/resolve/resolv.conf") - CONF_FILES+=("/etc/resolv.conf") - echo "${CONF_FILES[@]}" -} - -# Print list of nameservers addresses, space separated. -# No check on them is done. -buGetNameservers() { - # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly - for CONF in $(buGetCandidateResolvConf) - do - local SERVERS - # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often - if [ -r "$CONF" ] && SERVERS=$(buGetServersConf "$CONF") && [ -n "$SERVERS" ]; then - echo "$SERVERS" - break - fi - done -} - -# Test server IP addresses give as parameters to find those, who -# are security-aware. -# Param1: space separated IP addresses of DNS servers -buCheckSecureNameservers() { - local SERVERS="$1" - bu_SECURE_SERVERS="" - - if [ -z "$bu_DELV" ] && [ -z "$bu_DIG" ]; then - rlFail "Both delv and dig from bind-utils are missing!" - return 1 - fi - for NS in ${SERVERS}; do - if [ -n "$bu_DELV" ]; then - - if $bu_DELV @$NS | grep -q '^; fully validated'; then - bu_SECURE_SERVERS+="$NS " - else - bu_FAILED_SERVERS+="$NS " - fi - elif [ -n "$bu_DIG" ]; then - - if $bu_DIG +noall +answer +dnssec @$NS | grep -qw RRSIG; then - bu_SECURE_SERVERS+="$NS " - else - bu_FAILED_SERVERS+="$NS " - fi - fi - done - [ -n "$bu_SECURE_SERVERS" ] -} - -# Try to find DNSSEC capable network provided forwarders. -# If that fails try to verify $bu_FALLBACK_SERVERS works and use them. -# If no working server is found, call rlDie to stop the test. -# Outputs found servers into bu_SECURE_SERVERS and bu_FAILED_SERVERS -# variables -buGetSecureNameservers() { - bu_FAILED_SERVERS="" - local SERVERS="" - - # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly - for CONF in $(buGetCandidateResolvConf) - do - # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often - if [ -r "$CONF" ] && SERVERS=$(buGetServersConf "$CONF") && [ -n "$SERVERS" ]; then - rlLogDebug "Checking servers from $CONF..." - buCheckSecureNameservers "$SERVERS" && break - fi - done - if [ -z "${bu_SECURE_SERVERS}${bu_FAILED_SERVERS}" ]; then - rlDie "No nameservers obtained, tried files: $(buGetCandidateResolvConf)" - return 1 - fi - if [ -z "$bu_SECURE_SERVERS" ]; then - rlLog "Found resolv files..." - for CONF in $(buGetCandidateResolvConf) - do - rlRun -l "cat $CONF" - done - rlLog "Versions of network provided nameservers..." - for NS in ${SERVERS} - do - rlRun -l "dig @$NS txt ch version.bind" 0-255 - done - if [ -n "$bu_FALLBACK_SERVERS" ]; then - # If we have access to public DNS servers, use them instead. They are known to support DNSSEC. - buCheckSecureNameservers "$bu_FALLBACK_SERVERS" - rlLogWarning "No network provided servers (${SERVERS}) support DNSSEC! Fix the infrastructure!" - SERVERS+=" $bu_FALLBACK_SERVERS" - fi - fi - if [ -z "$bu_SECURE_SERVERS" ]; then - rlDie "No servers from ${SERVERS} support DNSSEC! Fix the infrastructure!" - return 1 - fi - - if [ -n "$bu_FAILED_SERVERS" ]; then - rlLogWarning "Servers not supporting DNSSEC: ${bu_FAILED_SERVERS}" - fi - rlLogInfo "Found security-aware servers: $bu_SECURE_SERVERS" -} - -# Create bind forwarder configuration from servers entered as parameters -buMakeForwarders() -{ - echo 'forwarders {'; - for NS in "$@" - do - printf "\t%s;\n" $NS - done - echo '}; # autogenerated' -} - -# Prints formatted used options in bind config -buPrintOptions() -{ - named-checkconf -px "$@" | sed -ne '/^options {/,/^};/ p' -} - -# Check whether option in $1 is used in options {} global block -buHasOption() -{ - local OPTION="$1" - buPrintOptions | grep -qw "^\s*${OPTION}" -} - -# Filter dig to print only desired section -# Input is dig output -buDigGetSection() -{ - local SECTION="${1:-ANSWER}" - sed -ne "/^;; ${SECTION} SECTION:/,/^$/ p" | grep -vE '^(\s*$|;.*$)' -} - -# Filter dig to print only desired value from double comment lines -# Input is dig output -buDigGetField() -{ - local FIELD="$1" - grep "^;;.*\s${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" -} - -# Filter dig input to print pseudosection contents only -buDigPseudosection() -{ - sed -ne "/^;; OPT PSEUDOSECTION:/,/^;; QUESTION SECTION/ p" | grep -vE '^;; (OPT PSEUDO|QUESTION )SECTION:' -} - -# Filter dig to print only desired value from single comment lines -# Useful for pseudosection -# Input is dig output -buDigGetField1() -{ - local FIELD="$1" - grep "^;\s\(.*\s\)\?${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" -} - -# Ensure reply has noerror status -buDigSuccess() -{ - rlRun -s "dig $*" - local STATUS="$(buDigGetField status < $rlRun_LOG)" - rlAssertEquals "Check result was positive" "$STATUS" NOERROR -} - -# Ensure reply is signed and verified -buDigSuccessSecure() -{ - rlRun -s "dig $*" - local STATUS="$(buDigGetField status < $rlRun_LOG)" - rlAssertEquals "Check dig result was positive" "$STATUS" NOERROR - local FLAGS="$(buDigGetField flags < $rlRun_LOG)" - rlRun "echo $FLAGS | grep -w ad" 0 "Check dig result has AD bit set" -} - -# Ensure reply is positive but insecure -buDigSuccessInsecure() -{ - rlRun -s "dig $*" - local STATUS="$(buDigGetField status < $rlRun_LOG)" - rlAssertEquals "Check dig result was positive" "$STATUS" NOERROR - local FLAGS="$(buDigGetField flags < $rlRun_LOG)" - rlRun "echo $FLAGS | grep -vw ad" 0 "Check dig result has AD bit unset" -} - -# Extract KSK key id from dig -buDigKskId() -{ - dig +nocrypto +short -t dnskey "$@"| tail -n1 | awk '$1 == 257 { sub("]", "", $7); print $7 }' -} - - -rlJournalStart - rlPhaseStartSetup - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - rlRun "set -o pipefail" - rlRun "named -V" - rlRun "dig -v" - rlRun "buGetSecureNameservers" || rlFail "No secure servers obtained" - rlFileBackup --missing-ok /etc/named/forwarders.conf - rlFileBackup /etc/named.conf - rlRun "buMakeForwarders ${bu_SECURE_SERVERS} > /etc/named/forwarders.conf" 0 - if ! buHasOption forwarders; then - rlLog "Inserting include to generated forwarders" - rlRun "sed -i -e '/^s*options\s*{/ a include \"/etc/named/forwarders.conf\";' /etc/named.conf" - fi - rlRun "named-checkconf" 0 "Test generated configuration is acccepted" - rlRun "rlServiceStop named" - if [ "$CLEAN_ANCHORS" = y ]; then - rlFileBackup --missing-ok /var/named/dynamic/managed-keys.bind{,.jnl} - rlRun "rm -f /var/named/dynamic/managed-keys.bind{,.jnl}" - fi - HAS_MANAGED_KEYS='' - rndc -h 2>&1 | grep -q 'managed-keys status' && HAS_MANAGED_KEYS='y' - rlPhaseEnd - -for I in {1..5}; do - rlPhaseStartTest "Basic test #$I" - rlRun "rlServiceStart named" - sleep 5 # this test works randomly - buDigSuccessSecure @localhost . DNSKEY - buDigSuccessSecure @localhost - - #KEYID=$(buDigKskId @localhost .) - #rlAssertGreater "Check $KEYID is non-zero" "$KEYID" 0 - #rlAssertNotEquals "Check keyId is not empty." "$KEYID" "" - -################ - EMPTY_COUNT=0 - KEYID="" - - for i in {1..30}; do - KEYID=$(buDigKskId @localhost .) - - if [[ -z "$KEYID" ]]; then - ((EMPTY_COUNT++)) - rlLog "Attempt $i: Empty result ($EMPTY_COUNT empty so far)" - else - rlLog "Attempt $i: Got KEYID = $KEYID" - LAST_WORKING_KEYID=$KEYID - fi - - sleep 0.2 - done - # If more than 3 failures, exit with error - rlAssertLesserOrEqual "Check EMPTY_COUNT is non-zero LESS than 21" "$EMPTY_COUNT" 21 -################ - - TEST1=$(dig +multi $LAST_WORKING_KEYID DNSKEY) - rlLog "`echo dig_for_dnskey;echo $TEST1`" - rlRun "rndc secroots" - rlRun "grep \"^./RSASHA256/$LAST_WORKING_KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" - [ "$HAS_MANAGED_KEYS" = y ] && rlRun "rndc managed-keys status" - rlPhaseEnd -done - - rlPhaseStartTest "Host tests #$I" - for H in example.{org,com,net} fedoraproject.org isc.org - do - buDigSuccessSecure @localhost $H A - buDigSuccessSecure @localhost $H AAAA - done - for H in {org,com,net} - do - buDigSuccessSecure @localhost $H NS - buDigSuccessSecure @localhost $H DS - done - for H in {a,d,f}.root-servers.net ipv4only.arpa - do - buDigSuccessInsecure @localhost $H A - buDigSuccessInsecure @localhost $H AAAA - done - rlPhaseEnd - - rlPhaseStartCleanup - [ "$DEBUG" = y ] && PS1="test-debug $PS1" $SHELL -i - rlRun "popd" - rlRun "rm -f /etc/named/forwarders.conf" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlFileRestore - rlRun "rlServiceRestore named" - rlPhaseEnd -rlJournalEnd diff --git a/Sanity/named/dnstap-logging/Makefile b/Sanity/named/dnstap-logging/Makefile deleted file mode 100644 index ee7d5bf..0000000 --- a/Sanity/named/dnstap-logging/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/dnstap-logging -# Description: dnstap logging -# Author: psklenar@redhat.com -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2025 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/dnstap-logging -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: psklenar@redhat.com " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: dnstap logging" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Sanity/named/dnstap-logging/PURPOSE b/Sanity/named/dnstap-logging/PURPOSE deleted file mode 100644 index faa2fa7..0000000 --- a/Sanity/named/dnstap-logging/PURPOSE +++ /dev/null @@ -1,4 +0,0 @@ -PURPOSE of /CoreOS/bind/dnstap-logging -Description: dnstap logging -Author: psklenar@redhat.com -Bug summary: dnstap logging diff --git a/Sanity/named/dnstap-logging/main.fmf b/Sanity/named/dnstap-logging/main.fmf deleted file mode 100644 index f162df3..0000000 --- a/Sanity/named/dnstap-logging/main.fmf +++ /dev/null @@ -1,20 +0,0 @@ -summary: 'Test for: (dnstap logging)' -description: dnstap logging -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -duration: 15m -enabled: true -tag: - - NoRHEL6 - - NoRHEL7 - - Tier3 - - bind-utils -tier: '3' -adjust+: - - enabled: false - when: distro < rhel-9 - continue: false - - enabled: false - when: distro = rhel-alt-7 - continue: false diff --git a/Sanity/named/dnstap-logging/named.conf b/Sanity/named/dnstap-logging/named.conf deleted file mode 100644 index 1f497a3..0000000 --- a/Sanity/named/dnstap-logging/named.conf +++ /dev/null @@ -1,17 +0,0 @@ -options { - directory "/var/named"; - - // Enable dnstap logging - dnstap { all; }; - dnstap-output file "/var/named/data/dnstap.bin" versions 2; - - listen-on port 53 { any; }; - allow-query { any; }; - recursion yes; - dnssec-validation no; -}; - -zone "." IN { - type hint; - file "named.ca"; -}; diff --git a/Sanity/named/dnstap-logging/runtest.sh b/Sanity/named/dnstap-logging/runtest.sh deleted file mode 100755 index 68beb74..0000000 --- a/Sanity/named/dnstap-logging/runtest.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/dnstap-logging -# Description: Test for dnstap logging -# Author: psklenar@redhat.com -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2025 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE=${PACKAGE:-bind} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE || rlDie "Package $PACKAGE not installed" - TESTDIR=$(pwd) - DEFAULT_IF="$(ip a)" - rlLog "Arch: $(arch), PC name: $(hostname), $(hostname -A) User: $(whoami)" - rlLog "$DEFAULT_IF" - - rm -f /var/named/data/dnstap* - - rlPhaseEnd - - rlPhaseStartTest - rlFileBackup /etc/named/conf - cp named.conf /etc/named.conf - rlRun "rlServiceStart named" - sleep 5 - dig @127.0.0.1 fedoraproject.org - dig @127.0.0.1 fedoraproject.org - dig @127.0.0.1 fedoraproject.org - dig @127.0.0.1 ibm.com - dig @127.0.0.1 ibm.com - dig @127.0.0.1 ibm.com - sleep 1 - - rlLog "Is file readable?" - rlLog "`dnstap-read /var/named/data/dnstap.bin|tail`" - rlRun "dnstap-read /var/named/data/dnstapXXX.bin" - if [ $(wc -l < /var/named/data/dnstap.bin) -gt 2 ]; then - rlPass "File has more than 2 lines" - else - rlFail "File has 2 or fewer lines" - fi - - rlLog "rollout logs" - rlRun "rndc dnstap -roll 3" - rlRun "dnstap-read /var/named/data/dnstap.bin.0" - - rlPhaseEnd - - rlPhaseStartCleanup - rlLog 'Cleanup' - rm -f /var/named/data/dnstap.bin.0 /var/named/data/dnstap.bin - rlFileRestore - rlServiceRestore - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/named/geoip-support/Makefile b/Sanity/named/geoip-support/Makefile deleted file mode 100644 index 8b07309..0000000 --- a/Sanity/named/geoip-support/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Sanity/geoip-support -# Description: it tries more ip address from more locations -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Sanity/geoip-support -export TESTVERSION=1.1 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE a b c named.conf - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: it tries more ip address from more locations" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 66m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind libmaxminddb libmaxminddb-devel geolite2-country geolite2-city bind-utils" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Sanity/named/geoip-support/PURPOSE b/Sanity/named/geoip-support/PURPOSE deleted file mode 100644 index 63efa2b..0000000 --- a/Sanity/named/geoip-support/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/bind/Sanity/geoip-support -Description: it tries more ip address from more locations -Author: Petr Sklenar diff --git a/Sanity/named/geoip-support/a b/Sanity/named/geoip-support/a deleted file mode 100644 index 78f7038..0000000 --- a/Sanity/named/geoip-support/a +++ /dev/null @@ -1,18 +0,0 @@ -$ORIGIN petr.god. -$TTL 86400 -@ IN SOA dns.petr.god. hostmaster.petr.god. ( - 100 ; serial - 21600 ; - 3600 ; - 604800 ; - 86400 ) ; - - IN NS dns.petr.god. -dns IN A 127.0.0.1 -mail IN CNAME dns -petr.god. IN TXT "zone-a" -test1 IN A 1.1.1.1 -test2 IN A 1.1.1.2 -test3 IN A 1.1.1.3 -geo IN TXT "geo A" - diff --git a/Sanity/named/geoip-support/b b/Sanity/named/geoip-support/b deleted file mode 100644 index 0b6f3a6..0000000 --- a/Sanity/named/geoip-support/b +++ /dev/null @@ -1,18 +0,0 @@ -$ORIGIN petr.god. -$TTL 86400 -@ IN SOA dns.petr.god. hostmaster.petr.god. ( - 100 ; serial - 21600 ; - 3600 ; - 604800 ; - 86400 ) ; - - IN NS dns.petr.god. -dns IN A 127.0.0.1 -mail IN CNAME dns -petr.god. IN TXT "zone-b" -test1 IN A 2.2.2.1 -test2 IN A 2.2.2.2 -test3 IN A 2.2.2.3 -geo IN TXT "geo B" - diff --git a/Sanity/named/geoip-support/c b/Sanity/named/geoip-support/c deleted file mode 100644 index d513427..0000000 --- a/Sanity/named/geoip-support/c +++ /dev/null @@ -1,18 +0,0 @@ -$ORIGIN petr.god. -$TTL 86400 -@ IN SOA dns.petr.god. hostmaster.petr.god. ( - 100 ; serial - 21600 ; - 3600 ; - 604800 ; - 86400 ) ; - - IN NS dns.petr.god. -dns IN A 127.0.0.1 -mail IN CNAME dns -petr.god. IN TXT "zone-c" -test1 IN A 3.3.3.1 -test2 IN A 3.3.3.2 -test3 IN A 3.3.3.3 -geo IN TXT "geo C" - diff --git a/Sanity/named/geoip-support/main.fmf b/Sanity/named/geoip-support/main.fmf deleted file mode 100644 index 502989a..0000000 --- a/Sanity/named/geoip-support/main.fmf +++ /dev/null @@ -1,30 +0,0 @@ -summary: it tries more ip address from more locations -tier: '1' -description: '' -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -recommend: - - libmaxminddb - - libmaxminddb-devel - - geolite2-country - - geolite2-city -duration: 66m -enabled: true -tag: - - NoRHEL4 - - NoRHEL5 - - TIPfail_infra - - TIPpass - - bind9.16 - - bind9.18 -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1564443 -adjust+: - - enabled: false - when: distro < rhel-8 - continue: false -extra-nitrate: TC#0604089 -extra-summary: /CoreOS/bind/Sanity/geoip-support -extra-task: /CoreOS/bind/Sanity/geoip-support -id: e930061a-c2d5-4369-a2a3-5b02d29e75eb diff --git a/Sanity/named/geoip-support/named.conf b/Sanity/named/geoip-support/named.conf deleted file mode 100644 index 9918c15..0000000 --- a/Sanity/named/geoip-support/named.conf +++ /dev/null @@ -1,94 +0,0 @@ -// -// named.conf -// -// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS -// server as a caching only nameserver (as a localhost DNS resolver only). -// -// See /usr/share/doc/bind*/sample/ for example named configuration files. -// -// See the BIND Administrator's Reference Manual (ARM) for details about the -// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html - -options { - listen-on port 53 { 127.0.0.1; }; - listen-on-v6 port 53 { ::1; }; - directory "/var/named"; - dump-file "/var/named/data/cache_dump.db"; - statistics-file "/var/named/data/named_stats.txt"; - memstatistics-file "/var/named/data/named_mem_stats.txt"; - recursing-file "/var/named/data/named.recursing"; - secroots-file "/var/named/data/named.secroots"; - allow-query { any; }; - - /* - - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion. - - If you are building a RECURSIVE (caching) DNS server, you need to enable - recursion. - - If your recursive DNS server has a public IP address, you MUST enable access - control to limit queries to your legitimate users. Failing to do so will - cause your server to become part of large scale DNS amplification - attacks. Implementing BCP38 within your network would greatly - reduce such attack surface - */ - recursion yes; - - dnssec-validation yes; - - /* Path to ISC DLV key */ - bindkeys-file "/etc/named.root.key"; - - managed-keys-directory "/var/named/dynamic"; - - pid-file "/run/named/named.pid"; - session-keyfile "/run/named/session.key"; - geoip-directory "/usr/share/GeoIP"; -}; - -acl "geoname" { - geoip country US; -// geoip region CA; -// geoip city "Redwood City"; /* names, etc., must be quoted if they contain spaces */ -}; - -acl "tibet" { - geoip country CN; -}; - - - -view "geoname" { - match-clients { geoname;}; - zone "petr.god." { - file "a"; - type master; - }; -}; - -view "tibet" { - match-clients { tibet;}; - zone "petr.god." { - file "c"; - type master; - }; -}; - - -view "default" { - zone "petr.god." { - file "b"; - type master; - }; -}; - - - -logging { - channel default_debug { - file "data/named.run"; - severity dynamic; - }; -}; - -// include "/etc/named.rfc1912.zones"; -include "/etc/named.root.key"; - diff --git a/Sanity/named/geoip-support/notes b/Sanity/named/geoip-support/notes deleted file mode 100644 index 515d24d..0000000 --- a/Sanity/named/geoip-support/notes +++ /dev/null @@ -1,42 +0,0 @@ -bind-9.11.10-1.fc30.x86_64 -geolite2-country-20190806-1.fc30.noarch -libmaxminddb-devel -### tool mmdblookup ^ -libmaxminddb - - - 4 yum install libmax\* - 75 yum install geolite2-city a geolite2-country - 76 yum install geolite2-city geolite2-country - - -my NS with 4.3.2.1 - XY ip netns add blue - 12 ip link add cosi0 type veth peer name cosi1 - 15 ip link set cosi0 netns blue - 16 ip a - 17 ip addr add 192.168.88.1 dev cosi1@if6 - 18 ip addr add 192.168.88.1 dev cosi1 - - - -############# -mmdblookup --file /usr/share/GeoIP/GeoLite2-City.mmdb --ip 4.3.2.1 -.... - "country": - { - "geoname_id": - 6252001 - "iso_code": - "US" - "names": - -.....blabla - - - -[root@host-10-0-136-254 smoke-high-load]# dig -b 10.0.136.254 @127.0.0.1 test1.petr.god +short -192.168.122.222 -[root@host-10-0-136-254 smoke-high-load]# dig -b 4.3.2.1 @127.0.0.1 test1.petr.god +short -192.168.122.2 - diff --git a/Sanity/named/geoip-support/runtest.sh b/Sanity/named/geoip-support/runtest.sh deleted file mode 100755 index e99b9a7..0000000 --- a/Sanity/named/geoip-support/runtest.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Sanity/geoip-support -# Description: it tries more ip address from more locations -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlLog "PACKAGE=`echo $PACKAGE`" - - rlFileBackup /etc/named.conf /var/named/a /var/named/b - rlPhaseEnd - - rlPhaseStartSetup 'files' - rlRun "cp named.conf /etc/named.conf" - - rlRun "cp a /var/named/a" - rlRun "cp b /var/named/b" - rlRun "cp c /var/named/c" - chown root.named /var/named/a - chown root.named /var/named/b - chown root.named /var/named/c - rlRun "rlServiceStart named" - - rlPhaseEnd - - rlPhaseStartSetup 'net' - ip netns add blue - ip link add cosi0 type veth peer name cosi1 - ip link set cosi0 netns blue - ip addr add 4.3.2.1 dev cosi1 - ip addr add 222.19.68.0 dev cosi1 - - rlRun 'ip a|grep 222.19.68.0' - rlRun 'ip a|grep 4.3.2.1' - - rlPhaseEnd - - rlPhaseStartTest 'dig' - rlRun "dig -b 4.3.2.1 @127.0.0.1 test1.petr.god +short | grep '1.1.1.1'" - rlRun "dig -b 127.0.0.1 @127.0.0.1 test1.petr.god +short | grep '2.2.2.1'" - rlRun "dig -b 222.19.68.0 @127.0.0.1 test1.petr.god +short | grep '3.3.3.1'" - - rlRun "dig -b 4.3.2.1 +short @127.0.0.1 geo.petr.god TXT | grep 'geo A'" - rlRun "dig -b 222.19.68.0 +short @127.0.0.1 geo.petr.god TXT | grep 'geo C'" - rlRun "dig -b 127.0.0.1 +short @127.0.0.1 geo.petr.god TXT | grep 'geo B'" - rlPhaseEnd - -#for i in `seq 1 100000`;do dig -b 4.3.2.1 @127.0.0.1 test1.petr.god +short & dig -b 127.0.0.1 @127.0.0.1 test1.petr.god +short & dig -b 222.19.68.0 @127.0.0.1 test1.petr.god +short & done - - - rlPhaseStartCleanup - ip netns del blue - rlFileRestore - rlServiceRestore named - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/named/json-support/Makefile b/Sanity/named/json-support/Makefile deleted file mode 100644 index fcfda66..0000000 --- a/Sanity/named/json-support/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Sanity/json-support -# Description: Test for BZ#1899257 ([RFE] Request for libjson support to be added to) -# Author: Petr Mensik -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Sanity/json-support -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE readstats.py - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include $(realpath /usr/share/rhts/lib/rhts-make.include) - -$(METADATA): Makefile - @echo "Owner: Petr Mensik " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1899257 ([RFE] Request for libjson support to be added to)" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind bind-utils python3" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1899257" >> $(METADATA) - @echo "Releases: -RHEL4 -RHEL6 -RHEL7 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Sanity/named/json-support/PURPOSE b/Sanity/named/json-support/PURPOSE deleted file mode 100644 index 9518b0e..0000000 --- a/Sanity/named/json-support/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/bind/Sanity/json-support -Description: Test for BZ#1899257 ([RFE] Request for libjson support to be added to) -Author: Petr Mensik -Bug summary: [RFE] Request for libjson support to be added to bind compile options for statistics-channel -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1899257 diff --git a/Sanity/named/json-support/main.fmf b/Sanity/named/json-support/main.fmf deleted file mode 100644 index 8d6226c..0000000 --- a/Sanity/named/json-support/main.fmf +++ /dev/null @@ -1,17 +0,0 @@ -summary: Test for BZ#1899257 ([RFE] Request for libjson support to be added to) -description: | - Bug summary: [RFE] Request for libjson support to be added to bind compile options for statistics-channel - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1899257 -contact: - - Petr Mensik - - Petr Sklenar -test: ./runtest.sh -framework: beakerlib -recommend: - - python3 -duration: 5m -tier: 2 -extra-summary: /CoreOS/bind/Sanity/json-support -extra-task: /CoreOS/bind/Sanity/json-support -extra-nitrate: TC#0617580 -id: 5ee697b0-9cee-4316-b3ca-403629851c36 diff --git a/Sanity/named/json-support/readstats.py b/Sanity/named/json-support/readstats.py deleted file mode 100755 index 1a7c3b4..0000000 --- a/Sanity/named/json-support/readstats.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/python3 -# -# Script verifying BIND3 statistics interface work with json - -import urllib.request -import json -import sys - -url = 'http://localhost:80/json' # use first parameter to override -timeout = 10 # connection timeout in seconds - -if len(sys.argv)>1: - url = sys.argv[1] - -print("# Reading statistics from URL: {0}".format(url)) -with urllib.request.urlopen(url, timeout=timeout) as req: - js = json.load(req) - #print(json.dumps(js, indent=4)) - print('BIND version: ', js['version']) - print('Socket stats, IPV4 UDP requests: ', js['sockstats']['UDP4Open']) - print('Name server stats, UDP queries: ', js['nsstats']['QryUDP']) diff --git a/Sanity/named/json-support/runtest.sh b/Sanity/named/json-support/runtest.sh deleted file mode 100755 index c3d7eb2..0000000 --- a/Sanity/named/json-support/runtest.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Sanity/json-support -# Description: Test for BZ#1899257 ([RFE] Request for libjson support to be added to) -# Author: Petr Mensik -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlLog "PACKAGE=`echo $PACKAGE`" - - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - TESTDIR="`pwd`" - rlRun "pushd $TmpDir" - rlFileBackup /etc/named.conf - STATSURL='http://localhost:853/json' - cat >> /etc/named.conf < -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Sanity/named-checkzone -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE cptest2.tld.db - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Sanity/named-checkzone" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind bind-utils" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Sanity/named/named-checkzone/PURPOSE b/Sanity/named/named-checkzone/PURPOSE deleted file mode 100644 index e434329..0000000 --- a/Sanity/named/named-checkzone/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/bind/Sanity/named-checkzone -Description: Sanity/named-checkzone -Author: Petr Sklenar diff --git a/Sanity/named/named-checkzone/cptest2.tld.db b/Sanity/named/named-checkzone/cptest2.tld.db deleted file mode 100644 index 504021d..0000000 --- a/Sanity/named/named-checkzone/cptest2.tld.db +++ /dev/null @@ -1,30 +0,0 @@ -; cPanel first:11.49.9999.115 (update_time):1429809767 11.49.9999.115: Cpanel::ZoneFile::VERSION:1.3 hostname:i-00002f3f.cpanel.nova latest:11.49.9999.115 -; Zone file for cptest2.tld -$TTL 14400 -@ 86400 IN SOA ns1.cpanel.nova. julian.brown.cpanel.net. ( - 2015042303 ; serial, todays date+todays - 86400 ; refresh, seconds - 7200 ; retry, seconds - 3600000 ; expire, seconds - 86400 ) ; minimum, seconds - -cptest2.tld. 86400 IN NS ns1.cpanel.nova. -cptest2.tld. 86400 IN NS ns2.cpanel.nova. - - -cptest2.tld. IN A 10.6.27.120 - -cptest2.tld. IN MX 0 cptest2.tld. - -mail IN CNAME cptest2.tld. -www IN CNAME cptest2.tld. -ftp IN A 10.6.27.120 - -cptest2.tld. IN TXT "v=spf1 +a +mx +ip4:10.6.27.120 ~all" -cpanel IN A 10.6.27.120 -webdisk IN A 10.6.27.120 -cpcalendars IN A 10.6.27.120 -cpcontacts IN A 10.6.27.120 -whm IN A 10.6.27.120 -webmail IN A 10.6.27.120 -default._domainkey IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAna8Du0cGijhRQWLN1Eb0jqJZbggaSqmyyM2EEua3U8J9YWJ9nNMS08lSHGyQSpVPh8g/uJaHa1cMkXla5ZGGra5GhY+WbAd9m6W45ztcMnXMTBbmMtMu24LgdXWNj0Lkotl4ewCEn9UioQFxpIbNnn6qrhKMajsfygb5/Zzq1rF2NT+FjZRbXtkKGd6tgB03I" bnMlMrmuccNX8U3oVbAk0+hI+Y5eOErYK54iUPvysF9MJJWMV40H7woumNvx73jswA2iK+ZKPOGH9CNXbToqgTbJmRRoMpY0nwjCVsIhaCN9bZxrpF/LaoE/3qeccUAT1tIwEZJIj6ruC8Rx3ydwQIDAQAB\; diff --git a/Sanity/named/named-checkzone/main.fmf b/Sanity/named/named-checkzone/main.fmf deleted file mode 100644 index 8c0f39e..0000000 --- a/Sanity/named/named-checkzone/main.fmf +++ /dev/null @@ -1,22 +0,0 @@ -summary: Sanity/named-checkzone -description: '' -contact: Petr Sklenar -test: ./runtest.sh -tier: 2 -framework: beakerlib -duration: 5m -enabled: true -tag: - - NoRHEL4 - - NoRHEL5 - - TIP_fedora_pass - - TIPfail_infra - - TIPpass -adjust+: - - enabled: false - when: distro == rhel-4, rhel-5 - continue: false -extra-nitrate: TC#0500008 -extra-summary: /CoreOS/bind/Sanity/named-checkzone -extra-task: /CoreOS/bind/Sanity/named-checkzone -id: eae4f1cf-90e4-4cfe-a470-9b9ac6450f53 diff --git a/Sanity/named/named-checkzone/runtest.sh b/Sanity/named/named-checkzone/runtest.sh deleted file mode 100755 index b9871f4..0000000 --- a/Sanity/named/named-checkzone/runtest.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Sanity/named-checkzone -# Description: Sanity/named-checkzone -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlLog "PACKAGE=`echo $PACKAGE`" - - rlRun "ls cptest2.tld.db" - rlPhaseEnd - - rlPhaseStartTest "check zone file from bug 1215164" - rlRun "named-checkzone cptest2.tld cptest2.tld.db" - rlRun "named-checkzone cptest2.tld cptest2.tld.db | grep 'add matching type SPF record'" 1 - rlPhaseEnd - -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/utils/delv-smoke-test/Makefile b/Sanity/utils/delv-smoke-test/Makefile deleted file mode 100644 index d988927..0000000 --- a/Sanity/utils/delv-smoke-test/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Sanity/delv-smoke-test -# Description: Test for BZ#1578128 ([RFE] Provide delv functionality) -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Sanity/delv-smoke-test -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1578128 ([RFE] Provide delv functionality)" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 15m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind bind-utils" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1578128" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Sanity/utils/delv-smoke-test/PURPOSE b/Sanity/utils/delv-smoke-test/PURPOSE deleted file mode 100644 index 10312fc..0000000 --- a/Sanity/utils/delv-smoke-test/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/bind/Sanity/delv-smoke-test -Description: Test for BZ#1578128 ([RFE] Provide delv functionality) -Author: Petr Sklenar -Bug summary: [RFE] Provide delv functionality -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 diff --git a/Sanity/utils/delv-smoke-test/main.fmf b/Sanity/utils/delv-smoke-test/main.fmf deleted file mode 100644 index d1fe2d6..0000000 --- a/Sanity/utils/delv-smoke-test/main.fmf +++ /dev/null @@ -1,24 +0,0 @@ -summary: Test for BZ#1578128 ([RFE] Provide delv functionality) -description: | - Bug summary: [RFE] Provide delv functionality - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -duration: 15m -enabled: true -tag: - - NoRHEL4 - - NoRHEL5 - - TIPfail_infra - - TIPpass -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 -adjust+: - - enabled: false - when: distro == rhel-4, rhel-5, rhel-6 - continue: false -extra-nitrate: TC#0600760 -extra-summary: /CoreOS/bind/Sanity/delv-smoke-test -extra-task: /CoreOS/bind/Sanity/delv-smoke-test -id: f1a91125-a3e4-4675-a598-dfa8969d20f1 diff --git a/Sanity/utils/delv-smoke-test/runtest.sh b/Sanity/utils/delv-smoke-test/runtest.sh deleted file mode 100755 index 737f6e2..0000000 --- a/Sanity/utils/delv-smoke-test/runtest.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Sanity/delv-smoke-test -# Description: Test for BZ#1578128 ([RFE] Provide delv functionality) -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} -BACKUP_RESOLV="" -SOURCE_RESOLV="/etc/resolv.conf" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE-utils - rlRun "REAL_RESOLV=$(realpath /etc/resolv.conf)" - rlRun "BACKUP_RESOLV=$(mktemp /etc/resolv-XXXXXX.conf)" - rlRun "rm -f $BACKUP_RESOLV" - rlRun -l "hostnamectl" 0-255 "Record type of used machine" - if [ "$REAL_RESOLV" = /run/systemd/resolve/stub-resolv.conf ]; then - rlWarning "systemd-resolved stub detected, temporary switching..." - rlRun "mv /etc/resolv.conf $BACKUP_RESOLV" - SOURCE_RESOLV="/run/systemd/resolve/resolv.conf" - else - rlRun "mv /etc/resolv.conf $BACKUP_RESOLV" - SOURCE_RESOLV="$BACKUP_RESOLV" - fi - rlRun "cp $SOURCE_RESOLV /etc/resolv.conf" - rlRun -l "cat /etc/resolv.conf" - DNSSEC="" - for NS in $(awk '$1 == "nameserver" { print $2 }' /etc/resolv.conf) - do - if dig +dnssec @$NS | grep -q RRSIG; then - rlLog "nameserver $NS supports DNSSEC" - DNSSEC=yes - else - rlLogWarning "nameserver $NS does not support DNSSEC!" - rlRun -l "dig +short @$NS -t txt -c ch -q version.bind" 0 "Query version of server $NS" - rlRun "sed -e '/$NS/ d' -i /etc/resolv.conf" - fi - rlRun -c "dig @$NS | grep -w RRSIG" 1 "Check signatures are not present always on $NS" - done - if [ -z "$DNSSEC" ]; then - DNSSEC=no - rlLogWarning "Infrastructure does not support DNSSEC at all!" - rlRun "cp $SOURCE_RESOLV /etc/resolv.conf" - fi - rlRun -l "cat /etc/resolv.conf" 0 "after modifications" - rlPhaseEnd - - rlPhaseStartTest - rlRun -l -s "delv redhat.com" - rlAssertGrep 'IN' $rlRun_LOG - rlRun -s "delv redhat.com soa +multi" - rlAssertGrep 'serial' $rlRun_LOG - rlRun -s "delv +multi +vtrace" - rlRun "LINES=$(wc -l <$rlRun_LOG)" - rlRun -l "cat $rlRun_LOG" - rlAssertGreater "delv +vtrace should show few lines" "$LINES" "10" - rlRun "delv +vtrace | grep 'fully validated'" - if [ "$DNSSEC" = yes ]; then - rlRun -s "delv" - rlAssertGrep 'fully validated' $rlRun_LOG - rlRun -s "delv example.net" - rlAssertGrep 'fully validated' $rlRun_LOG - rlRun -s "delv +vtrace fedoraproject.org" - rlAssertGrep 'fully validated' $rlRun_LOG - rlAssertGrep 'marking as secure' $rlRun_LOG - - fi - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "rm -f $rlRun_LOG" - if [ -n "$BACKUP_RESOLV" ]; then - rlRun "rm -f /etc/resolv.conf" - rlRun "mv $BACKUP_RESOLV /etc/resolv.conf" - fi - rlPhaseEnd - -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/utils/pkcs11-tools/main.fmf b/Sanity/utils/pkcs11-tools/main.fmf deleted file mode 100644 index 7393fd3..0000000 --- a/Sanity/utils/pkcs11-tools/main.fmf +++ /dev/null @@ -1,26 +0,0 @@ -summary: PKCS11 tools and operations test -description: | - Bug summary: PKCS11 key operations using tools - Issue link: https://issues.redhat.com/browse/RHEL-33729 - Generate softhsm token RSA keys, each for KSK and ZSK. - Then use bind tools to actually create small signed content and verify it is dnssec compatible. -contact: Petr Mensik -test: ./runtest.sh -framework: beakerlib -duration: 15m -enabled: true -tag: - - TIPpass -link: - - relates: https://issues.redhat.com/browse/RHEL-33729 -adjust+: - - enabled: false - when: distro < rhel-10 - continue: false -recommend+: - - bind-utils - - bind-dnssec-utils - - softhsm - - opensc - - pkcs11-provider - - openssl-engine diff --git a/Sanity/utils/pkcs11-tools/runtest.sh b/Sanity/utils/pkcs11-tools/runtest.sh deleted file mode 100755 index e57646f..0000000 --- a/Sanity/utils/pkcs11-tools/runtest.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k expandtab sts=4 -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Sanity/delv-smoke-test -# Description: Test for BZ#1578128 ([RFE] Provide delv functionality) -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} -BACKUP_RESOLV="" -SOURCE_RESOLV="/etc/resolv.conf" -: ${ENGINE:=pkcs11} -# auto to choose based on release, y to force engine usage -: ${USE_ENGINE:=auto} - -make_openssl_conf() { - cat << EOF -HOME = . - -# Use this in order to automatically load providers. -openssl_conf = openssl_init - -[openssl_init] -providers = provider_sect - -[provider_sect] -default = default_sect -pkcs11 = pkcs11_sect - -[default_sect] -activate = 1 - -[pkcs11_sect] -module = ${PROVIDER_MODULE} -pkcs11-module-path = ${SOFTHSM2_MODULE} -pkcs11-module-token-pin = file:${PIN_SOURCE} -activate = 1 -EOF -} - -make_localhost_zone() { - cat << 'EOF' -$TTL 10m -@ IN SOA @ rname.invalid. ( - 0 ; serial - 1D ; refresh - 1H ; retry - 1W ; expire - 3H ) ; minimum - NS @ - A 127.0.0.1 - AAAA ::1 - -EOF -} - -pkcs11_tool_object_uri() { - awk '"uri:" == $1 { print $2 }' -} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE-utils - - TmpDir="$(mktemp -d)" - SETUP_SOFTHSM=`readlink -f setup-named-softhsm.sh` - SOFTHSM2_MODULE="$(rpm -E '%{_libdir}/pkcs11/libsofthsm2.so')" - PROVIDER_MODULE="$(rpm -E '%{_libdir}/ossl-modules/pkcs11.so')" - # Used by OpenSSL - PKCS11_PROVIDER_MODULE="$SOFTHSM2_MODULE" - export PKCS11_PROVIDER_MODULE PROVIDER_MODULE - export PKCS11_PROVIDER_DEBUG=file:$TmpDir/provider-debug.log,level:2 - - if [ -x "$SOFTHSM2_MODULE" ]; then - export SOFTHSM2_MODULE - fi - - rlRun "softhsm2-util --show-slots | grep 'Initialized: *yes'" 1 "Check no slot is initialized already" - rlRun "eval $(bash $SETUP_SOFTHSM -A)" 0 "Preparing PKCS#11 token slot" - rlLog "Vars: conf=$SOFTHSM2_CONF pin=$PIN_SOURCE sopin=$SOPIN_SOURCE" - - rlRun "pushd $TmpDir" - rlRun "make_openssl_conf | tee openssl.conf" 0 "Make provider enabled OpenSSL configuration" - rlRun "make_localhost_zone > test.zone" 0 "Create test zone" - export OPENSSL_CONF="$TmpDir/openssl.conf" - rlLog "OPENSSL_CONF=$OPENSSL_CONF" - DNSSEC_ENGINE="" - OSSL_ENGINE="" - if [ "$USE_ENGINE" = auto ]; then - if rlIsRHEL '<10' || rlIsFedora '<32' || rlIsCentOS '<10'; then - USE_ENGINE='y' - fi - fi - if [ "$USE_ENGINE" = y ]; then - rlLog "Using OpenSSL engine, legacy mode" - DNSSEC_ENGINE="-E $ENGINE" - OSSL_ENGINE="-engine $ENGINE" - else - rlLog "Not using engine, using OpenSSL provider" - fi - rlPhaseEnd - - rlPhaseStartSetup "Prepare token" - # This test prepares token to be used by the root user, not really complicating it with file access rights. - # It may not emulare properly what is used by named - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -L" 0 "check slots" - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -T" 0 "check tokens" - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:2048 --label test-zsk" 0 "generate new pair" - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:4096 --label test-ksk" 0 "generate new pair" - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -O" 0 "check objects saved" - rlRun "ZSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE -O --label test-zsk --type pubkey | pkcs11_tool_object_uri)" 0 "Obtain slot zsk URI" - rlRun "KSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE -O --label test-ksk --type pubkey | pkcs11_tool_object_uri)" 0 "Obtain slot ksk URI" - rlRun "ZSK_URI=\"${ZSK_URI%;type=public}\"" 0 "Remove public type from ZSK URI" - rlRun "KSK_URI=\"${KSK_URI%;type=public}\"" 0 "Remove public type from KSK URI" - rlRun "test -n \"$ZSK_URI\"" 0 "Check URI were obtained" - rlRun "test -n \"$KSK_URI\"" 0 "Check URI were obtained" - rlRun "openssl pkey $OSSL_ENGINE -in '$KSK_URI?pin-source=$PIN_SOURCE' -pubout" 0,1 "Test OpenSSL knows the public KSK key" - rlRun "openssl pkey $OSSL_ENGINE -in '$ZSK_URI?pin-source=$PIN_SOURCE' -pubout" 0,1 "Test OpenSSL knows the public ZSK key" - if openssl storeutl -help >& /dev/null; then - rlRun "openssl storeutl $OSSL_ENGINE -text '$KSK_URI?pin-source=$PIN_SOURCE'" 0,1 "Test OpenSSL knows the public KSK key" - rlRun "openssl storeutl $OSSL_ENGINE -text '$ZSK_URI?pin-source=$PIN_SOURCE'" 0,1 "Test OpenSSL knows the public ZSK key" - fi - rlPhaseEnd - - rlPhaseStartTest "Test DNSSEC operations on token" - rlRun "ORIGIN='test'" - rlRun "ZONEFILE='test.zone'" - rlRun "SIGNEDFILE='test.zone.signed'" - rlRun "dnssec-keyfromlabel -a RSASHA256 $DNSSEC_ENGINE -l \"$ZSK_URI?pin-source=$PIN_SOURCE\" $ORIGIN" 0 "Import dnssec ZSK" - rlRun "dnssec-keyfromlabel -a RSASHA256 $DNSSEC_ENGINE -l \"$KSK_URI?pin-source=$PIN_SOURCE\" -f KSK $ORIGIN" 0 "Import dnssec KSK" - rlRun "dnssec-signzone $DNSSEC_ENGINE -S -o $ORIGIN -f $SIGNEDFILE $ZONEFILE" 0 "Create zone signatures" - rlRun "test -e $SIGNEDFILE" 0 "Check signed zone were created." - rlRun "dnssec-verify $DNSSEC_ENGINE -o $ORIGIN $SIGNEDFILE" 0 "Check zone were signed ok" - rlRun "named-checkzone $ORIGIN $ZONEFILE" 0 "Validate input zone file" - rlRun "named-checkzone $ORIGIN $SIGNEDFILE" 0 "Validate signed zone file" - [ "$DEBUG" = y ] && PS1="test-debug $PS1" bash -i - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "softhsm2-util --token rpm --delete-token" - rlRun "popd" - rlRun "rm -rf $TmpDir" - rlPhaseEnd - -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/utils/pkcs11-tools/setup-named-softhsm.sh b/Sanity/utils/pkcs11-tools/setup-named-softhsm.sh deleted file mode 100755 index a13c91e..0000000 --- a/Sanity/utils/pkcs11-tools/setup-named-softhsm.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh -# -# This script will initialise token storage of softhsm PKCS11 provider -# in custom location. Is useful to store tokens in non-standard location. -# -# Output can be evaluated from bash, it will prepare it for usage of temporary tokens. -# Recommended use: -# eval $(bash setup-named-softhsm.sh -A) -# - -SOFTHSM2_CONF="$1" -TOKENPATH="$2" -GROUPNAME="$3" -# Do not use this script for real keys worth protection -# This is intended for crypto accelerators using PKCS11 interface. -# Uninitialized token would fail any crypto operation. -PIN=1234 -SO_PIN=1234 -LABEL=rpm - -set -e - -echo_i() -{ - echo "#" $@ -} - -random() -{ - if [ -x "$(which openssl 2>/dev/null)" ]; then - openssl rand -base64 $1 - else - dd if=/dev/urandom bs=1c count=$1 | base64 - fi -} - -usage() -{ - echo "Usage: $0 -A [token directory] [group]" - echo " or: $0 [group]" -} - -if [ "$SOFTHSM2_CONF" = "-A" -a -z "$TOKENPATH" ]; then - TOKENPATH=$(mktemp -d /var/tmp/softhsm-XXXXXX) -fi - -if [ -z "$SOFTHSM2_CONF" -o -z "$TOKENPATH" ]; then - usage >&2 - exit 1 -fi - -if [ "$SOFTHSM2_CONF" = "-A" ]; then - # Automagic mode instead - MODE=secure - SOFTHSM2_CONF="$TOKENPATH/softhsm2.conf" - PIN_SOURCE="$TOKENPATH/pin" - SOPIN_SOURCE="$TOKENPATH/so-pin" - TOKENPATH="$TOKENPATH/tokens" -else - MODE=legacy -fi - -[ -d "$TOKENPATH" ] || mkdir -p "$TOKENPATH" - -umask 0022 - -if ! [ -f "$SOFTHSM2_CONF" ]; then -cat << SED > "$SOFTHSM2_CONF" -# SoftHSM v2 configuration file - -directories.tokendir = ${TOKENPATH} -objectstore.backend = file - -# ERROR, WARNING, INFO, DEBUG -log.level = ERROR - -# If CKF_REMOVABLE_DEVICE flag should be set -slots.removable = false -SED -else - echo_i "Config file $SOFTHSM2_CONF already exists" >&2 -fi - -if [ -n "$PIN_SOURCE" ]; then - touch "$PIN_SOURCE" "$SOPIN_SOURCE" - chmod 0600 "$PIN_SOURCE" "$SOPIN_SOURCE" - if [ -n "$GROUPNAME" ]; then - chgrp "$GROUPNAME" "$PIN_SOURCE" "$SOPIN_SOURCE" - chmod g+r "$PIN_SOURCE" "$SOPIN_SOURCE" - fi -fi - -export SOFTHSM2_CONF - -if softhsm2-util --show-slots | grep 'Initialized:[[:space:]]*yes' > /dev/null -then - echo_i "Token in ${TOKENPATH} is already initialized" >&2 - - [ -f "$PIN_SOURCE" ] && PIN=$(cat "$PIN_SOURCE") - [ -f "$SOPIN_SOURCE" ] && SO_PIN=$(cat "$SOPIN_SOURCE") -else - PIN=$(random 6) - SO_PIN=$(random 18) - if [ -n "$PIN_SOURCE" ]; then - echo -n "$PIN" > "$PIN_SOURCE" - echo -n "$SO_PIN" > "$SOPIN_SOURCE" - fi - - echo_i "Initializing tokens to ${TOKENPATH}..." - softhsm2-util --init-token --free --label "$LABEL" --pin "$PIN" --so-pin "$SO_PIN" | sed -e 's/^/# /' - - if [ -n "$GROUPNAME" ]; then - chgrp -R -- "$GROUPNAME" "$TOKENPATH" - chmod -R -- g=rX,o= "$TOKENPATH" - fi -fi - -echo "export SOFTHSM2_CONF=\"$SOFTHSM2_CONF\"" -echo "export PIN_SOURCE=\"$PIN_SOURCE\"" -echo "export SOPIN_SOURCE=\"$SOPIN_SOURCE\"" -# These are intentionaly not exported -echo "PIN=\"$PIN\"" -echo "SO_PIN=\"$SO_PIN\"" diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf deleted file mode 100644 index 8bf4036..0000000 --- a/Smoke/IpaInstallAndStart/main.fmf +++ /dev/null @@ -1,16 +0,0 @@ -summary: Ipa install, Start and basic usage -test: ./test.sh -framework: beakerlib -duration: 68m -contact: Petr Sklenar -adjust+: - - enabled: false - when: component != bind - because: freeipa is not supported with alternative components -extra-nitrate: TC#0617581 -tag: morecpu -id: d4375cba-a2fd-4b33-bb8a-83cda760e237\ -check: - - how: avc - result: info - when: distro < rhel-9 diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh deleted file mode 100755 index dd363bb..0000000 --- a/Smoke/IpaInstallAndStart/test.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Author: Petr Sklenar -# test based on original Petr Mensik's tests -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - - - -DM_SECRET=dmSecret -ADMIN_SECRET=adminSecret -HOST_SECRET=hostSecret -DOMAIN=ipa.test -REALM=IPA.TEST - -fetch_local_ipv4() -{ - ip address | awk '$1 == "inet" { print $2 }' | cut -d/ -f1 | grep -v '^127\.'| tail -n1 -} - -prepareIpaServer() -{ - if rlIsRHEL >= 8 - then - rlRun "dnf -y module install idm:DL1" - fi - - rlRun "dnf -y install freeipa-server-dns" - ORIG_HOSTNAME=${HOSTNAME} -# there is longer name at AWS, more than 64char - #echo '127.0.0.1 ipa.ipa' >> /etc/hosts - HOSTNAME='petr.svetr' - hostnamectl hostname petr.svetr - IP4=`fetch_local_ipv4` - hostname ${HOSTNAME} - - if ! ipactl status - then - if ! grep ${HOSTNAME} /etc/hosts - then - # getent hosts ${HOSTNAME} >> /etc/hosts - echo "${IP4} ${HOSTNAME} ${ORIG_HOSTNAME}" >> /etc/hosts - fi - rlRun "ipa-server-install -U --hostname ${HOSTNAME} --ip-address ${IP4} -n ${DOMAIN} -r ${REALM} --setup-dns -p ${DM_SECRET} -a ${ADMIN_SECRET} --auto-forwarders" - fi -} - -make_update() -{ - local IPV4=`fetch_local_ipv4` - local TTL=600 - cat << NSUPDATE -gsstsig -prereq yxdomain primary.ipa.test -update del primary.ipa.test -send - -gsstsig -update add primary.ipa.test ${TTL} IN A ${IPV4} -send -NSUPDATE -} - -rlJournalStart - rlPhaseStartSetup - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "TestDir=`pwd`" 0 "Saving test directory" - rlRun "pushd $TmpDir" - echo ===============MEMINFO=================================== - cat /proc/meminfo - echo ______________________________________________________________ - rlPhaseEnd - - rlPhaseStartSetup "Prepare IPA" - rlFileBackup /etc/hosts - echo '' > /etc/hosts - prepareIpaServer - rpm -qa | grep bind > pkgs - rlLog "`cat pkgs`" - rlPhaseEnd - - rlPhaseStartTest - for i in `seq 5 10`;do - rlRun "ipactl restart" - sleep $i - #rhel8 mask named service. Also named restart is probably not needed. - uname -a | grep 'el8' || rlRun "systemctl restart named.service" - sleep $i - done - rlPhaseEnd - - rlPhaseStartTest - rlRun "kinit -kt /etc/krb5.keytab" 0 "Login machine into kerberos" - rlRun "klist" 0 "Ensure some ticket is there" - rlRun "make_update > update" - #rlRun "/usr/bin/nsupdate -g -d update" - echo "===============DEBUG" - echo "file update\n----------" - cat update - echo "nsupdate -g -d update\n---------" - /usr/bin/nsupdate -g -d update - echo "=============== END of DEBUG" - rlRun "host -t SOA $DOMAIN localhost" 0 "Check localhost service is running" - rlRun "host -t NS $DOMAIN localhost" 0 "Check localhost nameservers work" - rlRun "host -t SOA $DOMAIN" 0 "Check default resolver reaches local domain" - rlRun "host -t NS $DOMAIN" 0 "Check default resolver reaches local nameserver" - - rlPhaseEnd - - rlPhaseStartCleanup - rlFileSubmit /var/log/ipaserver-install.log - grep LAST1000_ipaserver-install.log - tail -n1000 /var/log/ipaserver-install.log - grep _______________end - ipa-server-install --uninstall --unattended - killall named - rlFileRestore - systemctl daemon-reload - rlServiceStop named - systemctl stop named - pkill -9 named - killall -9 named - rlRun "rm -f $rlRun_LOG" - rlRun "popd" - rlRun "hostname ${ORIG_HOSTNAME}" - rlRun "hostnamectl hostname ${ORIG_HOSTNAME}" 0-255 - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd - diff --git a/Stub/master-and-stub-server-talks-a-bit/Makefile b/Stub/master-and-stub-server-talks-a-bit/Makefile deleted file mode 100644 index 27bf75c..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Stub/master-and-stub-server-talks-a-bit -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE petr.god.zone named.conf.MASTER named.conf.STUB - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: sanity testing of stub server" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 10m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind bind-utils" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Stub/master-and-stub-server-talks-a-bit/PURPOSE b/Stub/master-and-stub-server-talks-a-bit/PURPOSE deleted file mode 100644 index 93fc47c..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/PURPOSE +++ /dev/null @@ -1 +0,0 @@ -Author: Petr Sklenar diff --git a/Stub/master-and-stub-server-talks-a-bit/main.fmf b/Stub/master-and-stub-server-talks-a-bit/main.fmf deleted file mode 100644 index 883a780..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/main.fmf +++ /dev/null @@ -1,27 +0,0 @@ -summary: sanity testing of stub server -description: '' -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -recommend: [] -duration: 10m -enabled: true -tag: - - NoRHEL4 - - NoRHEL5 - - TIPfail_infra - - TIPpass -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1291185 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1227189 -adjust+: - - enabled: false - when: distro == rhel-4, rhel-5 - continue: false - - enabled: false - when: arch == ppc64le - continue: false -extra-nitrate: TC#0518539 -extra-summary: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit -extra-task: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit -id: 7ac90330-6225-4a37-85ae-3fb8af6e71cc diff --git a/Stub/master-and-stub-server-talks-a-bit/named.conf.MASTER b/Stub/master-and-stub-server-talks-a-bit/named.conf.MASTER deleted file mode 100644 index b6b36de..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/named.conf.MASTER +++ /dev/null @@ -1,21 +0,0 @@ -options { - listen-on port 53 { - 127.0.0.1; - }; - directory "/tmp/bind-for-petr"; - version "unknown"; - recursion no; - allow-query { - any; - }; - dnssec-validation no; -}; - -zone "." { - type hint; - file "/dev/null"; -}; -zone "petr.god." IN { - type master; - file "petr.god.zone"; -}; diff --git a/Stub/master-and-stub-server-talks-a-bit/named.conf.STUB b/Stub/master-and-stub-server-talks-a-bit/named.conf.STUB deleted file mode 100644 index 9de8354..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/named.conf.STUB +++ /dev/null @@ -1,26 +0,0 @@ -options { - listen-on port 51 { - 127.0.0.1; - }; - version "unknown"; - notify-source 127.0.0.1; - transfer-source 127.0.0.1; - recursion yes; - directory "/tmp/bind-for-petr"; - allow-query { any; }; - - dnssec-validation no; -}; - -zone "." IN { - type hint; - //file "named.ca"; - file "/dev/null"; -}; -zone "petr.god." IN { - - type stub; - file "petr.god.zone-named2"; - masters { 127.0.0.1 port 53; }; - //delegation-only yes; -}; diff --git a/Stub/master-and-stub-server-talks-a-bit/petr.god.zone b/Stub/master-and-stub-server-talks-a-bit/petr.god.zone deleted file mode 100644 index f2a0861..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/petr.god.zone +++ /dev/null @@ -1,16 +0,0 @@ -$ORIGIN petr.god. -$TTL 86400 -@ IN SOA dns.petr.god. hostmaster.petr.god. ( - 100 ; serial - 21600 ; - 3600 ; - 604800 ; - 86400 ) ; - - IN NS dns.petr.god. -dns IN A 127.0.0.1 -mail IN CNAME dns -petr.god. IN TXT "v=spf1 +ip4:192.168.122.0/24 -all" -test1 IN A 192.168.122.2 -test2 IN A 192.168.122.3 -test3 IN A 192.168.122.212 diff --git a/Stub/master-and-stub-server-talks-a-bit/runtest.sh b/Stub/master-and-stub-server-talks-a-bit/runtest.sh deleted file mode 100755 index b3dc85b..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/runtest.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of example.com.zone Makefile named.conf.MASTER named.conf.STUB PURPOSE runtest.sh -# Description: sanity testing of stub server -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:="bind"} - -rlJournalStart - rlPhaseStartSetup "base setup" - rlAssertRpm $PACKAGE - rlLog "PACKAGE=`echo $PACKAGE`" - rlLog "packages" - rlLog "`rpm -qa | grep bind`" - dir='/tmp/bind-for-petr' - rm -rf $dir - mkdir -p $dir - killall named - systemctl stop named - cp petr.god.zone $dir - cp named.conf.MASTER $dir/named.conf.MASTER - cp named.conf.STUB $dir/named.conf.STUB - chmod a+rw -R $dir - rlRun "named -u named -fg -d10 -c $dir/named.conf.MASTER &>/$dir/named.conf.MASTER.log &" 0 "named on port 53" - rlRun "named -u named -fg -d10 -c $dir/named.conf.STUB &>/$dir/named.conf.STUB.log &" 0 "named on port 51" - rlPhaseEnd - - - - rlPhaseStartTest 'petr.god' - rlRun "dig +short @127.0.0.1 -p 51 petr.god ds" - rlRun "dig @127.0.0.1 -p 51 test1.petr.god +short | grep '192.168.122'" - rlRun "dig @127.0.0.1 -p 51 dns.petr.god +short | grep '127'" - rlPhaseEnd -sleep 1 - rlPhaseStartTest "debug logs" - lines=`cat /$dir/named.conf.MASTER.log | wc -l` - rlAssertGreater "log should be short" 1000 $lines - lines=`cat /$dir/named.conf.MASTER.log|wc -l` - rlAssertGreater "log shold be short" 1000 $lines - rlRun "grep -v 'Werror=' /$dir/named.conf.MASTER.log | grep -i error" 1 - rlAssertGreater 'no more then one known' 3 `grep error //tmp/bind-for-petr/named.conf.STUB.log | wc -l` - rlAssertGreater "only few known err" 7 `grep -i fail //tmp/bind-for-petr/named.conf.*.log | wc -l` - rlPhaseEnd - - rlPhaseStartCleanup - rlFileSubmit /$dir/named.conf.MASTER.log - rlFileSubmit /$dir/named.conf.STUB.log - rm -rf $dir - killall named - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..6cddfeb --- /dev/null +++ b/dead.package @@ -0,0 +1,2 @@ +All tests were moved to CentOS Stream gitlab.com: +https://gitlab.com/redhat/centos-stream/tests/bind diff --git a/main.fmf b/main.fmf deleted file mode 100644 index e89125e..0000000 --- a/main.fmf +++ /dev/null @@ -1,29 +0,0 @@ -# QE owner -contact: Petr Sklenar -adjust: - - require+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component == bind - - require+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 - - require+: - - bind9.18 - - bind9.18-utils - environment+: - PACKAGE: bind9.18 - when: component == bind9.18 -check: - - how: avc diff --git a/plans/bind/ci.fmf b/plans/bind/ci.fmf deleted file mode 100644 index d646b66..0000000 --- a/plans/bind/ci.fmf +++ /dev/null @@ -1,8 +0,0 @@ -summary: CI plan, picks up all tests, runs in beakerlib. -discover: - - name: fedora - how: fmf -execute: - how: tmt -context: - component: bind diff --git a/plans/bind/morecpu.fmf b/plans/bind/morecpu.fmf deleted file mode 100644 index 24a0150..0000000 --- a/plans/bind/morecpu.fmf +++ /dev/null @@ -1,23 +0,0 @@ -context: - component: bind -environment: - PACKAGE: bind - -/tagmorecpu: - summary: tests with more MEM and CPU - discover: - - name: public - how: fmf - filter: 'tag: morecpu' - url: "https://src.fedoraproject.org/tests/bind.git" - - name: internal - how: fmf - filter: 'tag: morecpu' - url: https://gitlab.com/redhat/rhel/tests/bind - provision: - hardware: - memory: ">= 4 GB" - cpu: - processors: ">= 6" - execute: - how: tmt diff --git a/plans/bind/others.fmf b/plans/bind/others.fmf deleted file mode 100644 index b869b00..0000000 --- a/plans/bind/others.fmf +++ /dev/null @@ -1,31 +0,0 @@ -/public: - summary: Public other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -moremem' - url: "https://src.fedoraproject.org/tests/bind.git" - provision: - hardware: - memory: ">= 4 GB" - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind - -/internal: - summary: Internal other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -moremem' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind diff --git a/plans/bind/tier1.fmf b/plans/bind/tier1.fmf deleted file mode 100644 index c254834..0000000 --- a/plans/bind/tier1.fmf +++ /dev/null @@ -1,28 +0,0 @@ -/public: - summary: Public Tier1 tests - discover: - how: fmf - filter: 'tier: 1' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind - -/internal: - summary: Internal Tier1 tests - discover: - how: fmf - filter: 'tier: 1' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind diff --git a/plans/bind/tier2-tier3.fmf b/plans/bind/tier2-tier3.fmf deleted file mode 100644 index fc6b05f..0000000 --- a/plans/bind/tier2-tier3.fmf +++ /dev/null @@ -1,28 +0,0 @@ -/public: - summary: Public Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 | tier: 3' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind - -/internal: - summary: Internal Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 | tier: 3' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind diff --git a/plans/bind9.16/morecpu.fmf b/plans/bind9.16/morecpu.fmf deleted file mode 100644 index dca2833..0000000 --- a/plans/bind9.16/morecpu.fmf +++ /dev/null @@ -1,23 +0,0 @@ -context: - component: bind9.16 -environment: - PACKAGE: bind9.16 - -/tagmorecpu: - summary: tests with more MEM and CPU - discover: - - name: public - how: fmf - filter: 'tag: morecpu' - url: "https://src.fedoraproject.org/tests/bind.git" - - name: internal - how: fmf - filter: 'tag: morecpu' - url: https://gitlab.com/redhat/rhel/tests/bind - provision: - hardware: - memory: ">= 4 GB" - cpu: - processors: ">= 6" - execute: - how: tmt diff --git a/plans/bind9.16/others.fmf b/plans/bind9.16/others.fmf deleted file mode 100644 index 94fac3c..0000000 --- a/plans/bind9.16/others.fmf +++ /dev/null @@ -1,29 +0,0 @@ -/public: - summary: Public other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library & tag: -moremem' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind9.16 - environment+: - PACKAGE: bind9.16 - - -/internal: - summary: Internal other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library & tag: -moremem' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind9.16 - environment+: - PACKAGE: bind9.16 diff --git a/plans/bind9.16/tier1.fmf b/plans/bind9.16/tier1.fmf deleted file mode 100644 index 838e1ac..0000000 --- a/plans/bind9.16/tier1.fmf +++ /dev/null @@ -1,28 +0,0 @@ -/public: - summary: Public Tier1 tests - discover: - how: fmf - filter: 'tier: 1 & tag: -library' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind9.16 - environment+: - PACKAGE: bind9.16 - -/internal: - summary: Internal Tier1 tests - discover: - how: fmf - filter: 'tier: 1 & tag: -library' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind9.16 - environment+: - PACKAGE: bind9.16 diff --git a/plans/bind9.16/tier2-tier3.fmf b/plans/bind9.16/tier2-tier3.fmf deleted file mode 100644 index 3a3342b..0000000 --- a/plans/bind9.16/tier2-tier3.fmf +++ /dev/null @@ -1,28 +0,0 @@ -/public: - summary: Public Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind9.16 - environment+: - PACKAGE: bind9.16 - -/internal: - summary: Internal Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind9.16 - environment+: - PACKAGE: bind9.16 diff --git a/plans/bind9.18/morecpu.fmf b/plans/bind9.18/morecpu.fmf deleted file mode 100644 index e753077..0000000 --- a/plans/bind9.18/morecpu.fmf +++ /dev/null @@ -1,23 +0,0 @@ -context: - component: bind9.18 -environment: - PACKAGE: bind9.18 - -/tagmorecpu: - summary: tests with more MEM and CPU - discover: - - name: public - how: fmf - filter: 'tag: morecpu' - url: "https://src.fedoraproject.org/tests/bind.git" - - name: internal - how: fmf - filter: 'tag: morecpu' - url: https://gitlab.com/redhat/rhel/tests/bind - provision: - hardware: - memory: ">= 4 GB" - cpu: - processors: ">= 6" - execute: - how: tmt diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf deleted file mode 100644 index 33815b8..0000000 --- a/plans/bind9.18/others.fmf +++ /dev/null @@ -1,30 +0,0 @@ -context: - component: bind9.18 -environment: - PACKAGE: bind9.18 - -/public: - summary: Public other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library & tag: -moremem' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - -/internal: - summary: Internal other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library & tag: -moremem' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - #context+: - # component+: bind9.18 - #environment+: - # PACKAGE: bind9.18 - diff --git a/plans/bind9.18/tier1.fmf b/plans/bind9.18/tier1.fmf deleted file mode 100644 index f300adb..0000000 --- a/plans/bind9.18/tier1.fmf +++ /dev/null @@ -1,28 +0,0 @@ -/public: - summary: Public Tier1 tests - discover: - how: fmf - filter: 'tier: 1 & tag: -library' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind9.18 - environment: - PACKAGE: bind9.18 - -/internal: - summary: Internal Tier1 tests - discover: - how: fmf - filter: 'tier: 1 & tag: -library' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind9.18 - environment: - PACKAGE: bind9.18 diff --git a/plans/bind9.18/tier2-tier3.fmf b/plans/bind9.18/tier2-tier3.fmf deleted file mode 100644 index 7692249..0000000 --- a/plans/bind9.18/tier2-tier3.fmf +++ /dev/null @@ -1,28 +0,0 @@ -/public: - summary: Public Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind9.18 - environment+: - PACKAGE: bind9.18 - -/internal: - summary: Internal Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind9.18 - environment+: - PACKAGE: bind9.18 diff --git a/plans/ci.fmf b/plans/ci.fmf deleted file mode 100644 index d646b66..0000000 --- a/plans/ci.fmf +++ /dev/null @@ -1,8 +0,0 @@ -summary: CI plan, picks up all tests, runs in beakerlib. -discover: - - name: fedora - how: fmf -execute: - how: tmt -context: - component: bind diff --git a/plans/others.fmf b/plans/others.fmf deleted file mode 100644 index 30ac53b..0000000 --- a/plans/others.fmf +++ /dev/null @@ -1,23 +0,0 @@ -/public: - summary: Public other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -moremem' - url: "https://src.fedoraproject.org/tests/bind.git" - provision: - hardware: - memory: ">= 4 GB" - execute: - how: tmt - -/internal: - summary: Internal other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -moremem' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt diff --git a/plans/tier1.fmf b/plans/tier1.fmf deleted file mode 100644 index 2ac2ed2..0000000 --- a/plans/tier1.fmf +++ /dev/null @@ -1,20 +0,0 @@ -/public: - summary: Public Tier1 tests - discover: - how: fmf - filter: 'tier: 1' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - -/internal: - summary: Internal Tier1 tests - discover: - how: fmf - filter: 'tier: 1' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt diff --git a/plans/tier2-tier3.fmf b/plans/tier2-tier3.fmf deleted file mode 100644 index 74d7b07..0000000 --- a/plans/tier2-tier3.fmf +++ /dev/null @@ -1,20 +0,0 @@ -/public: - summary: Public Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 | tier: 3' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - -/internal: - summary: Internal Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 | tier: 3' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt