From ebe213eeddece9cd2a15b0d1129b0e3246fe3fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 9 Oct 2019 16:50:00 +0200 Subject: [PATCH 1/9] CAA test import --- Sanity/CAA-support/Makefile | 63 ++++++++++++++++++++++++++ Sanity/CAA-support/PURPOSE | 3 ++ Sanity/CAA-support/runtest.sh | 76 ++++++++++++++++++++++++++++++++ Sanity/CAA-support/zone.hi.ho | 24 ++++++++++ Sanity/CAA-support/zone.petr.god | 23 ++++++++++ 5 files changed, 189 insertions(+) create mode 100644 Sanity/CAA-support/Makefile create mode 100644 Sanity/CAA-support/PURPOSE create mode 100755 Sanity/CAA-support/runtest.sh create mode 100644 Sanity/CAA-support/zone.hi.ho create mode 100644 Sanity/CAA-support/zone.petr.god diff --git a/Sanity/CAA-support/Makefile b/Sanity/CAA-support/Makefile new file mode 100644 index 0000000..2e19cd0 --- /dev/null +++ b/Sanity/CAA-support/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/bind/Sanity/CAA-support +# Description: sanity testing of CAA support +# 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/Sanity/CAA-support +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE zone.petr.god zone.hi.ho + +.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 CAA support" >> $(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/Sanity/CAA-support/PURPOSE b/Sanity/CAA-support/PURPOSE new file mode 100644 index 0000000..c420b0b --- /dev/null +++ b/Sanity/CAA-support/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/bind/Sanity/CAA-support +Description: sanity testing of CAA support +Author: Petr Sklenar diff --git a/Sanity/CAA-support/runtest.sh b/Sanity/CAA-support/runtest.sh new file mode 100755 index 0000000..f23a06e --- /dev/null +++ b/Sanity/CAA-support/runtest.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/bind/Sanity/CAA-support +# Description: sanity testing of CAA support +# 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/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="bind" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlFileBackup --clean /var/named/zone.petr.god + rlFileBackup --clean /var/named/zone.hi.ho + rlFileBackup /etc/named.conf + cp zone.petr.god /var/named/zone.petr.god + cp zone.hi.ho /var/named/zone.hi.ho + + cat <> /etc/named.conf +zone "petr.god." IN { + type master; + file "/var/named/zone.petr.god"; +}; + +zone "hi.ho." IN { + type master; + file "/var/named/zone.hi.ho"; +}; +EOT + rlRun "rlServiceStart named" + rlPhaseEnd + + rlPhaseStartTest 'petr.god' + rlRun "dig +short @127.0.0.1 caa01.petr.god CAA|grep 'policy'" + rlRun "dig +short @127.0.0.1 caa02.petr.god CAA|grep 'Unknown'" + rlRun "dig +short @127.0.0.1 caa03.petr.god CAA|grep 'tbs'" + rlRun "dig +short @127.0.0.1 caa6.petr.god CAA | wc -l | grep 6" + rlPhaseEnd + + rlPhaseStartTest 'hi.ho' + rlRun "dig +short @127.0.0.1 caa.hi.ho CAA | grep issue" + rlRun "dig +short @127.0.0.1 caa1.hi.ho CAA | grep 'mailto:security at example.com'" + rlRun "dig +short @127.0.0.1 caa2.hi.ho CAA| grep 'http://iodef.example.com/'" + + rlPhaseEnd + + rlPhaseStartCleanup + rlFileRestore + rlServiceRestore named + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/Sanity/CAA-support/zone.hi.ho b/Sanity/CAA-support/zone.hi.ho new file mode 100644 index 0000000..b7f1c7e --- /dev/null +++ b/Sanity/CAA-support/zone.hi.ho @@ -0,0 +1,24 @@ +$ORIGIN hi.ho. +@ 1D IN SOA ns1.hi.ho. hostmaster.hi.ho. ( + 2009040114 ; serial + 3H ; refresh + 15 ; retry + 1w ; expire + 3h ; minimum + ) + IN NS ns1.hi.ho. + IN A 1.1.1.1 +ns1 IN A 1.2.3.4 +a IN A 2.2.2.2 +aaaa IN AAAA 3FFE:0B80:0444:0004:0000:0000:0000:0004 +caa IN CAA 0 issue "ca.example.net" +caa1 IN CAA 0 iodef "mailto:security at example.com" +caa2 IN CAA 0 iodef "http://iodef.example.com/" +caa6 CAA 0 policy "policy" +caa6 CAA 128 path "path" +caa6 CAA 128 issuewild "issuewild" +caa6 CAA 128 iodef "iodef" +caa6 CAA 128 tbs "tbs" +caa6 CAA 128 auth "auth" +caa6 CAA 128 aut "auth" + diff --git a/Sanity/CAA-support/zone.petr.god b/Sanity/CAA-support/zone.petr.god new file mode 100644 index 0000000..0351346 --- /dev/null +++ b/Sanity/CAA-support/zone.petr.god @@ -0,0 +1,23 @@ +$ORIGIN petr.god. +@ 1D IN SOA ns1.petr.god. hostmaster.petr.god. ( + 2002022401 ; serial + 3H ; refresh + 15 ; retry + 1w ; expire + 3h ; minimum + ) + IN NS ns1.petr.god. ; in the domain + +ns1 IN A 192.168.122.178 +www IN A 192.168.122.123 +ftp IN CNAME www.petr.god. + +caa01 3600 IN CAA 0 issue "ca.petr.god\; policy=ev" +caa02 3600 IN CAA 128 tbs "Unknown" +caa03 3600 IN CAA 128 tbs "" +caa6 CAA 0 policy "policy" +caa6 CAA 128 path "path" +caa6 CAA 128 issuewild "issuewild" +caa6 CAA 128 iodef "iodef" +caa6 CAA 128 tbs "tbs" +caa6 CAA 128 auth "auth" From f50ed4c929476bcb0a4e4b30bdc310d3f5c963ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 9 Oct 2019 17:27:44 +0200 Subject: [PATCH 2/9] Test import of fmf and tmt converted test --- .fmf/version | 1 + Sanity/CAA-support/main.fmf | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 .fmf/version create mode 100644 Sanity/CAA-support/main.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/Sanity/CAA-support/main.fmf b/Sanity/CAA-support/main.fmf new file mode 100644 index 0000000..35e52a5 --- /dev/null +++ b/Sanity/CAA-support/main.fmf @@ -0,0 +1,7 @@ +component: bind +contact: Petr Sklenar +description: '' +duration: 10m +relevancy: | + distro = rhel-4, rhel-5: False +summary: sanity testing of CAA support From fdd78bd18cca71ccd6e5d333cebbcf423076fabd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 9 Oct 2019 17:40:40 +0200 Subject: [PATCH 3/9] More imported sanity tests --- .../Makefile | 66 +++++ .../PURPOSE | 6 + .../named.conf | 11 + .../runtest.sh | 99 +++++++ .../zonefile | 16 ++ Sanity/Master-server-chrooted/Makefile | 66 +++++ Sanity/Master-server-chrooted/PURPOSE | 6 + Sanity/Master-server-chrooted/named.conf | 11 + Sanity/Master-server-chrooted/runtest.sh | 115 +++++++++ Sanity/Master-server-chrooted/zonefile | 27 ++ .../Makefile | 65 +++++ .../PURPOSE | 6 + .../named.conf | 11 + .../runtest.sh | 97 +++++++ .../zonefile | 16 ++ Sanity/Master-server-not-chrooted/Makefile | 65 +++++ Sanity/Master-server-not-chrooted/PURPOSE | 6 + Sanity/Master-server-not-chrooted/named.conf | 11 + Sanity/Master-server-not-chrooted/runtest.sh | 115 +++++++++ Sanity/Master-server-not-chrooted/zonefile | 27 ++ Sanity/Run-internal-BIND-test-suite/Makefile | 71 +++++ Sanity/Run-internal-BIND-test-suite/PURPOSE | 6 + .../bind-systest-filter.sh | 47 ++++ .../Run-internal-BIND-test-suite/knownerror | 1 + .../knownerror.el6 | 2 + .../knownerror.rhel-8.0 | 3 + .../knownerror.rhel-8.1 | 3 + .../knownerror.rhel-8.2 | 1 + .../Run-internal-BIND-test-suite/runtest.sh | 242 ++++++++++++++++++ .../setup-named-softhsm.sh | 123 +++++++++ 30 files changed, 1341 insertions(+) create mode 100644 Sanity/Master-server-chrooted-reverse-lookup/Makefile create mode 100644 Sanity/Master-server-chrooted-reverse-lookup/PURPOSE create mode 100644 Sanity/Master-server-chrooted-reverse-lookup/named.conf create mode 100755 Sanity/Master-server-chrooted-reverse-lookup/runtest.sh create mode 100644 Sanity/Master-server-chrooted-reverse-lookup/zonefile create mode 100644 Sanity/Master-server-chrooted/Makefile create mode 100644 Sanity/Master-server-chrooted/PURPOSE create mode 100644 Sanity/Master-server-chrooted/named.conf create mode 100755 Sanity/Master-server-chrooted/runtest.sh create mode 100644 Sanity/Master-server-chrooted/zonefile create mode 100644 Sanity/Master-server-not-chrooted-reverse-lookup/Makefile create mode 100644 Sanity/Master-server-not-chrooted-reverse-lookup/PURPOSE create mode 100644 Sanity/Master-server-not-chrooted-reverse-lookup/named.conf create mode 100644 Sanity/Master-server-not-chrooted-reverse-lookup/runtest.sh create mode 100644 Sanity/Master-server-not-chrooted-reverse-lookup/zonefile create mode 100644 Sanity/Master-server-not-chrooted/Makefile create mode 100644 Sanity/Master-server-not-chrooted/PURPOSE create mode 100644 Sanity/Master-server-not-chrooted/named.conf create mode 100644 Sanity/Master-server-not-chrooted/runtest.sh create mode 100644 Sanity/Master-server-not-chrooted/zonefile 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/knownerror.el6 create mode 100644 Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.0 create mode 100644 Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.1 create mode 100644 Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.2 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/Master-server-chrooted-reverse-lookup/Makefile b/Sanity/Master-server-chrooted-reverse-lookup/Makefile new file mode 100644 index 0000000..f82a467 --- /dev/null +++ b/Sanity/Master-server-chrooted-reverse-lookup/Makefile @@ -0,0 +1,66 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/bind/Sanity/Master-server-chrooted-reverse-lookup +# Description: Set up master nameserver, test it. +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2009 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/Master-server-chrooted-reverse-lookup +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf zonefile + +.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: Martin Cermak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Set up master nameserver in chrooted env, test it." >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: bind" >> $(METADATA) + @echo "Requires: bind" >> $(METADATA) + @echo "Requires: bind-chroot" >> $(METADATA) + @echo "Requires: bind-utils" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "RhtsRequires: library(bind/bind-setup)" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/Sanity/Master-server-chrooted-reverse-lookup/PURPOSE b/Sanity/Master-server-chrooted-reverse-lookup/PURPOSE new file mode 100644 index 0000000..93ce33a --- /dev/null +++ b/Sanity/Master-server-chrooted-reverse-lookup/PURPOSE @@ -0,0 +1,6 @@ +PURPOSE of /CoreOS/bind/Sanity/Master-server-chrooted-reverse-lookup +Description: Set up master nameserver, run some reverse queries + This is a very basic sanity test for bind9. + The main purpose for me was to learn how + bind works :-) +Author: Martin Cermak diff --git a/Sanity/Master-server-chrooted-reverse-lookup/named.conf b/Sanity/Master-server-chrooted-reverse-lookup/named.conf new file mode 100644 index 0000000..84eea24 --- /dev/null +++ b/Sanity/Master-server-chrooted-reverse-lookup/named.conf @@ -0,0 +1,11 @@ +options { + directory "/var/named"; + allow-query { any; }; +}; + +zone "1.0.10.in-addr.arpa" IN { + type master; + file ".rr.zone"; + allow-update { none; }; +}; + diff --git a/Sanity/Master-server-chrooted-reverse-lookup/runtest.sh b/Sanity/Master-server-chrooted-reverse-lookup/runtest.sh new file mode 100755 index 0000000..0392bdc --- /dev/null +++ b/Sanity/Master-server-chrooted-reverse-lookup/runtest.sh @@ -0,0 +1,99 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/bind/Sanity/Master-server-chrooted-reverse-lookup +# Description: Set up master nameserver, test it. +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2009 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 +#set -x +. /usr/bin/rhts-environment.sh +. /usr/lib/beakerlib/beakerlib.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +# Some heplful functions +randomString () { + TEMPSTR=`date +%c%N | md5sum | awk '{print $1}'` + echo ${TEMPSTR:0:8} + unset TEMPSTR +} + +randomNo () { + echo $[ $RANDOM / 256 + 1 ] +} + +randomSerial () { + date +%N +} + +# Variable declarations +SERIAL=`randomSerial` +NO1=`randomNo` +NO2=`randomNo` +NO3=`randomNo` +ORIGPWD=`pwd` + +# The test +rlJournalStart + rlPhaseStartSetup + rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + + rlRun "rlImport bind/bind-setup" + #rlRun "wget --quiet http://nest.test.redhat.com/mnt/qa/scratch/mcermak/bind-setup.tar.gz && tar xvzf bind-setup.tar.gz > /dev/null && . bind-setup/bind-setup.sh" 0 "Imported bind-setup functions." + + bsBindSetupStart "$ORIGPWD/named.conf" "on" + + rlRun "TDOMAIN=`randomString`.cz" + rlRun "TZONEFILE=$ROOTDIR/var/named/$TDOMAIN.rr.zone" + rlRun "sed -i \"s//$TDOMAIN/g\" /etc/named.conf" + + # zonefile + rlRun "cp $ORIGPWD/zonefile $TZONEFILE" + rlRun "chmod a+r $TZONEFILE" + rlRun "sed -i \"s//$TDOMAIN/g\" $TZONEFILE" + rlRun "sed -i \"s//$SERIAL/g\" $TZONEFILE" + rlRun "sed -i \"s//$NO1/g\" $TZONEFILE" + rlRun "sed -i \"s//$NO2/g\" $TZONEFILE" + rlRun "sed -i \"s//$NO3/g\" $TZONEFILE" + if rlIsRHEL 5; then + rlRun "cp /etc/named.conf $ROOTDIR/etc/named.conf" + fi + bsBindSetupDone chroot + rlPhaseEnd + + rlPhaseStartTest + # perform tests + rlRun "dig @localhost -x 10.0.1.$NO1 +short | grep \"^alice.$TDOMAIN.$\"" + rlRun "dig @localhost -x 10.0.1.$NO2 +short | grep \"^betty.$TDOMAIN.$\"" + rlRun "dig @localhost -x 10.0.1.$NO3 +short | grep \"^charlie.$TDOMAIN.$\"" + rlPhaseEnd + + rlPhaseStartCleanup + bsBindSetupCleanup chroot + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlRun "rm -rf $TZONEFILE" + rlPhaseEnd +rlJournalEnd diff --git a/Sanity/Master-server-chrooted-reverse-lookup/zonefile b/Sanity/Master-server-chrooted-reverse-lookup/zonefile new file mode 100644 index 0000000..c2c642f --- /dev/null +++ b/Sanity/Master-server-chrooted-reverse-lookup/zonefile @@ -0,0 +1,16 @@ +$ORIGIN 1.0.10.in-addr.arpa. +$TTL 86400 +@ IN SOA dns1.. hostmaster.. ( + ; serial + 21600 ; refresh after 6 hours + 3600 ; retry after 1 hour + 604800 ; expire after 1 week + 86400 ) ; minimum TTL of 1 day + + IN NS dns1.. + IN NS dns2.. + + IN PTR alice.. + IN PTR betty.. + IN PTR charlie.. + diff --git a/Sanity/Master-server-chrooted/Makefile b/Sanity/Master-server-chrooted/Makefile new file mode 100644 index 0000000..7755294 --- /dev/null +++ b/Sanity/Master-server-chrooted/Makefile @@ -0,0 +1,66 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/bind/Sanity/Master-server-chrooted +# Description: Set up master nameserver, test it. +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2009 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/Master-server-chrooted +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf zonefile + +.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: Martin Cermak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Set up master nameserver in chrooted env, test it." >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 25m" >> $(METADATA) + @echo "RunFor: bind" >> $(METADATA) + @echo "Requires: bind" >> $(METADATA) + @echo "Requires: bind-chroot" >> $(METADATA) + @echo "Requires: bind-utils" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "RhtsRequires: library(bind/bind-setup)" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/Sanity/Master-server-chrooted/PURPOSE b/Sanity/Master-server-chrooted/PURPOSE new file mode 100644 index 0000000..9999c53 --- /dev/null +++ b/Sanity/Master-server-chrooted/PURPOSE @@ -0,0 +1,6 @@ +PURPOSE of /CoreOS/bind/Sanity/Master-server-chrooted +Description: Set up master nameserver in chrooted env, test it. + This is a very basic sanity test for bind9. + The main purpose for me was to learn how + bind works :-) +Author: Martin Cermak diff --git a/Sanity/Master-server-chrooted/named.conf b/Sanity/Master-server-chrooted/named.conf new file mode 100644 index 0000000..e477af9 --- /dev/null +++ b/Sanity/Master-server-chrooted/named.conf @@ -0,0 +1,11 @@ +options { + directory "/var/named"; + allow-query { any; }; +}; + +zone "" IN { + type master; + file ".zone"; + allow-update { none; }; +}; + diff --git a/Sanity/Master-server-chrooted/runtest.sh b/Sanity/Master-server-chrooted/runtest.sh new file mode 100755 index 0000000..04415ea --- /dev/null +++ b/Sanity/Master-server-chrooted/runtest.sh @@ -0,0 +1,115 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/bind/Sanity/Master-server-chrooted +# Description: Set up master nameserver, test it. +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2009 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 +#set -x +. /usr/bin/rhts-environment.sh +. /usr/lib/beakerlib/beakerlib.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +# Some heplful functions +randomString () { + TEMPSTR=`date +%c%N | md5sum | awk '{print $1}'` + echo ${TEMPSTR:0:8} + unset TEMPSTR +} + +randomIp () { + echo "192.168.1.`echo $[ $RANDOM / 256 + 1 ]`" +} + +randomSerial () { + date +%N +} + +# Variable declarations +CONF="/etc/named.conf" +IP1=`randomIp` +IP2=`randomIp` +IP3=`randomIp` +IP4=`randomIp` +IP5=`randomIp` +SERIAL=`randomSerial` +ORIGPWD=`pwd` + +# The test +rlJournalStart + rlPhaseStartSetup + rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + + rlRun "rlImport bind/bind-setup" + #rlRun "wget --quiet http://nest.test.redhat.com/mnt/qa/scratch/mcermak/bind-setup.tar.gz && tar xvzf bind-setup.tar.gz > /dev/null && . bind-setup/bind-setup.sh" 0 "Imported bind-setup functions." + + bsBindSetupStart "$ORIGPWD/named.conf" "on" + + rlRun "TDOMAIN=`randomString`.cz" + rlRun "TZONEFILE=$ROOTDIR/var/named/$TDOMAIN.zone" + + # set up /etc/named.conf + rlRun "sed -i \"s//$TDOMAIN/g\" $CONF" + + # set up zonefile + rlRun "cp $ORIGPWD/zonefile $TZONEFILE" + rlRun "chmod a+r $TZONEFILE" + rlRun "sed -i \"s//$TDOMAIN/g\" $TZONEFILE" + rlRun "sed -i \"s//$IP1/g\" $TZONEFILE" + rlRun "sed -i \"s//$IP2/g\" $TZONEFILE" + rlRun "sed -i \"s//$IP3/g\" $TZONEFILE" + rlRun "sed -i \"s//$IP4/g\" $TZONEFILE" + rlRun "sed -i \"s//$IP5/g\" $TZONEFILE" + rlRun "sed -i \"s//$SERIAL/g\" $TZONEFILE" + if rlIsRHEL 5; then + rlRun "cp /etc/named.conf $ROOTDIR/etc/named.conf" + fi + + bsBindSetupDone chroot + rlPhaseEnd + + rlPhaseStartTest + # perform tests + rlRun "dig @localhost $TDOMAIN | grep \"^$TDOMAIN\" | head -n 1 | grep \"$IP1\"" + rlRun "dig @localhost server1.$TDOMAIN | grep \"^server1.$TDOMAIN\" | grep \"$IP2\"" + rlRun "dig @localhost server2.$TDOMAIN | grep \"^server2.$TDOMAIN\" | grep \"$IP3\"" + rlRun "dig @localhost dns1.$TDOMAIN | grep \"^dns1.$TDOMAIN\" | grep \"$IP4\"" + rlRun "dig @localhost dns2.$TDOMAIN | grep \"^dns2.$TDOMAIN\" | grep \"$IP5\"" + rlRun "dig @localhost ftp.$TDOMAIN | grep \"^ftp.$TDOMAIN\" | grep \"server1.$TDOMAIN\"" + rlRun "dig @localhost mail.$TDOMAIN | grep \"^mail.$TDOMAIN\" | grep \"server1.$TDOMAIN\"" + rlRun "dig @localhost mail2.$TDOMAIN | grep \"^mail2.$TDOMAIN\" | grep \"server2.$TDOMAIN\"" + rlRun "dig @localhost www.$TDOMAIN | grep \"^www.$TDOMAIN\" | grep \"server2.$TDOMAIN\"" + + rlPhaseEnd + + rlPhaseStartCleanup + bsBindSetupCleanup chroot + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlRun "rm -rf $TZONEFILE" + rlPhaseEnd + rlJournalPrintText +rlJournalEnd diff --git a/Sanity/Master-server-chrooted/zonefile b/Sanity/Master-server-chrooted/zonefile new file mode 100644 index 0000000..198991e --- /dev/null +++ b/Sanity/Master-server-chrooted/zonefile @@ -0,0 +1,27 @@ +$ORIGIN . +$TTL 86400 +@ IN SOA dns1.. hostmaster.. ( + ; serial + 21600 ; refresh after 6 hours + 3600 ; retry after 1 hour + 604800 ; expire after 1 week + 86400 ) ; minimum TTL of 1 day + + IN NS dns1.. + IN NS dns2.. + + IN MX 10 mail.. + IN MX 20 mail2.. + + IN A + +server1 IN A +server2 IN A +dns1 IN A +dns2 IN A + +ftp IN CNAME server1 +mail IN CNAME server1 +mail2 IN CNAME server2 +www IN CNAME server2 + diff --git a/Sanity/Master-server-not-chrooted-reverse-lookup/Makefile b/Sanity/Master-server-not-chrooted-reverse-lookup/Makefile new file mode 100644 index 0000000..ccddd20 --- /dev/null +++ b/Sanity/Master-server-not-chrooted-reverse-lookup/Makefile @@ -0,0 +1,65 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/bind/Sanity/Master-server-not-chrooted-reverse-lookup +# Description: Set up master nameserver, test it. +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2009 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/Master-server-not-chrooted-reverse-lookup +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf zonefile + +.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: Martin Cermak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Set up master nameserver, test it." >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 150m" >> $(METADATA) + @echo "RunFor: bind" >> $(METADATA) + @echo "Requires: bind bind-chroot redhat-lsb" >> $(METADATA) + @echo "Requires: bind-utils" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "RhtsRequires: library(bind/bind-setup)" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/Sanity/Master-server-not-chrooted-reverse-lookup/PURPOSE b/Sanity/Master-server-not-chrooted-reverse-lookup/PURPOSE new file mode 100644 index 0000000..e4d3062 --- /dev/null +++ b/Sanity/Master-server-not-chrooted-reverse-lookup/PURPOSE @@ -0,0 +1,6 @@ +PURPOSE of /CoreOS/bind/Sanity/Master-server-not-chrooted-reverse-lookup +Description: Set up master nameserver, run some reverse queries + This is a very basic sanity test for bind9. + The main purpose for me was to learn how + bind works :-) +Author: Martin Cermak diff --git a/Sanity/Master-server-not-chrooted-reverse-lookup/named.conf b/Sanity/Master-server-not-chrooted-reverse-lookup/named.conf new file mode 100644 index 0000000..84eea24 --- /dev/null +++ b/Sanity/Master-server-not-chrooted-reverse-lookup/named.conf @@ -0,0 +1,11 @@ +options { + directory "/var/named"; + allow-query { any; }; +}; + +zone "1.0.10.in-addr.arpa" IN { + type master; + file ".rr.zone"; + allow-update { none; }; +}; + diff --git a/Sanity/Master-server-not-chrooted-reverse-lookup/runtest.sh b/Sanity/Master-server-not-chrooted-reverse-lookup/runtest.sh new file mode 100644 index 0000000..284f285 --- /dev/null +++ b/Sanity/Master-server-not-chrooted-reverse-lookup/runtest.sh @@ -0,0 +1,97 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/bind/Sanity/Master-server-not-chrooted-reverse-lookup +# Description: Set up master nameserver, test it. +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2009 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 +#set -x +. /usr/bin/rhts-environment.sh +. /usr/lib/beakerlib/beakerlib.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +# Some heplful functions +randomString () { + TEMPSTR=`date +%c%N | md5sum | awk '{print $1}'` + echo ${TEMPSTR:0:8} + unset TEMPSTR +} + +randomNo () { + echo $[ $RANDOM / 256 + 1 ] +} + +randomSerial () { + date +%N +} + +# Variable declarations +SERIAL=`randomSerial` +NO1=`randomNo` +NO2=`randomNo` +NO3=`randomNo` +ORIGPWD=`pwd` + +# The test +rlJournalStart + rlPhaseStartSetup + rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + + rlRun "rlImport bind/bind-setup" + #rlRun "wget --quiet http://nest.test.redhat.com/mnt/qa/scratch/mcermak/bind-setup.tar.gz && tar xvzf bind-setup.tar.gz > /dev/null && . bind-setup/bind-setup.sh" 0 "Imported bind-setup functions." + + bsBindSetupStart "$ORIGPWD/named.conf" "off" + + rlRun "TDOMAIN=`randomString`.cz" + rlRun "TZONEFILE=$ROOTDIR/var/named/$TDOMAIN.rr.zone" + rlRun "sed -i \"s//$TDOMAIN/g\" /etc/named.conf" + + # zonefile + rlRun "cp $ORIGPWD/zonefile $TZONEFILE" + rlRun "chmod a+r $TZONEFILE" + rlRun "sed -i \"s//$TDOMAIN/g\" $TZONEFILE" + rlRun "sed -i \"s//$SERIAL/g\" $TZONEFILE" + rlRun "sed -i \"s//$NO1/g\" $TZONEFILE" + rlRun "sed -i \"s//$NO2/g\" $TZONEFILE" + rlRun "sed -i \"s//$NO3/g\" $TZONEFILE" + + bsBindSetupDone + rlPhaseEnd + + rlPhaseStartTest + # perform tests + rlRun "dig @localhost -x 10.0.1.$NO1 +short | grep \"^alice.$TDOMAIN.$\"" + rlRun "dig @localhost -x 10.0.1.$NO2 +short | grep \"^betty.$TDOMAIN.$\"" + rlRun "dig @localhost -x 10.0.1.$NO3 +short | grep \"^charlie.$TDOMAIN.$\"" + rlPhaseEnd + + rlPhaseStartCleanup + bsBindSetupCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlRun "rm -rf $TZONEFILE" + rlPhaseEnd +rlJournalEnd diff --git a/Sanity/Master-server-not-chrooted-reverse-lookup/zonefile b/Sanity/Master-server-not-chrooted-reverse-lookup/zonefile new file mode 100644 index 0000000..c2c642f --- /dev/null +++ b/Sanity/Master-server-not-chrooted-reverse-lookup/zonefile @@ -0,0 +1,16 @@ +$ORIGIN 1.0.10.in-addr.arpa. +$TTL 86400 +@ IN SOA dns1.. hostmaster.. ( + ; serial + 21600 ; refresh after 6 hours + 3600 ; retry after 1 hour + 604800 ; expire after 1 week + 86400 ) ; minimum TTL of 1 day + + IN NS dns1.. + IN NS dns2.. + + IN PTR alice.. + IN PTR betty.. + IN PTR charlie.. + diff --git a/Sanity/Master-server-not-chrooted/Makefile b/Sanity/Master-server-not-chrooted/Makefile new file mode 100644 index 0000000..9e9b637 --- /dev/null +++ b/Sanity/Master-server-not-chrooted/Makefile @@ -0,0 +1,65 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/bind/Sanity/Master-server-not-chrooted +# Description: Set up master nameserver, test it. +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2009 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/Master-server-not-chrooted +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf zonefile + +.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: Martin Cermak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Set up master nameserver in chrooted env, test it." >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 90m" >> $(METADATA) + @echo "RunFor: bind" >> $(METADATA) + @echo "Requires: bind bind-chroot redhat-lsb" >> $(METADATA) + @echo "Requires: bind-utils" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "RhtsRequires: library(bind/bind-setup)" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/Sanity/Master-server-not-chrooted/PURPOSE b/Sanity/Master-server-not-chrooted/PURPOSE new file mode 100644 index 0000000..92cb7bd --- /dev/null +++ b/Sanity/Master-server-not-chrooted/PURPOSE @@ -0,0 +1,6 @@ +PURPOSE of /CoreOS/bind/Sanity/Master-server-not-chrooted +Description: Set up master nameserver in chrooted env, test it. + This is a very basic sanity test for bind9. + The main purpose for me was to learn how + bind works :-) +Author: Martin Cermak diff --git a/Sanity/Master-server-not-chrooted/named.conf b/Sanity/Master-server-not-chrooted/named.conf new file mode 100644 index 0000000..e477af9 --- /dev/null +++ b/Sanity/Master-server-not-chrooted/named.conf @@ -0,0 +1,11 @@ +options { + directory "/var/named"; + allow-query { any; }; +}; + +zone "" IN { + type master; + file ".zone"; + allow-update { none; }; +}; + diff --git a/Sanity/Master-server-not-chrooted/runtest.sh b/Sanity/Master-server-not-chrooted/runtest.sh new file mode 100644 index 0000000..3f30750 --- /dev/null +++ b/Sanity/Master-server-not-chrooted/runtest.sh @@ -0,0 +1,115 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/bind/Sanity/Master-server-not-chrooted +# Description: Set up master nameserver, test it. +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2009 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 +#set -x +. /usr/bin/rhts-environment.sh +. /usr/lib/beakerlib/beakerlib.sh + +# Some heplful functions +randomString () { + TEMPSTR=`date +%c%N | md5sum | awk '{print $1}'` + echo ${TEMPSTR:0:8} + unset TEMPSTR +} + +randomIp () { + echo "192.168.1.`echo $[ $RANDOM / 256 + 1 ]`" +} + +randomSerial () { + date +%N +} + +# Variable declarations +CONF="/etc/named.conf" +IP1=`randomIp` +IP2=`randomIp` +IP3=`randomIp` +IP4=`randomIp` +IP5=`randomIp` +SERIAL=`randomSerial` +ORIGPWD=`pwd` + +# The test +rlJournalStart + rlPhaseStartSetup + rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + + rlRun "rlImport bind/bind-setup" + + bsBindSetupStart "$ORIGPWD/named.conf" "off" + + rlRun "TDOMAIN=`randomString`.cz" + rlRun "TZONEFILE=$ROOTDIR/var/named/$TDOMAIN.zone" + + # set up /etc/named.conf + rlRun "sed -i \"s//$TDOMAIN/g\" $CONF" + + # set up zonefile + rlRun "cp $ORIGPWD/zonefile $TZONEFILE" + rlRun "chmod a+r $TZONEFILE" + rlRun "sed -i \"s//$TDOMAIN/g\" $TZONEFILE" + rlRun "sed -i \"s//$IP1/g\" $TZONEFILE" + rlRun "sed -i \"s//$IP2/g\" $TZONEFILE" + rlRun "sed -i \"s//$IP3/g\" $TZONEFILE" + rlRun "sed -i \"s//$IP4/g\" $TZONEFILE" + rlRun "sed -i \"s//$IP5/g\" $TZONEFILE" + rlRun "sed -i \"s//$SERIAL/g\" $TZONEFILE" + + bsBindSetupDone + rlPhaseEnd + + rlPhaseStartTest + # perform tests + rlRun "dig @localhost $TDOMAIN | grep \"^$TDOMAIN\" | head -n 1 | grep \"$IP1\"" + rlRun "dig @localhost server1.$TDOMAIN | grep \"^server1.$TDOMAIN\" | grep \"$IP2\"" + rlRun "dig @localhost server2.$TDOMAIN | grep \"^server2.$TDOMAIN\" | grep \"$IP3\"" + rlRun "dig @localhost dns1.$TDOMAIN | grep \"^dns1.$TDOMAIN\" | grep \"$IP4\"" + rlRun "dig @localhost dns2.$TDOMAIN | grep \"^dns2.$TDOMAIN\" | grep \"$IP5\"" + rlRun "dig @localhost ftp.$TDOMAIN | grep \"^ftp.$TDOMAIN\" | grep \"server1.$TDOMAIN\"" + rlRun "dig @localhost mail.$TDOMAIN | grep \"^mail.$TDOMAIN\" | grep \"server1.$TDOMAIN\"" + rlRun "dig @localhost mail2.$TDOMAIN | grep \"^mail2.$TDOMAIN\" | grep \"server2.$TDOMAIN\"" + rlRun "dig @localhost www.$TDOMAIN | grep \"^www.$TDOMAIN\" | grep \"server2.$TDOMAIN\"" + + rlPhaseEnd +#for i in `seq 1 8888888888888888`;do echo "ftp$i IN CNAME server1" >> $TZONEFILE ;done +#service named stop +#sleep 1 +#service named start +#####dig @localhost ftp100.f759b6bf.cz +#dig @localhost ftp88888888.$TDOMAIN | grep \"^ftp.$TDOMAIN\" | grep \"server1.$TDOMAIN\"" + + rlPhaseStartCleanup + bsBindSetupCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlRun "rm -rf $TZONEFILE" + rlPhaseEnd +rlJournalEnd diff --git a/Sanity/Master-server-not-chrooted/zonefile b/Sanity/Master-server-not-chrooted/zonefile new file mode 100644 index 0000000..198991e --- /dev/null +++ b/Sanity/Master-server-not-chrooted/zonefile @@ -0,0 +1,27 @@ +$ORIGIN . +$TTL 86400 +@ IN SOA dns1.. hostmaster.. ( + ; serial + 21600 ; refresh after 6 hours + 3600 ; retry after 1 hour + 604800 ; expire after 1 week + 86400 ) ; minimum TTL of 1 day + + IN NS dns1.. + IN NS dns2.. + + IN MX 10 mail.. + IN MX 20 mail2.. + + IN A + +server1 IN A +server2 IN A +dns1 IN A +dns2 IN A + +ftp IN CNAME server1 +mail IN CNAME server1 +mail2 IN CNAME server2 +www IN CNAME server2 + diff --git a/Sanity/Run-internal-BIND-test-suite/Makefile b/Sanity/Run-internal-BIND-test-suite/Makefile new file mode 100644 index 0000000..ee5ee21 --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/Makefile @@ -0,0 +1,71 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/bind/Sanity/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. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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) + + +include /usr/share/rhts/lib/rhts-make.include + +$(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 perl-Net-DNS rpm-build bind-utils" >> $(METADATA) + @echo "Requires: bind-pkcs11 bind-pkcs11-utils softhsm" >> $(METADATA) + @echo "Requires: openssl-devel libtool autoconf" >> $(METADATA) + @echo "Requires: libcap-devel libidn-devel libxml2-devel" >> $(METADATA) + @echo "Requires: openldap-devel postgresql-devel" >> $(METADATA) + @echo "Requires: sqlite-devel krb5-devel net-tools perl-Net-DNS-Nameserver" >> $(METADATA) + @echo "Requires: yum-utils dnf-utils" >> $(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) + + rhts-lint $(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..3fcf82b --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/PURPOSE @@ -0,0 +1,6 @@ +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/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..f9618b6 --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/knownerror @@ -0,0 +1 @@ +A:System test dlz diff --git a/Sanity/Run-internal-BIND-test-suite/knownerror.el6 b/Sanity/Run-internal-BIND-test-suite/knownerror.el6 new file mode 100644 index 0000000..1e49e21 --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/knownerror.el6 @@ -0,0 +1,2 @@ +A:System test rrl +A:System test autosign diff --git a/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.0 b/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.0 new file mode 100644 index 0000000..b590526 --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.0 @@ -0,0 +1,3 @@ +dlz +dnssec +idna diff --git a/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.1 b/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.1 new file mode 100644 index 0000000..eefa932 --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.1 @@ -0,0 +1,3 @@ +dlz +dnssec +mkeys diff --git a/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.2 b/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.2 new file mode 100644 index 0000000..58401c0 --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.2 @@ -0,0 +1 @@ +dlz 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..13bd330 --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/runtest.sh @@ -0,0 +1,242 @@ +#!/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 +# 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. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# 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/bin/rhts-environment.sh +. /usr/lib/beakerlib/beakerlib.sh + +PACKAGE="" +rpm -q bind && PACKAGE="bind" +rpm -q bind97 && PACKAGE="bind97" + +rlJournalStart + rlPhaseStartSetup + 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 + + #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 [ -n "$QUICK" ]; then + REUSE_BUILD=y + MAKE_TEST='test -j4' + 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 + #not checking return code: 1mt and beaker uses different names for repo + 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 + 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 + + 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 + rlRun "dnf -y module enable idm:DL1" + fi + + if dnf builddep --help >/dev/null; then + rlRun "dnf -y builddep --nobest *.spec" + 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 + + # stop bind if it is running + service named stop + rlPhaseEnd + + rlPhaseStartTest + 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*" + + rlLogInfo "Test takes place in `pwd`" + + rlRun "chown -R root ." + + if [ -x "$SETUP_SOFTHSM" ]; 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" + # 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" + + # Try to fix tssgsig failures on some machines, do not use system kerberos configuration + export KRB5_CONFIG=/dev/null + # Allow speedup by defining MAKE_TEST='test -j4' on multiprocessor machines + rlRun "make ${MAKE_TEST:-test} &> $TMPDIR/test.txt" 0-255 "Perform the test." + 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 + rlRun "popd" + + rlRun "grep -C 10 FAIL $TMPDIR/test.txt" 0-255 "Quickly show the test error (if any)." + + rlRun "./bin/tests/system/ifconfig.sh down" 0 "Remove fake network interfaces." + + + #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 + rlPhaseEnd + + rlPhaseStartCleanup "`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 + rlRun "popd" + rlRun "rm -r $TMPDIR" 0 "Removing tmp directory" + rlRun "rm -rf $FOUNDERROR" + 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 d32992ae197b48d37b42748bc1a3b7a1dbaad339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 9 Oct 2019 17:49:58 +0200 Subject: [PATCH 4/9] More tmt imports --- Sanity/Master-server-chrooted-reverse-lookup/main.fmf | 11 +++++++++++ Sanity/Master-server-chrooted/main.fmf | 11 +++++++++++ .../main.fmf | 10 ++++++++++ Sanity/Master-server-not-chrooted/main.fmf | 10 ++++++++++ Sanity/Run-internal-BIND-test-suite/main.fmf | 9 +++++++++ 5 files changed, 51 insertions(+) create mode 100644 Sanity/Master-server-chrooted-reverse-lookup/main.fmf create mode 100644 Sanity/Master-server-chrooted/main.fmf create mode 100644 Sanity/Master-server-not-chrooted-reverse-lookup/main.fmf create mode 100644 Sanity/Master-server-not-chrooted/main.fmf create mode 100644 Sanity/Run-internal-BIND-test-suite/main.fmf diff --git a/Sanity/Master-server-chrooted-reverse-lookup/main.fmf b/Sanity/Master-server-chrooted-reverse-lookup/main.fmf new file mode 100644 index 0000000..9caa22b --- /dev/null +++ b/Sanity/Master-server-chrooted-reverse-lookup/main.fmf @@ -0,0 +1,11 @@ +component: bind +contact: Petr Sklenar +description: |4 + This is a very basic sanity test for bind9. + The main purpose for me was to learn how + bind works :-) + Author: Martin Cermak +duration: 5m +relevancy: | + distro > rhel-6 && product != rhscl: False +summary: Set up master nameserver in chrooted env, test it. diff --git a/Sanity/Master-server-chrooted/main.fmf b/Sanity/Master-server-chrooted/main.fmf new file mode 100644 index 0000000..373ffc0 --- /dev/null +++ b/Sanity/Master-server-chrooted/main.fmf @@ -0,0 +1,11 @@ +component: bind +contact: Petr Sklenar +description: |4 + This is a very basic sanity test for bind9. + The main purpose for me was to learn how + bind works :-) + Author: Martin Cermak +duration: 25m +relevancy: | + distro > rhel-6 && product != rhscl: False +summary: Set up master nameserver in chrooted env, test it. diff --git a/Sanity/Master-server-not-chrooted-reverse-lookup/main.fmf b/Sanity/Master-server-not-chrooted-reverse-lookup/main.fmf new file mode 100644 index 0000000..3203079 --- /dev/null +++ b/Sanity/Master-server-not-chrooted-reverse-lookup/main.fmf @@ -0,0 +1,10 @@ +component: bind +contact: Petr Sklenar +description: |4 + This is a very basic sanity test for bind9. + The main purpose for me was to learn how + bind works :-) + Author: Martin Cermak +duration: 150m +relevancy: '' +summary: Set up master nameserver, test it. diff --git a/Sanity/Master-server-not-chrooted/main.fmf b/Sanity/Master-server-not-chrooted/main.fmf new file mode 100644 index 0000000..92358c9 --- /dev/null +++ b/Sanity/Master-server-not-chrooted/main.fmf @@ -0,0 +1,10 @@ +component: bind +contact: Petr Sklenar +description: |4 + This is a very basic sanity test for bind9. + The main purpose for me was to learn how + bind works :-) + Author: Martin Cermak +duration: 90m +relevancy: '' +summary: Set up master nameserver in chrooted env, test it. 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..905d1be --- /dev/null +++ b/Sanity/Run-internal-BIND-test-suite/main.fmf @@ -0,0 +1,9 @@ +component: bind +contact: Petr Sklenar +description: |+ + Bug summary: Run internal BIND test suite + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=642970 + +duration: 8h +relevancy: '' +summary: Run internal BIND test suite From fa7d6c22dd5c98c83a59a395b63467d930dd126f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 9 Oct 2019 18:00:48 +0200 Subject: [PATCH 5/9] Import internal test suite from Fedora --- Sanity/Run-internal-BIND-test-suite/Makefile | 20 +- Sanity/Run-internal-BIND-test-suite/PURPOSE | 2 +- .../Run-internal-BIND-test-suite/knownerror | 1 + .../knownerror.el6 | 2 - .../knownerror.rhel-8.0 | 3 - .../knownerror.rhel-8.1 | 3 - .../knownerror.rhel-8.2 | 1 - .../Run-internal-BIND-test-suite/runtest.sh | 207 +++++++----------- 8 files changed, 90 insertions(+), 149 deletions(-) delete mode 100644 Sanity/Run-internal-BIND-test-suite/knownerror.el6 delete mode 100644 Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.0 delete mode 100644 Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.1 delete mode 100644 Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.2 diff --git a/Sanity/Run-internal-BIND-test-suite/Makefile b/Sanity/Run-internal-BIND-test-suite/Makefile index ee5ee21..5c1b35f 100644 --- a/Sanity/Run-internal-BIND-test-suite/Makefile +++ b/Sanity/Run-internal-BIND-test-suite/Makefile @@ -1,8 +1,9 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# Makefile of /CoreOS/bind/Sanity/Run-internal-BIND-test-suite +# Makefile of tests/Run-internal-BIND-test-suite # Description: Run internal BIND test suite # Author: Martin Cermak +# Author: Petr Mensik # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # @@ -54,14 +55,19 @@ $(METADATA): Makefile @echo "Type: Sanity" >> $(METADATA) @echo "TestTime: 8h" >> $(METADATA) @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind perl-Net-DNS rpm-build bind-utils" >> $(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) - @echo "Requires: libcap-devel libidn-devel libxml2-devel" >> $(METADATA) - @echo "Requires: openldap-devel postgresql-devel" >> $(METADATA) - @echo "Requires: sqlite-devel krb5-devel net-tools perl-Net-DNS-Nameserver" >> $(METADATA) - @echo "Requires: yum-utils dnf-utils" >> $(METADATA) - @echo "Requires: gcc-c++" >> $(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) diff --git a/Sanity/Run-internal-BIND-test-suite/PURPOSE b/Sanity/Run-internal-BIND-test-suite/PURPOSE index 3fcf82b..754ba2a 100644 --- a/Sanity/Run-internal-BIND-test-suite/PURPOSE +++ b/Sanity/Run-internal-BIND-test-suite/PURPOSE @@ -1,4 +1,4 @@ -PURPOSE of /CoreOS/bind/Sanity/Run-internal-BIND-test-suite +PURPOSE of tests/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 f9618b6..2d0c8e9 100644 --- a/Sanity/Run-internal-BIND-test-suite/knownerror +++ b/Sanity/Run-internal-BIND-test-suite/knownerror @@ -1 +1,2 @@ A:System test dlz +A:System test idna diff --git a/Sanity/Run-internal-BIND-test-suite/knownerror.el6 b/Sanity/Run-internal-BIND-test-suite/knownerror.el6 deleted file mode 100644 index 1e49e21..0000000 --- a/Sanity/Run-internal-BIND-test-suite/knownerror.el6 +++ /dev/null @@ -1,2 +0,0 @@ -A:System test rrl -A:System test autosign diff --git a/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.0 b/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.0 deleted file mode 100644 index b590526..0000000 --- a/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.0 +++ /dev/null @@ -1,3 +0,0 @@ -dlz -dnssec -idna diff --git a/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.1 b/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.1 deleted file mode 100644 index eefa932..0000000 --- a/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.1 +++ /dev/null @@ -1,3 +0,0 @@ -dlz -dnssec -mkeys diff --git a/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.2 b/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.2 deleted file mode 100644 index 58401c0..0000000 --- a/Sanity/Run-internal-BIND-test-suite/knownerror.rhel-8.2 +++ /dev/null @@ -1 +0,0 @@ -dlz diff --git a/Sanity/Run-internal-BIND-test-suite/runtest.sh b/Sanity/Run-internal-BIND-test-suite/runtest.sh index 13bd330..7066344 100755 --- a/Sanity/Run-internal-BIND-test-suite/runtest.sh +++ b/Sanity/Run-internal-BIND-test-suite/runtest.sh @@ -2,7 +2,7 @@ # 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 +# runtest.sh of tests/Run-internal-BIND-test-suite # Description: Run internal BIND test suite # Author: Martin Cermak # @@ -25,122 +25,100 @@ # 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/bin/rhts-environment.sh . /usr/lib/beakerlib/beakerlib.sh -PACKAGE="" -rpm -q bind && PACKAGE="bind" -rpm -q bind97 && PACKAGE="bind97" +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 - 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 #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 [ -n "$QUICK" ]; then - REUSE_BUILD=y - MAKE_TEST='test -j4' 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 - #not checking return code: 1mt and beaker uses different names for repo - fi - # topdir - if rlIsRHEL 3 || rlIsRHEL 4 || rlIsRHEL 5; then - TOPDIR="/usr/src/redhat" - else - TOPDIR="/root/rpmbuild" - fi + TOPDIR=`rpm -E '%{_topdir}'` # 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 + rm -rf $TOPDIR/{BUILD,SOURCES,SPECS}/* # download src rpm - rlFetchSrcForInstalled "$PACKAGE" if ! ls bind*.src.rpm; then - rlRun "yumdownloader --source bind" 0 "Trying alternative fetch from repository" + 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" - # softhsm is no longer in normal repository. Enable idm module on RHEL8 to make softhsm module available - if rlIsRHEL 8 - then - rlRun "dnf -y module enable idm:DL1" - fi - - if dnf builddep --help >/dev/null; then - rlRun "dnf -y builddep --nobest *.spec" - 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 + rlRun "dnf -y builddep *.spec" # stop bind if it is running - service named stop + rlServiceStop named rlPhaseEnd rlPhaseStartTest - 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 + # rebuild from source + rlRun "rpmbuild -ba *.spec &> $TMPDIR/build.txt" # the test rlRun "cd $TOPDIR/BUILD/bind*" @@ -150,7 +128,7 @@ rlJournalStart rlRun "chown -R root ." if [ -x "$SETUP_SOFTHSM" ]; then - rlRun "eval $(bash $SETUP_SOFTHSM -A)" 0 "Preparing PKCS#11 token slot" + 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" @@ -168,75 +146,40 @@ rlJournalStart export LC_ALL=en_US.UTF-8 rlRun "pushd $BUILD" - # 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" - # Try to fix tssgsig failures on some machines, do not use system kerberos configuration - export KRB5_CONFIG=/dev/null - # Allow speedup by defining MAKE_TEST='test -j4' on multiprocessor machines - rlRun "make ${MAKE_TEST:-test} &> $TMPDIR/test.txt" 0-255 "Perform the test." - 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" + 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 - rlRun "popd" - rlRun "grep -C 10 FAIL $TMPDIR/test.txt" 0-255 "Quickly show the test error (if any)." + 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." - - #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 rlPhaseEnd - rlPhaseStartCleanup "`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 + 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" - rlRun "rm -rf $FOUNDERROR" rlPhaseEnd rlJournalEnd From a2b6c839ebb54a01fb461a401a3e1774e64866ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 9 Oct 2019 18:02:49 +0200 Subject: [PATCH 6/9] Import more tests from Fedora --- Sanity/Master-server-chrooted/Makefile | 41 +++--- Sanity/Master-server-chrooted/PURPOSE | 9 +- Sanity/Master-server-chrooted/runtest.sh | 127 ++++++------------- Sanity/Master-server-not-chrooted/Makefile | 2 +- Sanity/Master-server-not-chrooted/runtest.sh | 6 - 5 files changed, 64 insertions(+), 121 deletions(-) diff --git a/Sanity/Master-server-chrooted/Makefile b/Sanity/Master-server-chrooted/Makefile index 7755294..257c238 100644 --- a/Sanity/Master-server-chrooted/Makefile +++ b/Sanity/Master-server-chrooted/Makefile @@ -1,35 +1,34 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# Makefile of /CoreOS/bind/Sanity/Master-server-chrooted -# Description: Set up master nameserver, test it. -# Author: Martin Cermak +# Makefile of /CoreOS/tests/Sanity/Master-server-chrooted +# Description: Run basic empty named service and try to resolve localhost on it +# Author: Petr Mensik # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# Copyright (c) 2009 Red Hat, Inc. All rights reserved. +# Copyright (c) 2018 Red Hat, Inc. # -# 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 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. +# 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. +# 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/Master-server-chrooted +export TEST=/CoreOS/tests/Sanity/Master-server-chrooted export TESTVERSION=1.0 BUILT_FILES= -FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf zonefile +FILES=$(METADATA) runtest.sh Makefile PURPOSE .PHONY: all install download clean @@ -46,21 +45,19 @@ clean: include /usr/share/rhts/lib/rhts-make.include $(METADATA): Makefile - @echo "Owner: Martin Cermak " > $(METADATA) + @echo "Owner: Petr Mensik " > $(METADATA) @echo "Name: $(TEST)" >> $(METADATA) @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Set up master nameserver in chrooted env, test it." >> $(METADATA) + @echo "Description: Run basic empty named-chroot service and try to resolve localhost on it" >> $(METADATA) @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 25m" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind" >> $(METADATA) - @echo "Requires: bind-chroot" >> $(METADATA) - @echo "Requires: bind-utils" >> $(METADATA) + @echo "Requires: bind bind-utils bind-chroot bind-sdb-chroot" >> $(METADATA) @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) @echo "Confidential: no" >> $(METADATA) @echo "Destructive: no" >> $(METADATA) - @echo "RhtsRequires: library(bind/bind-setup)" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6" >> $(METADATA) rhts-lint $(METADATA) diff --git a/Sanity/Master-server-chrooted/PURPOSE b/Sanity/Master-server-chrooted/PURPOSE index 9999c53..1d01992 100644 --- a/Sanity/Master-server-chrooted/PURPOSE +++ b/Sanity/Master-server-chrooted/PURPOSE @@ -1,6 +1,3 @@ -PURPOSE of /CoreOS/bind/Sanity/Master-server-chrooted -Description: Set up master nameserver in chrooted env, test it. - This is a very basic sanity test for bind9. - The main purpose for me was to learn how - bind works :-) -Author: Martin Cermak +PURPOSE of /CoreOS/tests/Sanity/Master-server-chrooted +Description: Run basic empty named-chroot service and try to resolve localhost on it +Author: Petr Mensik diff --git a/Sanity/Master-server-chrooted/runtest.sh b/Sanity/Master-server-chrooted/runtest.sh index 04415ea..9ab80d2 100755 --- a/Sanity/Master-server-chrooted/runtest.sh +++ b/Sanity/Master-server-chrooted/runtest.sh @@ -1,115 +1,70 @@ #!/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 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# runtest.sh of /CoreOS/bind/Sanity/Master-server-chrooted -# Description: Set up master nameserver, test it. -# Author: Martin Cermak +# runtest.sh of /CoreOS/tests/Sanity/Master-server-chrooted +# Description: Run basic empty named-chroot service and try to resolve localhost on it +# Author: Petr Mensik # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# Copyright (c) 2009 Red Hat, Inc. All rights reserved. +# Copyright (c) 2018 Red Hat, Inc. # -# 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 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. +# 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. +# 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 rhts environment -#set -x -. /usr/bin/rhts-environment.sh -. /usr/lib/beakerlib/beakerlib.sh +# Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 -# Some heplful functions -randomString () { - TEMPSTR=`date +%c%N | md5sum | awk '{print $1}'` - echo ${TEMPSTR:0:8} - unset TEMPSTR +PACKAGE="bind" + +test_service() +{ + local SERVICE="$1" + rlRun "rlServiceStart $SERVICE" + rlRun "dig @localhost localhost | grep '^localhost'" + rlRun "dig @localhost -x 127.0.0.1 | grep 'PTR[[:space:]]\+localhost.$'" 0 "Reverse address works" + rlRun "rlServiceRestore $SERVICE" } -randomIp () { - echo "192.168.1.`echo $[ $RANDOM / 256 + 1 ]`" -} - -randomSerial () { - date +%N -} - -# Variable declarations -CONF="/etc/named.conf" -IP1=`randomIp` -IP2=`randomIp` -IP3=`randomIp` -IP4=`randomIp` -IP5=`randomIp` -SERIAL=`randomSerial` -ORIGPWD=`pwd` - -# The test rlJournalStart rlPhaseStartSetup - rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - - rlRun "rlImport bind/bind-setup" - #rlRun "wget --quiet http://nest.test.redhat.com/mnt/qa/scratch/mcermak/bind-setup.tar.gz && tar xvzf bind-setup.tar.gz > /dev/null && . bind-setup/bind-setup.sh" 0 "Imported bind-setup functions." - - bsBindSetupStart "$ORIGPWD/named.conf" "on" - - rlRun "TDOMAIN=`randomString`.cz" - rlRun "TZONEFILE=$ROOTDIR/var/named/$TDOMAIN.zone" - - # set up /etc/named.conf - rlRun "sed -i \"s//$TDOMAIN/g\" $CONF" - - # set up zonefile - rlRun "cp $ORIGPWD/zonefile $TZONEFILE" - rlRun "chmod a+r $TZONEFILE" - rlRun "sed -i \"s//$TDOMAIN/g\" $TZONEFILE" - rlRun "sed -i \"s//$IP1/g\" $TZONEFILE" - rlRun "sed -i \"s//$IP2/g\" $TZONEFILE" - rlRun "sed -i \"s//$IP3/g\" $TZONEFILE" - rlRun "sed -i \"s//$IP4/g\" $TZONEFILE" - rlRun "sed -i \"s//$IP5/g\" $TZONEFILE" - rlRun "sed -i \"s//$SERIAL/g\" $TZONEFILE" - if rlIsRHEL 5; then - rlRun "cp /etc/named.conf $ROOTDIR/etc/named.conf" - fi - - bsBindSetupDone chroot + rlAssertRpm bind + rlAssertRpm bind-utils + rlAssertRpm bind-chroot rlPhaseEnd - rlPhaseStartTest - # perform tests - rlRun "dig @localhost $TDOMAIN | grep \"^$TDOMAIN\" | head -n 1 | grep \"$IP1\"" - rlRun "dig @localhost server1.$TDOMAIN | grep \"^server1.$TDOMAIN\" | grep \"$IP2\"" - rlRun "dig @localhost server2.$TDOMAIN | grep \"^server2.$TDOMAIN\" | grep \"$IP3\"" - rlRun "dig @localhost dns1.$TDOMAIN | grep \"^dns1.$TDOMAIN\" | grep \"$IP4\"" - rlRun "dig @localhost dns2.$TDOMAIN | grep \"^dns2.$TDOMAIN\" | grep \"$IP5\"" - rlRun "dig @localhost ftp.$TDOMAIN | grep \"^ftp.$TDOMAIN\" | grep \"server1.$TDOMAIN\"" - rlRun "dig @localhost mail.$TDOMAIN | grep \"^mail.$TDOMAIN\" | grep \"server1.$TDOMAIN\"" - rlRun "dig @localhost mail2.$TDOMAIN | grep \"^mail2.$TDOMAIN\" | grep \"server2.$TDOMAIN\"" - rlRun "dig @localhost www.$TDOMAIN | grep \"^www.$TDOMAIN\" | grep \"server2.$TDOMAIN\"" + rlPhaseStartTest "Testing named" + test_service named + rlPhaseEnd + rlPhaseStartTest "Testing named-chroot" + test_service named-chroot + rlPhaseEnd + + rlPhaseStartTest "Testing named-sdb-chroot" + if rpm -q bind-sdb-chroot; then + test_service named-sdb-chroot + else + rlLog "bind-sdb-chroot not installed, skipping it" + fi rlPhaseEnd rlPhaseStartCleanup - bsBindSetupCleanup chroot - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlRun "rm -rf $TZONEFILE" + # noop rlPhaseEnd - rlJournalPrintText +rlJournalPrintText rlJournalEnd diff --git a/Sanity/Master-server-not-chrooted/Makefile b/Sanity/Master-server-not-chrooted/Makefile index 9e9b637..891a9a3 100644 --- a/Sanity/Master-server-not-chrooted/Makefile +++ b/Sanity/Master-server-not-chrooted/Makefile @@ -52,7 +52,7 @@ $(METADATA): Makefile @echo "Path: $(TEST_DIR)" >> $(METADATA) @echo "Description: Set up master nameserver in chrooted env, test it." >> $(METADATA) @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 90m" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) @echo "RunFor: bind" >> $(METADATA) @echo "Requires: bind bind-chroot redhat-lsb" >> $(METADATA) @echo "Requires: bind-utils" >> $(METADATA) diff --git a/Sanity/Master-server-not-chrooted/runtest.sh b/Sanity/Master-server-not-chrooted/runtest.sh index 3f30750..ec62a04 100644 --- a/Sanity/Master-server-not-chrooted/runtest.sh +++ b/Sanity/Master-server-not-chrooted/runtest.sh @@ -99,12 +99,6 @@ rlJournalStart rlRun "dig @localhost www.$TDOMAIN | grep \"^www.$TDOMAIN\" | grep \"server2.$TDOMAIN\"" rlPhaseEnd -#for i in `seq 1 8888888888888888`;do echo "ftp$i IN CNAME server1" >> $TZONEFILE ;done -#service named stop -#sleep 1 -#service named start -#####dig @localhost ftp100.f759b6bf.cz -#dig @localhost ftp88888888.$TDOMAIN | grep \"^ftp.$TDOMAIN\" | grep \"server1.$TDOMAIN\"" rlPhaseStartCleanup bsBindSetupCleanup From 8826cd4199e825be716972a052d840151bab6fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 20 Nov 2019 13:18:27 +0100 Subject: [PATCH 7/9] Add test run into metadata tmt would not find those data as tests. --- Sanity/CAA-support/main.fmf | 1 + Sanity/Master-server-chrooted-reverse-lookup/main.fmf | 1 + Sanity/Master-server-chrooted/main.fmf | 1 + Sanity/Master-server-not-chrooted-reverse-lookup/main.fmf | 1 + Sanity/Master-server-not-chrooted/main.fmf | 1 + Sanity/Run-internal-BIND-test-suite/main.fmf | 1 + 6 files changed, 6 insertions(+) diff --git a/Sanity/CAA-support/main.fmf b/Sanity/CAA-support/main.fmf index 35e52a5..b106996 100644 --- a/Sanity/CAA-support/main.fmf +++ b/Sanity/CAA-support/main.fmf @@ -5,3 +5,4 @@ duration: 10m relevancy: | distro = rhel-4, rhel-5: False summary: sanity testing of CAA support +test: make run diff --git a/Sanity/Master-server-chrooted-reverse-lookup/main.fmf b/Sanity/Master-server-chrooted-reverse-lookup/main.fmf index 9caa22b..1f32fee 100644 --- a/Sanity/Master-server-chrooted-reverse-lookup/main.fmf +++ b/Sanity/Master-server-chrooted-reverse-lookup/main.fmf @@ -9,3 +9,4 @@ duration: 5m relevancy: | distro > rhel-6 && product != rhscl: False summary: Set up master nameserver in chrooted env, test it. +test: make run diff --git a/Sanity/Master-server-chrooted/main.fmf b/Sanity/Master-server-chrooted/main.fmf index 373ffc0..ee43256 100644 --- a/Sanity/Master-server-chrooted/main.fmf +++ b/Sanity/Master-server-chrooted/main.fmf @@ -9,3 +9,4 @@ duration: 25m relevancy: | distro > rhel-6 && product != rhscl: False summary: Set up master nameserver in chrooted env, test it. +test: make run diff --git a/Sanity/Master-server-not-chrooted-reverse-lookup/main.fmf b/Sanity/Master-server-not-chrooted-reverse-lookup/main.fmf index 3203079..90a8ad5 100644 --- a/Sanity/Master-server-not-chrooted-reverse-lookup/main.fmf +++ b/Sanity/Master-server-not-chrooted-reverse-lookup/main.fmf @@ -8,3 +8,4 @@ description: |4 duration: 150m relevancy: '' summary: Set up master nameserver, test it. +test: make run diff --git a/Sanity/Master-server-not-chrooted/main.fmf b/Sanity/Master-server-not-chrooted/main.fmf index 92358c9..110d533 100644 --- a/Sanity/Master-server-not-chrooted/main.fmf +++ b/Sanity/Master-server-not-chrooted/main.fmf @@ -8,3 +8,4 @@ description: |4 duration: 90m relevancy: '' summary: Set up master nameserver in chrooted env, test it. +test: make run diff --git a/Sanity/Run-internal-BIND-test-suite/main.fmf b/Sanity/Run-internal-BIND-test-suite/main.fmf index 905d1be..09ded1b 100644 --- a/Sanity/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/Run-internal-BIND-test-suite/main.fmf @@ -7,3 +7,4 @@ description: |+ duration: 8h relevancy: '' summary: Run internal BIND test suite +test: make run From 9fb50bf4c52e6f566430eb962bc9a30354af938b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 20 Nov 2019 13:22:40 +0100 Subject: [PATCH 8/9] Mark main upstream test suite slow It tests the package best way. But it is quite slow. --- 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 09ded1b..c2228ca 100644 --- a/Sanity/Run-internal-BIND-test-suite/main.fmf +++ b/Sanity/Run-internal-BIND-test-suite/main.fmf @@ -8,3 +8,5 @@ duration: 8h relevancy: '' summary: Run internal BIND test suite test: make run +tag: [slow] +tier: 2 From a56c34d7c835abc249730517b7bb3b0ba00f546e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 20 Nov 2019 13:56:05 +0100 Subject: [PATCH 9/9] Include basic plan Very basic plan. --- Sanity/basic.fmf | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Sanity/basic.fmf diff --git a/Sanity/basic.fmf b/Sanity/basic.fmf new file mode 100644 index 0000000..d9ce621 --- /dev/null +++ b/Sanity/basic.fmf @@ -0,0 +1,6 @@ +summary: + Basic smoke test +discover: + how: fmf +execute: + how: beakerlib