From f4320bd642cb018a598c39afd0f35d111cfd560b Mon Sep 17 00:00:00 2001 From: Ondrej Mejzlik Date: Thu, 20 Jun 2024 19:59:39 +0200 Subject: [PATCH] add test --- .../Makefile | 64 +++++++++++++++++++ .../PURPOSE | 5 ++ .../main.fmf | 32 ++++++++++ .../runtest.sh | 53 +++++++++++++++ 4 files changed, 154 insertions(+) create mode 100644 Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/Makefile create mode 100644 Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/PURPOSE create mode 100644 Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/main.fmf create mode 100755 Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/runtest.sh diff --git a/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/Makefile b/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/Makefile new file mode 100644 index 0000000..5b2e30e --- /dev/null +++ b/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/ldns/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC +# Description: Test for BZ#1265605 ([RFE] ldns does not support ECDSA DNSSEC keys (RFC) +# Author: Andrej Dzilsky +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# 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/ldns/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Andrej Dzilsky " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: [RFE] ldns does not support ECDSA DNSSEC keys (RFC)" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 20m" >> $(METADATA) + @echo "RunFor: ldns" >> $(METADATA) + @echo "Requires: ldns unbound bind-utils" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 1265605" >> $(METADATA) + @echo "Releases: -RHEL4 -RHEL6 -RHELClient5 -RHELServer5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/PURPOSE b/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/PURPOSE new file mode 100644 index 0000000..e95821c --- /dev/null +++ b/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /CoreOS/ldns/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC +Description: Test for BZ#1265605 ([RFE] ldns does not support ECDSA DNSSEC keys (RFC) +Author: Andrej Dzilsky +Bug summary: [RFE] ldns does not support ECDSA DNSSEC keys (RFC 6605) +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1265605 diff --git a/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/main.fmf b/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/main.fmf new file mode 100644 index 0000000..c6cd3ec --- /dev/null +++ b/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/main.fmf @@ -0,0 +1,32 @@ +summary: '[RFE] ldns does not support ECDSA DNSSEC keys (RFC)' +description: | + Bug summary: [RFE] ldns does not support ECDSA DNSSEC keys (RFC 6605) + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1265605 +contact: Petr Sklenar +component: [] +test: ./runtest.sh +framework: beakerlib +recommend: + - ldns + - unbound + - bind-utils +duration: 20m +enabled: true +tag: + - NoRHEL4 + - NoRHEL5 + - NoRHEL6 + - TIPfail + - TIPfail_infra + - Tier3 +tier: '3' +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1265605 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1818761 +adjust: + - enabled: false + when: distro == rhel-4, rhel-5, rhel-6 + continue: false +extra-nitrate: TC#0603902 +extra-summary: /CoreOS/ldns/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC +extra-task: /CoreOS/ldns/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC diff --git a/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/runtest.sh b/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/runtest.sh new file mode 100755 index 0000000..aaa55ff --- /dev/null +++ b/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC/runtest.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/ldns/Regression/RFE-ldns-does-not-support-ECDSA-DNSSEC-keys-RFC +# Description: Test for BZ#1265605 ([RFE] ldns does not support ECDSA DNSSEC keys (RFC) +# Author: Andrej Dzilsky +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2016 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="ldns" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlAssertRpm "bind-utils" + rlRun "TMP_file=\$(mktemp)" 0 "Creating tmp file" + rlServiceStart "unbound" + rlPhaseEnd + + rlPhaseStartTest + rlRun " dig +dnssec +multiline -t ns gov. @localhost >$TMP_file" + sleep 5; cat $TMP_file + rlRun "grep ';; flags:' $TMP_file | grep 'ad'" 0 "Checking if flags contain 'ad' flag" + rlRun "grep 'RRSIG' $TMP_file" 0 "Checking for RRSIG signature record" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm -r $TMP_file" 0 "Removing tmp directory" + rlServiceRestore unbound + rlPhaseEnd +rlJournalPrintText +rlJournalEnd