diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d159169..0000000 --- a/LICENSE +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/README.md b/README.md deleted file mode 100644 index 11dd5e0..0000000 --- a/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Fedora BIND tests - -Initial part of these test were provided by Red Hat. -They provide Continuous Integration on [Fedora](https://fedoraproject.org) BIND builds and merge requests. -It would be used from [standard-test-roles](https://docs.fedoraproject.org/en-US/ci/standard-test-roles/) interface. - -Basic metadata are in [fmf](https://fmf.readthedocs.io/en/latest/overview.html), -tests are written in [beakerlib](https://github.com/beakerlib/beakerlib). - -Use `fmf show` tool to filter current tests. -Fedora tests moved to [test namespace](https://src.fedoraproject.org/tests/bind) in Fedora Package Sources. - -## Test run - -Container check not yet works, but localhost default is unsafe! -In future, it should be possible to run this testsuite using these commands: - - dnf install -y tmt podman - tmt run - -It is possible to test on local machine. -Testing on temporary machines is suggested, it might change existing configuration! - -To test in on local machine, run: - - tmt run --all provision --how local diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/Makefile b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/Makefile deleted file mode 100644 index b8a90f5..0000000 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP -# Description: Test for BZ#1999691 (bind does not listen on all addresses over TCP) -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer.sh - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1999691 (bind does not listen on all addresses over TCP)" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 15m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind lsof" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1999691" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/PURPOSE b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/PURPOSE deleted file mode 100644 index b3414eb..0000000 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP -Description: Test for BZ#1999691 (bind does not listen on all addresses over TCP) -Author: Petr Sklenar -Bug summary: bind does not listen on all addresses over TCP when listen-on/listen-on-v6 has specific IPs or any listed -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1999691 diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf deleted file mode 100644 index e526c89..0000000 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/main.fmf +++ /dev/null @@ -1,24 +0,0 @@ -summary: Test for BZ#1999691 (bind does not listen on all addresses over TCP) -description: | - Bug summary: bind does not listen on all addresses over TCP when listen-on/listen-on-v6 has specific IPs or any listed - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1999691 -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -recommend: - - lsof -duration: 15m -enabled: true -tag: - - NoRHEL4 - - NoRHEL5 -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1999691 -adjust+: - - enabled: false - when: distro < rhel-9.0 - continue: false -extra-nitrate: TC#0612648 -extra-summary: /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP -extra-task: /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP -id: 5914328a-2eec-4235-adea-12eb62aaaf79 diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/reproducer.sh b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/reproducer.sh deleted file mode 100644 index f554637..0000000 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/reproducer.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# modified reproducer from upstream issue -# https://gitlab.isc.org/isc-projects/bind9/-/issues/2852 - -# Pause bind on loading this file -mkfifo _bind.nta - -named -g -c <(echo "options { port 5300; listen-on { any; }; listen-on-v6 { any; }; }; controls {};") -n 1 & -NAMED_PID=$! - -sleep 2 -for i in {2..32}; do - sleep 0.05 - sudo ip addr add 127.0.0.$i/32 dev lo - [ "$i" = 6 ] && echo -n '' > _bind.nta && GO=1 -done - -lsof -n -p ${NAMED_PID} | grep :domain -TCP=$(lsof -n -p ${NAMED_PID} | grep 'TCP 127.0.0.' | wc -l) -UDP=$(lsof -n -p ${NAMED_PID} | grep 'UDP 127.0.0.' | wc -l) -echo "TCP: $TCP UDP: $UDP" - -if [ "$DEBUG" = y ]; then - TCPL=$(lsof -n -p ${NAMED_PID} | grep 'TCP 127.0.0.') - UDPL=$(lsof -n -p ${NAMED_PID} | grep 'UDP 127.0.0.') - - cat << EOF -TCP: -${TCPL} - -UDP: -${UDPL} -EOF -fi - -sleep 5 -#echo "Done adding addresses, press ENTER to terminate." -#read - -kill -TERM "${NAMED_PID}" -timeout 5 cat _bind.nta -wait "${NAMED_PID}" -rm -f _bind.nta - -for i in {2..32}; do - sudo ip addr del 127.0.0.$i/32 dev lo -done -echo "TCP: $TCP UDP: $UDP" -if [ "$TCP" -ne "$UDP" ]; then - echo "Mismatching listeners!" - exit 1 -fi - diff --git a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/runtest.sh b/Regression/bind-does-not-listen-on-all-addresses-over-TCP/runtest.sh deleted file mode 100755 index 3b89f2c..0000000 --- a/Regression/bind-does-not-listen-on-all-addresses-over-TCP/runtest.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Regression/bind-does-not-listen-on-all-addresses-over-TCP -# Description: Test for BZ#1999691 (bind does not listen on all addresses over TCP) -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:="bind"} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlPhaseEnd - - rlPhaseStartTest - # see reproducer.sh : - rlRun "bash ./reproducer.sh" - rlPhaseEnd - -rlJournalPrintText -rlJournalEnd diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/Makefile b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/Makefile deleted file mode 100644 index 7c4ce3e..0000000 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key -# Description: Test for BZ#1769876 (BIND stops DNSKEY lookup in get_dst_key() when a) -# Author: Petr Mensik -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE fakeroot.db bad.db - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Mensik " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1769876 (BIND stops DNSKEY lookup in get_dst_key() when a)" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind bind-utils" >> $(METADATA) - @echo "RhtsRequires: library(bind/bind-utils)" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1769876" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/PURPOSE b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/PURPOSE deleted file mode 100644 index 83680ff..0000000 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key -Description: Test for BZ#1769876 (BIND stops DNSKEY lookup in get_dst_key() when a) -Author: Petr Mensik -Bug summary: BIND stops DNSKEY lookup in get_dst_key() when a key with unsupported algorithm is found first -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1769876 diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/bad.db b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/bad.db deleted file mode 100644 index 6d26565..0000000 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/bad.db +++ /dev/null @@ -1,12 +0,0 @@ -$TTL 600 -@ IN SOA @ rname.invalid. ( - 0 ; serial - 1D ; refresh - 1H ; retry - 1W ; expire - 3H ) ; minimum - NS ns.fakeroot. - -h1 A 127.0.0.1 -h2 A 127.0.0.2 - diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/fakeroot.db b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/fakeroot.db deleted file mode 100644 index fb5c596..0000000 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/fakeroot.db +++ /dev/null @@ -1,13 +0,0 @@ -$TTL 600 -@ IN SOA @ rname.invalid. ( - 0 ; serial - 1D ; refresh - 1H ; retry - 1W ; expire - 3H ) ; minimum - NS ns.fakeroot -bad NS ns.fakeroot -bad3 NS ns.fakeroot -localhost. A 127.0.0.1 - AAAA ::1 -ns.fakeroot A 127.0.0.1 diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf deleted file mode 100644 index a6b8093..0000000 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/main.fmf +++ /dev/null @@ -1,15 +0,0 @@ -summary: Test for BZ#1769876 (BIND stops DNSKEY lookup in get_dst_key() when a) -description: | - Bug summary: BIND stops DNSKEY lookup in get_dst_key() when a key with unsupported algorithm is found first - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1769876 -contact: Petr Mensik -test: ./runtest.sh -framework: beakerlib -duration: 5m -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1769876 -extra-summary: /CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key -extra-task: /CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key -enabled: false -extra-nitrate: TC#0617578 -id: b8609264-51d5-4484-bff1-a9ca60567868 diff --git a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/runtest.sh b/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/runtest.sh deleted file mode 100755 index 114f115..0000000 --- a/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key/runtest.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Regression/bz1769876-BIND-stops-DNSKEY-lookup-in-get-dst-key -# Description: Test for BZ#1769876 (BIND stops DNSKEY lookup in get_dst_key() when a) -# Author: Petr Mensik -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:="bind"} -PHASE=${PHASE:-Test} - -rlJournalStart - rlPhaseStartSetup "Configuring common part" - rlImport "bind/bind-utils" - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "rlServiceStart rngd" - rlFileBackup /etc/named.conf /var/named - rlRun "cp fakeroot.db bad.db /var/named" - rlRun "pushd $TmpDir" - rlPhaseEnd - - if [[ "$PHASE" =~ "Test" ]]; then - rlPhaseStartSetup "Creating local server" - rlRun "sed -e 's/\(listen-on.*\){.*}/\1{ any; }/' -e 's/\(allow-query *\){ localhost; }/\1{ any; }/' -i /etc/named.conf" - cat >> /etc/named.conf << CONF - zone "." IN { - type master; - file "fakeroot.db.signed"; - }; - - zone "bad" IN { - type master; - file "bad.db.signed"; - }; - - zone "bad3" IN { - type master; - file "bad3.db.signed"; - }; - - # Include generated trust anchor - include "root.conf"; -CONF - rlPhaseEnd - - rlPhaseStartTest "Testing local server" - rlRun "pushd /var/named" - rlRun "cp bad.db bad3.db" - rlRun "bad_KSK=$(dnssec-keygen -f KSK -a RSASHA512 -b 2048 bad)" - rlRun "bad_ZSK=$(dnssec-keygen -a ECDSAP256SHA256 -n ZONE -b 2048 bad)" - rlRun "echo '\$INCLUDE $bad_KSK.key' >> bad.db" - rlRun "echo '\$INCLUDE $bad_ZSK.key' >> bad.db" - rlRun "dnssec-signzone -A -k $bad_KSK -z -N INCREMENT -o bad -t bad.db" - - rlRun "bad3_KSK=$(dnssec-keygen -f KSK -a RSASHA512 -b 2048 bad3)" - rlRun "bad3_ZSK=$(dnssec-keygen -a ECDSAP256SHA256 -n ZONE -b 2048 bad3)" - rlRun "echo '\$INCLUDE $bad3_KSK.key' >> bad3.db" - rlRun "echo '\$INCLUDE $bad3_ZSK.key' >> bad3.db" - rlRun "dnssec-signzone -A -k $bad3_KSK -z -3 9911c319070e83f8 -N INCREMENT -o bad3 -t bad3.db" - - rlRun "buZoneGenerateSign -o . -f fakeroot.db -A root" 0 "Generate signed root" - rlRun "rlServiceStart named" - rlRun -s "dig +dnssec +multi @localhost h1.bad." - rlAssertGrep 'status: NOERROR' "$rlRun_LOG" - if [ -x /usr/bin/delv ]; then - rlRun -s "delv @::1 -a root.conf h1.bad." - rlAssertGrep 'fully validated' "$rlRun_LOG" - rlRun -s "delv @::1 -a root.conf h1.bad3." - rlAssertGrep 'fully validated' "$rlRun_LOG" - fi - rlPhaseEnd - fi - - if [[ "$PHASE" =~ "Client" ]]; then - rlPhaseStartSetup "Creating local server" - rlRun "test -n \"$MASTER\"" - rlRun "buFetchManagedKeys . $MASTER > /etc/named/root.conf" - rlRun "echo 'include \"/etc/named/root.conf\";' >> /etc/named.conf" - # FIXME: create forwarding somehow! - rlPhaseEnd - fi - - rlPhaseStartCleanup - [ "$DEBUGTEST" = y ] && PS1="Interrupted test $PS1" bash -i - rm -f $rlRun_LOG - rlRun "rm -f {Kbad.,Kbad3.,K.}+* {bad,bad3}.db" - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlFileRestore - rlRun "rlServiceRestore named" - rlRun "rlServiceRestore rngd" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/Makefile b/Regression/bz1848169-named-checkconf-cidr-host-bits/Makefile deleted file mode 100644 index 419210d..0000000 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits -# Description: What the test does -# Author: Tomas Korbar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2020 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE bad.conf - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Tomas Korbar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: What the test does" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1848169 1865785" >> $(METADATA) - @echo "Releases: RHEL8" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/PURPOSE b/Regression/bz1848169-named-checkconf-cidr-host-bits/PURPOSE deleted file mode 100644 index 985e289..0000000 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits -Description: What the test does -Author: Tomas Korbar diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/bad.conf b/Regression/bz1848169-named-checkconf-cidr-host-bits/bad.conf deleted file mode 100644 index c794774..0000000 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/bad.conf +++ /dev/null @@ -1,3 +0,0 @@ -controls { - inet 172.17.1.98 port 953 allow { 172.17.1.1/24; }; -}; diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf b/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf deleted file mode 100644 index 8a28ac7..0000000 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/main.fmf +++ /dev/null @@ -1,22 +0,0 @@ -summary: What the test does -description: '' -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -duration: 5m -enabled: true -tag: - - TIPpass - - TIPpass_infra -adjust+: - - enabled: false - when: distro != rhel-8 - continue: false - because: there is an issue https://issues.redhat.com/browse/RHEL-80353 -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1848169 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1865785 -extra-nitrate: TC#0608023 -extra-summary: /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits -extra-task: /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits -id: 911c9541-d475-4f5a-9d33-e31892328a47 diff --git a/Regression/bz1848169-named-checkconf-cidr-host-bits/runtest.sh b/Regression/bz1848169-named-checkconf-cidr-host-bits/runtest.sh deleted file mode 100755 index f39c94a..0000000 --- a/Regression/bz1848169-named-checkconf-cidr-host-bits/runtest.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits -# Description: What the test does -# Author: Tomas Korbar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2020 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:="bind"} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlPhaseEnd - - rlPhaseStartTest - rlRun "named-checkconf ./bad.conf" 0 "Check configuration file" - rlPhaseEnd - - rlPhaseStartCleanup - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Regression/note b/Regression/note deleted file mode 100644 index e69de29..0000000 diff --git a/Sanity/caching-resolver-dnssec/test.sh b/Sanity/caching-resolver-dnssec/test.sh deleted file mode 100755 index adaf00a..0000000 --- a/Sanity/caching-resolver-dnssec/test.sh +++ /dev/null @@ -1,371 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${CLEAN_ANCHORS:=y} -: ${NAMED_OPTIONS:=} -# How many times to check basic root check -: ${BASIC_TRIES:=3} -# How many times to check host checks -: ${HOSTS_TRIES:=3} -# On which host check pass require successful responses? -: ${HOSTS_PASSING:=2} -# Delay after named service start -: ${DELAY_START:=5} -# Delay between tests -: ${DELAY_TEST:=5} - -bu_FALLBACK_SERVERS="8.8.8.8 8.8.4.4 9.9.9.9" -bu_DELV=$(type -p delv 2>/dev/null) -bu_DIG=$(type -p dig 2>/dev/null) -# Servers which failed DNSSEC-awareness check -bu_FAILED_SERVERS="" -bu_ROOT_HINTS=/var/named/named.ca - -buGetRootServerAddresses4() { - local HINTS="${1:-$bu_ROOT_HINTS}" - # a.root-servers.net. 518400 IN A 198.41.0.4 - # A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 - awk -v IGNORECASE=1 -- '$1 ~ /[a-m]\.root-servers\.net\./ && $3 == "A" { print $4 } $3 == "IN" && $4 == "A" { print $5 }' "$HINTS" -} - -buGetRootServerAddresses6() { - local HINTS="${1:-$bu_ROOT_HINTS}" - awk -v IGNORECASE=1 -- '$1 ~ /[a-m]\.root-servers\.net\./ && $3 == "AAAA" { print $4 } $3 == "IN" && $4 == "AAAA" { print $5 }' "$HINTS" -} - -# Get list of nameservers from resolv.conf file on standard output -buGetServersConf() { - local RESOLV_CONF=${1:-/etc/resolv.conf} - awk '$1 == "nameserver" { printf "%s%s", DL, $2; DL=" " }' "$RESOLV_CONF" -} - -# Get list of resolv-conf (like) files, which might contain useful DNS servers -# Ordered in preference, tries to avoid DNSSEC-unaware servers -buGetCandidateResolvConf() { - local -a CONF_FILES=() - systemctl is-active --quiet NetworkManager && CONF_FILES+=("/run/NetworkManager/no-stub-resolv.conf") - systemctl is-active --quiet systemd-resolved && CONF_FILES+=("/run/systemd/resolve/resolv.conf") - CONF_FILES+=("/etc/resolv.conf") - echo "${CONF_FILES[@]}" -} - -# Print list of nameservers addresses, space separated. -# No check on them is done. -buGetNameservers() { - # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly - for CONF in $(buGetCandidateResolvConf) - do - local SERVERS - # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often - if [ -r "$CONF" ] && SERVERS=$(buGetServersConf "$CONF") && [ -n "$SERVERS" ]; then - echo "$SERVERS" - break - fi - done -} - -# Test server IP addresses give as parameters to find those, who -# are security-aware. -# Param1: space separated IP addresses of DNS servers -buCheckSecureNameservers() { - local SERVERS="$1" - bu_SECURE_SERVERS="" - - if [ -z "$bu_DELV" ] && [ -z "$bu_DIG" ]; then - rlFail "Both delv and dig from bind-utils are missing!" - return 1 - fi - for NS in ${SERVERS}; do - # use tcp to fail faster on ipv6 global route not available - if [ -n "$bu_DELV" ]; then - if $bu_DELV +tcp @$NS | grep -q '^; fully validated'; then - bu_SECURE_SERVERS+="$NS " - else - bu_FAILED_SERVERS+="$NS " - fi - elif [ -n "$bu_DIG" ]; then - - if $bu_DIG +tcp +noall +answer +dnssec @$NS | grep -qw RRSIG; then - bu_SECURE_SERVERS+="$NS " - else - bu_FAILED_SERVERS+="$NS " - fi - fi - done - [ -n "$bu_SECURE_SERVERS" ] -} - -# Try to find DNSSEC capable network provided forwarders. -# If that fails try to verify $bu_FALLBACK_SERVERS works and use them. -# If no working server is found, call rlDie to stop the test. -# Outputs found servers into bu_SECURE_SERVERS and bu_FAILED_SERVERS -# variables -buGetSecureNameservers() { - bu_FAILED_SERVERS="" - local SERVERS="" - - # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly - for CONF in $(buGetCandidateResolvConf) - do - # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often - if [ -r "$CONF" ] && SERVERS=$(buGetServersConf "$CONF") && [ -n "$SERVERS" ]; then - rlLogDebug "Checking servers from $CONF..." - buCheckSecureNameservers "$SERVERS" && break - fi - done - if [ -z "${bu_SECURE_SERVERS}${bu_FAILED_SERVERS}" ]; then - rlDie "No nameservers obtained, tried files: $(buGetCandidateResolvConf)" - return 1 - fi - if [ -z "$bu_SECURE_SERVERS" ]; then - rlLog "Found resolv files..." - for CONF in $(buGetCandidateResolvConf) - do - rlRun -l "cat $CONF" - done - rlLog "Versions of network provided nameservers..." - for NS in ${SERVERS} - do - rlRun -l "dig @$NS txt ch version.bind" 0-255 - done - if [ -n "$bu_FALLBACK_SERVERS" ]; then - # If we have access to public DNS servers, use them instead. They are known to support DNSSEC. - buCheckSecureNameservers "$bu_FALLBACK_SERVERS" - rlLogWarning "No network provided servers (${SERVERS}) support DNSSEC! Fix the infrastructure!" - SERVERS+=" $bu_FALLBACK_SERVERS" - fi - fi - if [ -z "$bu_SECURE_SERVERS" ]; then - rlDie "No servers from ${SERVERS} support DNSSEC! Fix the infrastructure!" - return 1 - fi - - if [ -n "$bu_FAILED_SERVERS" ]; then - rlLogWarning "Servers not supporting DNSSEC: ${bu_FAILED_SERVERS}" - fi - rlLogInfo "Found security-aware servers: $bu_SECURE_SERVERS" -} - -# Create bind forwarder configuration from servers entered as parameters -buMakeForwarders() -{ - echo 'forwarders {'; - for NS in "$@" - do - printf "\t%s;\n" $NS - done - echo '}; # autogenerated' -} - -# Prints formatted used options in bind config -buPrintOptions() -{ - named-checkconf -px "$@" | sed -ne '/^options {/,/^};/ p' -} - -# Check whether option in $1 is used in options {} global block -buHasOption() -{ - local OPTION="$1" - buPrintOptions | grep -qw "^\s*${OPTION}" -} - -# Filter dig to print only desired section -# Input is dig output -buDigGetSection() -{ - local SECTION="${1:-ANSWER}" - sed -ne "/^;; ${SECTION} SECTION:/,/^$/ p" | grep -vE '^(\s*$|;.*$)' -} - -# Filter dig to print only desired value from double comment lines -# Input is dig output -buDigGetField() -{ - local FIELD="$1" - grep "^;;.*\s${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" -} - -# Filter dig input to print pseudosection contents only -buDigPseudosection() -{ - sed -ne "/^;; OPT PSEUDOSECTION:/,/^;; QUESTION SECTION/ p" | grep -vE '^;; (OPT PSEUDO|QUESTION )SECTION:' -} - -# Filter dig to print only desired value from single comment lines -# Useful for pseudosection -# Input is dig output -buDigGetField1() -{ - local FIELD="$1" - grep "^;\s\(.*\s\)\?${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" -} - -# just receive any response, no matter what status -buDig() -{ - rlRun -s "dig $*" -} - -# Ensure reply has noerror status -buDigSuccess() -{ - rlRun -s "dig $*" - local STATUS="$(buDigGetField status < $rlRun_LOG)" - rlAssertEquals "Check result was positive" "$STATUS" NOERROR -} - -# Ensure reply is signed and verified -buDigSuccessSecure() -{ - rlRun -s "dig $*" - local STATUS="$(buDigGetField status < $rlRun_LOG)" - rlAssertEquals "Check dig result was positive" "$STATUS" NOERROR - local FLAGS="$(buDigGetField flags < $rlRun_LOG)" - rlRun "echo $FLAGS | grep -w ad" 0 "Check dig result has AD bit set" -} - -# Ensure reply is positive but insecure -buDigSuccessInsecure() -{ - rlRun -s "dig $*" - local STATUS="$(buDigGetField status < $rlRun_LOG)" - rlAssertEquals "Check dig result was positive" "$STATUS" NOERROR - local FLAGS="$(buDigGetField flags < $rlRun_LOG)" - rlRun "echo $FLAGS | grep -vw ad" 0 "Check dig result has AD bit unset" -} - -# Extract KSK key id from dig -buDigKskId() -{ - dig +nocrypto +short -t dnskey "$@" | awk '$1 == 257 { sub("]", "", $7); print $7 }' -} - - -rlJournalStart - rlPhaseStartSetup - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - rlRun "set -o pipefail" - rlRun "named -V" - rlRun "dig -v" - rlFileBackup /etc/named.conf - rlRun "named-checkconf" 0 "Test generated configuration is acccepted" - rlRun "rlServiceStop named" - if [ "$CLEAN_ANCHORS" = y ]; then - rlFileBackup --clean /var/named/dynamic/managed-keys.bind{,.jnl} - rlRun "rm -f /var/named/dynamic/managed-keys.bind{,.jnl}" - fi - rlAssertExists $bu_ROOT_HINTS - # use buCheckSecureNameservers - rlRun "HINTS4=\"$(buGetRootServerAddresses4 $bu_ROOT_HINTS)\"" - rlRun "HINTS6=\"$(buGetRootServerAddresses6 $bu_ROOT_HINTS)\"" - rlRun "HINTS4_NUM=$(echo \"$HINTS4\" | wc -l)" - rlRun "HINTS6_NUM=$(echo \"$HINTS6\" | wc -l)" - HINTS4_WORKS='' - HINTS6_WORKS='' - if [ "$NAMED_OPTIONS" = auto ]; then - # TODO: is this complication desirable? - if [ "$HINTS4_NUM" -gt 0 ] && buCheckSecureNameservers "$HINTS4"; then - SECURE_SERVERS4="$bu_SECURE_SERVERS" - FAILED_SERVERS4="$bu_FAILED_SERVERS" - HINTS4_WORKS=y - fi - if [ "$HINTS6_NUM" -gt 0 ] && buCheckSecureNameservers "$HINTS6"; then - SECURE_SERVERS6="$bu_SECURE_SERVERS" - FAILED_SERVERS6="$bu_FAILED_SERVERS" - [ -n "$FAILED_SERVERS4" ] && bu_FAILED_SERVERS+=" $FAILED_SERVERS4" - [ -n "$SECURE_SERVERS4" ] && bu_SECURE_SERVERS+=" $SECURE_SERVERS4" - HINTS6_WORKS=y - fi - if [ "$HINTS4_WORKS" = y ] && [ -z "$HINTS6_WORKS" ]; then - rlRun "NAMED_OPTIONS='-4'" - elif [ "$HINTS6_WORKS" = y ] && [ -z "$HINTS4_WORKS" ]; then - rlRun "NAMED_OPTIONS='-6'" - else - rlRun "NAMED_OPTIONS=''" - fi - else - rlRun "buCheckSecureNameservers \"$HINTS4 $HINTS6\"" && HINTS4_WORKS=y && HINTS4_WORKS=y - fi - if [ -n "$NAMED_OPTIONS" ]; then - rlFileBackup /etc/sysconfig/named - echo "OPTIONS+=\"$NAMED_OPTIONS\"" >> /etc/sysconfig/named - rlRun "grep OPTIONS /etc/sysconfig/named" - fi - SKIP_TEST='' - if [ -z "$HINTS6_WORKS" ] && [ -z "$HINTS4_WORKS" ] - then - SKIP_TEST=y - rlLogWarning "No root-servers reachable, skipping the test." - fi - WORKING_NUM=0 - for NSIP in ${bu_SECURE_SERVERS}; do - WORKING_NUM=$((WORKING_NUM+1)) - done - rlAssertGreater "Check we have at least some working root servers" "$WORKING_NUM" 5 - rlLog "Working root-servers: $bu_SECURE_SERVERS" - [ -n "$bu_FAILED_SERVERS" ] && rlLogWarning "Failed root-servers: $bu_FAILED_SERVERS" - - HAS_MANAGED_KEYS='' - rndc -h 2>&1 | grep -q 'managed-keys status' && HAS_MANAGED_KEYS='y' - rlPhaseEnd - -if [ "$SKIP_TEST" != y ]; then - -for I in {1..3}; do - rlPhaseStartTest "Basic test #$I" - rlRun "rlServiceStart named" - # give it chance to warm up - sleep ${DELAY_START} - buDigSuccessSecure @localhost . DNSKEY - buDigSuccessSecure @localhost - - KEYID=$(buDigKskId @localhost .) - rlAssertNotEquals "Check keyId is not empty." "$KEYID" "" - rlAssertGreater "Check keyId is non-zero" "$KEYID" 0 - rlRun "rndc secroots" - rlRun "grep \"^./RSASHA256/$KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" - [ "$HAS_MANAGED_KEYS" = y ] && rlRun "rndc managed-keys status" - rlPhaseEnd - sleep ${DELAY_TEST} -done - -DIG_SEC=buDig -DIG_INSEC=buDig - -for I in $(seq $HOSTS_TRIES); do - rlPhaseStartTest "Host tests #$I" - if [ "$I" = "$HOSTS_PASSING" ]; then - DIG_SEC=buDigSuccessSecure - DIG_INSEC=buDigSuccessInsecure - fi - for H in example.{org,com,net} fedoraproject.org isc.org - do - $DIG_SEC @localhost $H A - $DIG_SEC @localhost $H AAAA - done - for H in {org,com,net} - do - $DIG_SEC @localhost $H NS - $DIG_SEC @localhost $H DS - done - for H in {a,d,f}.root-servers.net ipv4only.arpa - do - $DIG_INSEC @localhost $H A - $DIG_INSEC @localhost $H AAAA - done - rlPhaseEnd - sleep ${DELAY_TEST} -done -fi - - rlPhaseStartCleanup - [ "$DEBUG" = y ] && PS1="test-debug $PS1" $SHELL -i - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlFileRestore - rlRun "rlServiceRestore named" - rlPhaseEnd -rlJournalEnd diff --git a/Sanity/named/Run-internal-BIND-test-suite/Makefile b/Sanity/named/Run-internal-BIND-test-suite/Makefile deleted file mode 100644 index ef0d6e4..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Sanity/Run-internal-BIND-test-suite -# Description: Run internal BIND test suite -# Author: Martin Cermak -# Author: Petr Mensik -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 Red Hat, Inc. All rights reserved. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Sanity/Run-internal-BIND-test-suite -export TESTVERSION=1.7 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE knownerror* setup-named-softhsm.sh bind-systest-filter.sh -PACKAGE?=bind - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Run internal BIND test suite" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 14h" >> $(METADATA) - @echo "RunFor: $(PACKAGE)" >> $(METADATA) - @echo "Requires: $(PACKAGE) rpm-build $(PACKAGE)-utils $(PACKAGE)-devel" >> $(METADATA) - @echo "Requires: $(PACKAGE)-pkcs11 $(PACKAGE)-pkcs11-utils softhsm" >> $(METADATA) - @echo "Requires: openssl-devel libtool autoconf" >> $(METADATA) - @echo "Requires: perl perl(Net::DNS) perl(Net::DNS::Nameserver) perl(Time::HiRes)" >> $(METADATA) - @echo "Requires: perl(IO::Socket::INET6)" >> $(METADATA) - @echo "Requires: python3-pytest" >> $(METADATA) - @echo "Requires: libcap-devel libidn-devel libxml2-devel kyua" >> $(METADATA) - @echo "Requires: openldap-devel postgresql-devel" >> $(METADATA) - @echo "Requires: sqlite-devel krb5-devel net-tools iproute" >> $(METADATA) - @echo "Requires: yum-utils dnf-utils rng-tools" >> $(METADATA) - @echo "Requires: gcc-c++" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 642970 1832812 1869502 1956777" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Sanity/named/Run-internal-BIND-test-suite/PURPOSE b/Sanity/named/Run-internal-BIND-test-suite/PURPOSE deleted file mode 100644 index 3fcf82b..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/PURPOSE +++ /dev/null @@ -1,6 +0,0 @@ -PURPOSE of /CoreOS/bind/Sanity/Run-internal-BIND-test-suite -Description: Run internal BIND test suite -Author: Martin Cermak -Bug summary: Run internal BIND test suite -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=642970 - diff --git a/Sanity/named/Run-internal-BIND-test-suite/bind-systest-filter.sh b/Sanity/named/Run-internal-BIND-test-suite/bind-systest-filter.sh deleted file mode 100755 index 8a153a1..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/bind-systest-filter.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This script will filter out output from BINDs tests -# It supports form from BIND 9.9 and BIND 9.11 -# Its purpose is to display only failed tests from list of all tests - -CURRENT_TEST= -CURRENT_OUTPUT= -STATUS_ONLY= - -for P; do - case "$P" in - -s|--status) STATUS_ONLY=yes; shift ;; - esac -done - -cat $@ | while read LINE; do - if [ "${LINE#S:}" != "$LINE" ]; then - CURRENT_TEST=`echo $LINE | cut -d: -f2` - CURRENT_OUTPUT="$LINE"$'\n' - elif [ "${LINE#R:}" != "$LINE" ]; then - # echo "$CURRENT_TEST $LINE" - if [ "${LINE/#R:*:*}" != "$LINE" ]; then - # more recent results contain test name - # R:dlz:FAIL - CURRENT_TEST="${LINE#R:}" - CURRENT_TEST="${CURRENT_TEST/%:*}" - RESULT="${LINE/#*:}" - else - # S:dlz:time - # R:FAIL - RESULT="${LINE/#R*:/}" - fi - if [ "$RESULT" != "PASS" ]; then - if [ -n "$STATUS_ONLY" ]; then - echo "$RESULT $CURRENT_TEST" - else - CURRENT_OUTPUT+="$LINE" - echo "$CURRENT_OUTPUT" - echo - fi - fi - CURRENT_OUTPUT= - else - CURRENT_OUTPUT+="$LINE"$'\n' - fi -done diff --git a/Sanity/named/Run-internal-BIND-test-suite/knownerror b/Sanity/named/Run-internal-BIND-test-suite/knownerror deleted file mode 100644 index f9618b6..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/knownerror +++ /dev/null @@ -1 +0,0 @@ -A:System test dlz diff --git a/Sanity/named/Run-internal-BIND-test-suite/main.fmf b/Sanity/named/Run-internal-BIND-test-suite/main.fmf deleted file mode 100644 index 0e60225..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/main.fmf +++ /dev/null @@ -1,91 +0,0 @@ -summary: Run internal BIND test suite -description: | - Bug summary: Run internal BIND test suite - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=642970 - -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -recommend: - - rpm-build - - softhsm - - openssl-devel - - libtool - - autoconf - - perl - - perl(Net::DNS) - - perl(Net::DNS::Nameserver) - - perl(Time::HiRes) - - perl(IO::Socket::INET6) - - libcap-devel - - libidn2-devel - - libxml2-devel - - openldap-devel - - sqlite-devel - - krb5-devel - - net-tools - - iproute - - yum-utils - - dnf-utils - - rng-tools - - gcc-c++ - - python3-dns - - python3-pytest - - opensc -adjust+: - - enabled: false - when: distro == rhel - continue: false - because: Slightly different copy resides in internal tests. - - recommend+: - - bind-pkcs11 - - bind-pkcs11-utils - when: component is not defined or component == bind - - recommend+: - - pytest - when: component == bind9.16 - - recommend+: - - kyua - when: distro < fedora-37 or distro <= rhel-9 or distro <= centos-9 - because: only bind <=9.16 uses kyua for unit tests - - recommend+: - - postgresql-devel - when: component == bind and distro < fedora-33 or distro < rhel-9 or distro < centos-9 - because: only bind-sdb in bind <=9.11 needs those databases - - recommend+: - - libidn-devel - when: distro < rhel-8 or distro < centos-8 -duration: 14h -enabled: true -tag: - - CI-Tier-1 - - TIPfail - - buildroot - - notier - - notip - - rhel-buildroot - - rhel8-buildroot -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=642970 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1832812 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1869502 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1956777 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=672514 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=703494 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1704328 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1876492 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=623122 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1679766 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1882040 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1683009 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=643012 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1683015 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=906312 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1679307 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1664863 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1832814 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=653817 -extra-nitrate: TC#0126580 -extra-summary: /CoreOS/bind/Sanity/Run-internal-BIND-test-suite -extra-task: /CoreOS/bind/Sanity/Run-internal-BIND-test-suite -id: af6d1878-449e-4577-819a-bef95cc51311 diff --git a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh b/Sanity/named/Run-internal-BIND-test-suite/runtest.sh deleted file mode 100755 index ffbdf16..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/runtest.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Sanity/Run-internal-BIND-test-suite -# Description: Run internal BIND test suite -# Authors: pemensik@redhat.com psklenar@redhat.com mcermak@redhat.com -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 Red Hat, Inc. All rights reserved. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Usable variables: -# override make target to start testing on more threads -# MAKE_TEST='-j4 test' -# Do not clean existing build if already built -# REUSE_BUILD=y -# Make retest faster, skip build if possible -# QUICK=y - -# Include rhts environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} -#USER="user$RANDOM" -USER="nobody" -: ${CORES:=auto} -# Limit maximal number of cores used at the same time. -# May cause more failures. -: ${MAXCORES:=8} -: ${WITHOUT:=--without DOC --without EXPORT_LIBS} -# Override default crypto-policy -: ${CRYPTO_POLICY:=} - -rlJournalStart - rlPhaseStartSetup - #rlRun "useradd $USER" - rlLog "Available entropy: $(cat /proc/sys/kernel/random/entropy_avail)" - rpm -q perl-Net-DNS-Nameserver || yum install -y perl-Net-DNS-Nameserver - rlLog "`rpm -q perl-Net-DNS-Nameserver`" - # package assertions - rlAssertRpm $PACKAGE - rlAssertRpm rpm-build - rlRun "rpm -q $PACKAGE-devel || yum install -y $PACKAGE-devel $PACKAGE-utils" - rlServiceStart "rngd" - rngd -r /dev/urandom -o /dev/random - sleep 60 - rlLog "Available entropy: $(cat /proc/sys/kernel/random/entropy_avail)" - - #pwd - ORIG=`pwd` - FOUNDERROR=`mktemp` - SETUP_SOFTHSM=`readlink -f setup-named-softhsm.sh` - FILTER=`readlink -f bind-systest-filter.sh` - - TAG=generic - if [ -f /etc/os-release ]; then - # extract platform tag - VERSION_ID=`(source /etc/os-release && echo ${ID}-${VERSION_ID})` - TAG=`(source /etc/os-release && echo ${PLATFORM_ID#platform:})` - else - rlIsRHEL '6' && TAG=el6 - fi - - if [ -f "knownerror.$VERSION_ID" ]; then - KNOWNERROR=`readlink -f knownerror.$VERSION_ID` - elif [ -f "knownerror.$TAG" ]; then - KNOWNERROR=`readlink -f knownerror.$TAG` - elif [ -f "knownerror" ]; then - KNOWNERROR=`readlink -f knownerror` - fi - - if [ -z "$CORES" ] || [ "$CORES" = "auto" ]; then - rlRun "CORES=$(lscpu -p | grep -v '^\s*#' | wc -l)" 0 "Get available CPU cores" - [[ CORES -lt 1 ]] && CORES=1 - [[ MAXCORES -gt 0 ]] && [[ CORES -gt MAXCORES ]] && rlRun "CORES=$MAXCORES" 0 "Limit max used cores" - fi - - if [ -n "$QUICK" ]; then - REUSE_BUILD=y - MAKE_TEST="test -j$CORES" - fi - - #tempdir - rlRun "TMPDIR=\`mktemp -d\`" 0 "Creating tmp directory" - rlRun "pushd $TMPDIR" - - if rlIsRHEL '>= 8' && dnf config-manager --help >/dev/null; then - # Some build dependencies are not in repositories enabled - # by default: libidn2-devel, softshm - # 1mt and beaker uses different names for repo, find those present - for REPO in $(dnf -q repolist --disabled {rhel,beaker}-{buildroot,CRB} | awk '$1 != "repo" && $2 != "id" { print $1 }') - do - rlRun "dnf config-manager --set-enabled $REPO" - done - fi - if rlIsRHEL 9; then - CRYPTO_POLICY=DEFAULT:SHA1 - fi - - # topdir - if rlIsRHEL 3 || rlIsRHEL 4 || rlIsRHEL 5; then - TOPDIR="/usr/src/redhat" - else - TOPDIR="/root/rpmbuild" - fi - - # cleanup in topdir - mkdir -p $TOPDIR/{BUILD,SOURCES,SPECS} - if [ "$REUSE_BUILD" != y ] - then - rlRun "rm -rf $TOPDIR/{BUILD,SOURCES,SPECS}/*" - else - rlLog "Not cleaning previous build" - fi - - # download src rpm - BINDVER=$(rpm -q $PACKAGE) - SRPM="${BINDVER%%.$(arch)}.src.rpm" - if [ -f "$ORIG/$SRPM" ]; then - rlLog "Found predownloaded package $ORIG/$SRPM" - rlRun "rpm -i \"$ORIG/$SRPM\"" - else - rlFetchSrcForInstalled "$PACKAGE" - if ! ls ${PACKAGE}*.src.rpm; then - rlRun "yumdownloader --source ${PACKAGE}" 0 "Trying alternative fetch from repository" - rlRun "rpm -i ${PACKAGE}*.src.rpm" - fi - fi - - rlRun "rpm --define '_topdir $TOPDIR' -Uvh *rpm &> $TMPDIR/install.txt" - rlRun "cd $TOPDIR/SPECS" - - # softhsm is no longer in normal repository. Enable idm module on RHEL8 to make softhsm module available - if rlIsRHEL 8 - then - rlLog "this can fail at rhel8 zstream as no module in profiles" - dnf module reset idm:DL1 -y - rlRun "dnf -y module enable idm:DL1" - fi - - if dnf builddep --help >/dev/null; then - SKIP='' - #rhel81 doesnt now --skip-unavailable option - dnf builddep --skip-unavailable --help 2>/dev/null && SKIP="--skip-unavailable" - rlRun "dnf -y builddep -D '_with_SYSTEMTEST 1' --nobest *.spec $SKIP" - elif which yum-builddep; then - rlRun "yum-builddep -y -D '_with_SYSTEMTEST 1' *.spec" - else - rlWarn "there is nor yum-utils neither dnf-utils for install dependencies, ENJOY!" - fi - -#DEBUG smtg - rlRun "rpm -q softhsm || yum install softhsm -y --enablerepo=\*" 0-255 - rlRun "rpm -q perl-IO-Socket-INET6 || yum install -y 'perl(IO::Socket::INET6)' --enablerepo=\*" 0-255 - # stop bind if it is running - service named stop - - if [ -n "$CRYPTO_POLICY" ]; then - rlRun "BACKUP_CRYPTO_POLICY=$(update-crypto-policies --show)" 0 "Store original crypto policy" - rlRun "update-crypto-policies --set $CRYPTO_POLICY" 0 "Change crypto policy" - fi - - SOFTHSM2_MODULE="$(rpm -E '%{_libdir}/pkcs11/libsofthsm2.so')" - if [ -x "$SOFTHSM2_MODULE" ]; then - export SOFTHSM2_MODULE - fi - rlPhaseEnd - - rlPhaseStartTest - rlRun "rpmbuild -bc $WITHOUT --short-circuit --define '__spec_build_pre echo RPM_BUILD_DIR=%{_builddir}; echo RPM_NAME=%{name}; echo RPM_VER=%{version}; echo RPM_REL=%{release}; exit 0' *.spec > $TMPDIR/build.env" 0 "Obtain some build variables" - rlRun "eval $(grep '^\w\+=' $TMPDIR/build.env)" - if [ -z "$RPM_BUILD_DIR" ]; then - RPM_BUILD_DIR=$(rpm -E %_builddir) - fi - if [ -z "$RPM_BUILD_DIR" ]; then - RPM_BUILD_DIR="$TOPDIR/BUILD" - fi - if [ -n "$RPM_NAME" ] && [ -n "$RPM_VER" ]; then - BIND_BUILD="$RPM_BUILD_DIR/$RPM_NAME-$RPM_VER" - else - rlRun "rmdir $RPM_BUILD_DIR/bind*-SPECPARTS" 0-255 "Cleanup specparts" - BIND_BUILD="$(ls -l "$RPM_BUILD_DIR"/bind*)" - fi - - if [ "$REUSE_BUILD" = y ] && [ -d "$BIND_BUILD" ] > /dev/null - then - rlLog "Skipping $PACKAGE build" - else - # rebuild from source - rlRun "rpmbuild -bc $WITHOUT --noclean *.spec &> $TMPDIR/build.txt" 0 "Building bind" - fi - - # the test - rlRun "cd $BIND_BUILD" - - rlLogInfo "Test takes place in `pwd`" - - rlRun "chown -R root ." - - if [ -x "$SETUP_SOFTHSM" ] && type -p pkcs11-tokens; then - rlRun "eval $(bash $SETUP_SOFTHSM -A)" 0 "Preparing PKCS#11 token slot" - rlRun "pkcs11-tokens" 0 "Testing token slot availability" - else - rlLog "PKCS#11 not initialized" - fi - - if [ -d build ]; then - BUILD=build - # In case tests are executed in srcdir, put conf.sh there also - # Happens with 9.18 - rlRun "cp -p $BUILD/bin/tests/system/conf.sh bin/tests/system" - else - BUILD=. - fi - - HOMEPERM=$(stat --printf='%a' "$HOME") - if [ "$HOMEPERM" != "${HOMEPERM%0}" ]; then - # runtime tests under root requires access for nobody user - rlLog "Enabling access to $HOME" - rlRun "chmod o+x \"$HOME\"" - fi - - # required by idna test - export LC_ALL=en_US.UTF-8 - - # bin/tests/system receives logs by mistake, but allow it for now. - rlRun "chgrp -R $USER $BUILD bin/tests/system/" - rlRun "chmod g+rw -R $BUILD bin/tests/system/" - rlRun "pushd $BUILD" - rlRun "ls -l ./bin/tests/system/ifconfig.sh" - rlRun "./bin/tests/system/ifconfig.sh up" 0 "Setup fake network interfaces." - rlRun "chown -R $USER:$USER bin/tests/system/" - - # keep separate results on 9.11+ - rlRun "sed -e 's/testsummary.sh/& -n/' -i bin/tests/system/Makefile" 0 "Modify to keep results" - # dlz test is broken because specific build way we use. It is supported only by named-sdb - # but that is not even tested by testsuite - rlRun "sed -e 's/ dlz / /' -i bin/tests/system/Makefile" 0 "Skip always failing dlz test" - - ###### T:cds:1:A ../conf.sh: line 40: DNSSEC_VARIANT: unbound variable - ###### remove later (today 2021 Aug) - sed -ie 's/set -eu/set -e/' bin/tests/system/cds/setup.sh - - rlRun "chmod a+x bin/tests/system/*.sh" 0 "Ensure all test shell scripts are executable" - UMASK_ORIG=$(umask) - rlRun "umask 0002" - - [ "$DEBUG" = y ] && PS1="pretest-debug $PS1" bash -i - - # Try to fix tssgsig failures on some machines, do not use system kerberos configuration - export KRB5_CONFIG=/dev/null - RHEL9HACK="sudo -u $USER" - set -o pipefail - rlRun "${RHEL9HACK} make ${MAKE_TEST:-test -j$CORES} |& tee $TMPDIR/test.txt" 0-255 "Perform the test, --init-task=/distribution/install/rhel-buildroot is needed" - set +o pipefail - export -n KRB5_CONFIG - rlRun "umask $UMASK_ORIG" 0 "Return original umask" - - # This would catch just errors on 9.11+ - if [ -f bin/tests/system/testsummary.sh ]; then - FAILED_TESTS=`grep '^R:[a-z0-9_-][a-z0-9_-]*:FAIL' $TMPDIR/test.txt | cut -d':' -f2 | sort | xargs echo` - PASSED_TESTS=`grep '^R:[a-z0-9_-][a-z0-9_-]*:PASS' $TMPDIR/test.txt | cut -d':' -f2 | sort | xargs echo` - - # 9.18.29+ uses pytest to run some tests and generates failed output to different place - pushd bin/tests/system - for ONETMPDIR in *_tmp_*/; do - FAILED_TESTS+=" $ONETMPDIR" - done - popd - if [ -n "$FAILED_TESTS" ]; then - rlLog "Failed tests: $FAILED_TESTS" - rlRun "tar czf $TMPDIR/failed-artifacts.tar.gz -C bin/tests/system $FAILED_TESTS" 0 "Archiving failed artifacts in tests" - else - rlLog "No failed tests" - fi - else - FAILED_TESTS=:any: - PASSED_TESTS=:any: - rlRun "tar czf $TMPDIR/failed-artifacts.tar.gz bin/tests/system" 0 "Archiving all system tests" - fi - - - [ "$DEBUG" = y ] && PS1="posttest-debug $PS1" bash -i - rlRun "./bin/tests/system/ifconfig.sh down" 0 "Remove fake network interfaces." - rlRun "popd" - - rlRun "grep -C 10 FAIL $TMPDIR/test.txt" 0-255 "Quickly show the test error (if any)." - rlRun "grep PASS $TMPDIR/test.txt" 0 "Quickly show passed tests." - - #list of failures: - rlRun "$FILTER $TMPDIR/test.txt" 0 "Showing unsuccessful tests" - rlRun "$FILTER -s $TMPDIR/test.txt > $FOUNDERROR" 0 - rlRun "ls $KNOWNERROR $FOUNDERROR $TMPDIR/test.txt" 0 'check if there are needed files' - rlLog "`echo list;cat $FOUNDERROR`" - - FAILED_FOUND="$(grep '^FAIL' $FOUNDERROR | wc -l)" - FAILED_KNOWN="$(wc -l <$KNOWNERROR)" - rlAssertLesserOrEqual "Checking number of found errors is in limits" "$FAILED_FOUND" "$FAILED_KNOWN" - cat $FOUNDERROR | while read STATUS TEST ; do - if [ "$STATUS" = FAIL ]; then - rlRun "grep '$TEST' $KNOWNERROR" 0 "Check $TEST failure is expected" - else - rlLog "$STATUS $TEST" - fi - done - - if [ "$FAILED_TESTS" = ':any:' ] && [ "$FAILED_FOUND" -le "$FAILED_KNOWN" ] - then - # Newer version produces archive only when some error occured - rlLog "No error found, not uploading artifacts" - rm -f "$TMPDIR/failed-artifacts.tar.gz" - fi - if [ "$HOMEPERM" != "${HOMEPERM%0}" ]; then - rlLog "Restoring home access rights to $HOMEPERM" - rlRun "chmod 0${HOMEPERM} \"$HOME\"" - fi - rlPhaseEnd - - rlPhaseStartCleanup "`echo Cores:$CORES;echo ' RESULT_' ;cat $FOUNDERROR|grep 'FAIL'`" - #this phase is only due to report to webUI without needs of open file - rlLog "`echo RESULT_ ;cat $FOUNDERROR|grep FAIL`" - rlPhaseEnd - - rlPhaseStartCleanup - rlBundleLogs "TEST_LOGS" "$TMPDIR/install.txt" "$TMPDIR/builddeps.txt" "$TMPDIR/build.txt" "$TMPDIR/test.txt" - if [ -r "$TMPDIR/failed-artifacts.tar.gz" ]; then - rlFileSubmit "$TMPDIR/failed-artifacts.tar.gz" failed-artifacts.tar.gz - fi - if [ -n "$CRYPTO_POLICY" ]; then - rlRun "update-crypto-policies --set $BACKUP_CRYPTO_POLICY" 0 "Restore original crypto policy" - fi - rlRun "popd" - rlServiceRestore "rngd" - rlRun "rm -r $TMPDIR" 0 "Removing tmp directory" - rlRun "rm -rf $FOUNDERROR" - rlLog "Build contents: $BIND_BUILD" - #rlRun "userdel -f -r $USER" - rlPhaseEnd -rlJournalEnd diff --git a/Sanity/named/Run-internal-BIND-test-suite/setup-named-softhsm.sh b/Sanity/named/Run-internal-BIND-test-suite/setup-named-softhsm.sh deleted file mode 100755 index a13c91e..0000000 --- a/Sanity/named/Run-internal-BIND-test-suite/setup-named-softhsm.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh -# -# This script will initialise token storage of softhsm PKCS11 provider -# in custom location. Is useful to store tokens in non-standard location. -# -# Output can be evaluated from bash, it will prepare it for usage of temporary tokens. -# Recommended use: -# eval $(bash setup-named-softhsm.sh -A) -# - -SOFTHSM2_CONF="$1" -TOKENPATH="$2" -GROUPNAME="$3" -# Do not use this script for real keys worth protection -# This is intended for crypto accelerators using PKCS11 interface. -# Uninitialized token would fail any crypto operation. -PIN=1234 -SO_PIN=1234 -LABEL=rpm - -set -e - -echo_i() -{ - echo "#" $@ -} - -random() -{ - if [ -x "$(which openssl 2>/dev/null)" ]; then - openssl rand -base64 $1 - else - dd if=/dev/urandom bs=1c count=$1 | base64 - fi -} - -usage() -{ - echo "Usage: $0 -A [token directory] [group]" - echo " or: $0 [group]" -} - -if [ "$SOFTHSM2_CONF" = "-A" -a -z "$TOKENPATH" ]; then - TOKENPATH=$(mktemp -d /var/tmp/softhsm-XXXXXX) -fi - -if [ -z "$SOFTHSM2_CONF" -o -z "$TOKENPATH" ]; then - usage >&2 - exit 1 -fi - -if [ "$SOFTHSM2_CONF" = "-A" ]; then - # Automagic mode instead - MODE=secure - SOFTHSM2_CONF="$TOKENPATH/softhsm2.conf" - PIN_SOURCE="$TOKENPATH/pin" - SOPIN_SOURCE="$TOKENPATH/so-pin" - TOKENPATH="$TOKENPATH/tokens" -else - MODE=legacy -fi - -[ -d "$TOKENPATH" ] || mkdir -p "$TOKENPATH" - -umask 0022 - -if ! [ -f "$SOFTHSM2_CONF" ]; then -cat << SED > "$SOFTHSM2_CONF" -# SoftHSM v2 configuration file - -directories.tokendir = ${TOKENPATH} -objectstore.backend = file - -# ERROR, WARNING, INFO, DEBUG -log.level = ERROR - -# If CKF_REMOVABLE_DEVICE flag should be set -slots.removable = false -SED -else - echo_i "Config file $SOFTHSM2_CONF already exists" >&2 -fi - -if [ -n "$PIN_SOURCE" ]; then - touch "$PIN_SOURCE" "$SOPIN_SOURCE" - chmod 0600 "$PIN_SOURCE" "$SOPIN_SOURCE" - if [ -n "$GROUPNAME" ]; then - chgrp "$GROUPNAME" "$PIN_SOURCE" "$SOPIN_SOURCE" - chmod g+r "$PIN_SOURCE" "$SOPIN_SOURCE" - fi -fi - -export SOFTHSM2_CONF - -if softhsm2-util --show-slots | grep 'Initialized:[[:space:]]*yes' > /dev/null -then - echo_i "Token in ${TOKENPATH} is already initialized" >&2 - - [ -f "$PIN_SOURCE" ] && PIN=$(cat "$PIN_SOURCE") - [ -f "$SOPIN_SOURCE" ] && SO_PIN=$(cat "$SOPIN_SOURCE") -else - PIN=$(random 6) - SO_PIN=$(random 18) - if [ -n "$PIN_SOURCE" ]; then - echo -n "$PIN" > "$PIN_SOURCE" - echo -n "$SO_PIN" > "$SOPIN_SOURCE" - fi - - echo_i "Initializing tokens to ${TOKENPATH}..." - softhsm2-util --init-token --free --label "$LABEL" --pin "$PIN" --so-pin "$SO_PIN" | sed -e 's/^/# /' - - if [ -n "$GROUPNAME" ]; then - chgrp -R -- "$GROUPNAME" "$TOKENPATH" - chmod -R -- g=rX,o= "$TOKENPATH" - fi -fi - -echo "export SOFTHSM2_CONF=\"$SOFTHSM2_CONF\"" -echo "export PIN_SOURCE=\"$PIN_SOURCE\"" -echo "export SOPIN_SOURCE=\"$SOPIN_SOURCE\"" -# These are intentionaly not exported -echo "PIN=\"$PIN\"" -echo "SO_PIN=\"$SO_PIN\"" diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf b/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf deleted file mode 100644 index 8dc7afb..0000000 --- a/Sanity/named/bind-dyndb-ldap-rebuild/main.fmf +++ /dev/null @@ -1,13 +0,0 @@ -summary: bind-dyndb-ldap build with current bind-devel -description: | - Checks whether bind-devel is okay to build bind-dyndb-ldap for freeipa. -test: ./test.sh -framework: beakerlib -recommend+: - - bind-devel - - fedpkg -adjust+: - - enabled: false - when: distro == rhel, centos - - enabled: false - when: component is defined and component != bind diff --git a/Sanity/named/bind-dyndb-ldap-rebuild/test.sh b/Sanity/named/bind-dyndb-ldap-rebuild/test.sh deleted file mode 100755 index a4dd96e..0000000 --- a/Sanity/named/bind-dyndb-ldap-rebuild/test.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} - -rlJournalStart - rlPhaseStartSetup - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - rlRun "source /etc/os-release" - case "$ID" in - fedora) - PKG=fedpkg - BRANCH=rawhide - EXTRA_REPOS='' - ;; - centos) - PKG=centpkg - BRANCH=c${VERSION}s - EXTRA_REPOS="--enablerepo=epel --enablerepo=crb" - ;; - rhel) - PKG=rhpkg - BRANCH=rhel-${VERSION}-main - EXTRA_REPOS=" --enablerepo='*CRB' --enablerepo='*buildroot'" - ;; - *) - rlLogFatal "Unsupported distribution $ID" ;; - esac - rlRun "rpm -q $PACKAGE-devel || dnf install -y $EXTRA_REPOS $PACKAGE-devel" - rlRun "rpm -q $PKG || dnf install -y $EXTRA_REPOS $PKG" - rlAssertRpm $PACKAGE-devel - rlRun "$PKG clone -a bind-dyndb-ldap" - rlRun "pushd bind-dyndb-ldap" - rlRun "ls -l *.spec" - rlRun "dnf builddep -y $EXTRA_REPOS *.spec" 0,1 - rlPhaseEnd - - rlPhaseStartTest - rlRun "git checkout $BRANCH" - rlRun "$PKG local" - rlRun "rpm -qpl $(arch)/bind-dyndb-ldap-*.$(arch).rpm | grep bind/ldap.so" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "popd" - rlRun "rm -rf $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalEnd diff --git a/Sanity/named/caching-forwarder-dnssec/main.fmf b/Sanity/named/caching-forwarder-dnssec/main.fmf deleted file mode 100644 index 9df6dd9..0000000 --- a/Sanity/named/caching-forwarder-dnssec/main.fmf +++ /dev/null @@ -1,17 +0,0 @@ -summary: Configure bind as caching and validating forwarder -contact: Petr Sklenar -test: ./test.sh -framework: beakerlib -description: | - Configures named as a caching forwarder. Keep dnssec-validation enabled and try to - workaround for buggy nameservers provided from the network. - - Test signed zones are validated and include ad bit. Check unsigned zones are - missing ad bit in responses. Requires security-aware DNS servers to be supplied by - the network. -recommend+: - - sed - - awk -tier: 2 -extra-nitrate: TC#0617579 -id: 3525bab3-7884-4252-b0ad-1688de267812 diff --git a/Sanity/named/caching-forwarder-dnssec/test.sh b/Sanity/named/caching-forwarder-dnssec/test.sh deleted file mode 100755 index d4675d0..0000000 --- a/Sanity/named/caching-forwarder-dnssec/test.sh +++ /dev/null @@ -1,306 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${CLEAN_ANCHORS:=y} - -bu_FALLBACK_SERVERS="8.8.8.8 8.8.4.4 9.9.9.9" -bu_DELV=$(type -p delv 2>/dev/null) -bu_DIG=$(type -p dig 2>/dev/null) -# Servers which failed DNSSEC-awareness check -bu_FAILED_SERVERS="" - -buGetServersConf() { - local RESOLV_CONF=${1:-/etc/resolv.conf} - awk '$1 == "nameserver" { printf "%s%s", DL, $2; DL=" " }' "$RESOLV_CONF" -} - -# Get list of resolv-conf (like) files, which might contain useful DNS servers -# Ordered in preference, tries to avoid DNSSEC-unaware servers -buGetCandidateResolvConf() { - local -a CONF_FILES=() - systemctl is-active --quiet NetworkManager && CONF_FILES+=("/run/NetworkManager/no-stub-resolv.conf") - systemctl is-active --quiet systemd-resolved && CONF_FILES+=("/run/systemd/resolve/resolv.conf") - CONF_FILES+=("/etc/resolv.conf") - echo "${CONF_FILES[@]}" -} - -# Print list of nameservers addresses, space separated. -# No check on them is done. -buGetNameservers() { - # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly - for CONF in $(buGetCandidateResolvConf) - do - local SERVERS - # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often - if [ -r "$CONF" ] && SERVERS=$(buGetServersConf "$CONF") && [ -n "$SERVERS" ]; then - echo "$SERVERS" - break - fi - done -} - -# Test server IP addresses give as parameters to find those, who -# are security-aware. -# Param1: space separated IP addresses of DNS servers -buCheckSecureNameservers() { - local SERVERS="$1" - bu_SECURE_SERVERS="" - - if [ -z "$bu_DELV" ] && [ -z "$bu_DIG" ]; then - rlFail "Both delv and dig from bind-utils are missing!" - return 1 - fi - for NS in ${SERVERS}; do - if [ -n "$bu_DELV" ]; then - - if $bu_DELV @$NS | grep -q '^; fully validated'; then - bu_SECURE_SERVERS+="$NS " - else - bu_FAILED_SERVERS+="$NS " - fi - elif [ -n "$bu_DIG" ]; then - - if $bu_DIG +noall +answer +dnssec @$NS | grep -qw RRSIG; then - bu_SECURE_SERVERS+="$NS " - else - bu_FAILED_SERVERS+="$NS " - fi - fi - done - [ -n "$bu_SECURE_SERVERS" ] -} - -# Try to find DNSSEC capable network provided forwarders. -# If that fails try to verify $bu_FALLBACK_SERVERS works and use them. -# If no working server is found, call rlDie to stop the test. -# Outputs found servers into bu_SECURE_SERVERS and bu_FAILED_SERVERS -# variables -buGetSecureNameservers() { - bu_FAILED_SERVERS="" - local SERVERS="" - - # avoids systemd-resolved breaking dnssec, prefer communication with remote servers directly - for CONF in $(buGetCandidateResolvConf) - do - # intentionally do not prefer local resolv.conf, because systemd-resolved is breaking it often - if [ -r "$CONF" ] && SERVERS=$(buGetServersConf "$CONF") && [ -n "$SERVERS" ]; then - rlLogDebug "Checking servers from $CONF..." - buCheckSecureNameservers "$SERVERS" && break - fi - done - if [ -z "${bu_SECURE_SERVERS}${bu_FAILED_SERVERS}" ]; then - rlDie "No nameservers obtained, tried files: $(buGetCandidateResolvConf)" - return 1 - fi - if [ -z "$bu_SECURE_SERVERS" ]; then - rlLog "Found resolv files..." - for CONF in $(buGetCandidateResolvConf) - do - rlRun -l "cat $CONF" - done - rlLog "Versions of network provided nameservers..." - for NS in ${SERVERS} - do - rlRun -l "dig @$NS txt ch version.bind" 0-255 - done - if [ -n "$bu_FALLBACK_SERVERS" ]; then - # If we have access to public DNS servers, use them instead. They are known to support DNSSEC. - buCheckSecureNameservers "$bu_FALLBACK_SERVERS" - rlLogWarning "No network provided servers (${SERVERS}) support DNSSEC! Fix the infrastructure!" - SERVERS+=" $bu_FALLBACK_SERVERS" - fi - fi - if [ -z "$bu_SECURE_SERVERS" ]; then - rlDie "No servers from ${SERVERS} support DNSSEC! Fix the infrastructure!" - return 1 - fi - - if [ -n "$bu_FAILED_SERVERS" ]; then - rlLogWarning "Servers not supporting DNSSEC: ${bu_FAILED_SERVERS}" - fi - rlLogInfo "Found security-aware servers: $bu_SECURE_SERVERS" -} - -# Create bind forwarder configuration from servers entered as parameters -buMakeForwarders() -{ - echo 'forwarders {'; - for NS in "$@" - do - printf "\t%s;\n" $NS - done - echo '}; # autogenerated' -} - -# Prints formatted used options in bind config -buPrintOptions() -{ - named-checkconf -px "$@" | sed -ne '/^options {/,/^};/ p' -} - -# Check whether option in $1 is used in options {} global block -buHasOption() -{ - local OPTION="$1" - buPrintOptions | grep -qw "^\s*${OPTION}" -} - -# Filter dig to print only desired section -# Input is dig output -buDigGetSection() -{ - local SECTION="${1:-ANSWER}" - sed -ne "/^;; ${SECTION} SECTION:/,/^$/ p" | grep -vE '^(\s*$|;.*$)' -} - -# Filter dig to print only desired value from double comment lines -# Input is dig output -buDigGetField() -{ - local FIELD="$1" - grep "^;;.*\s${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" -} - -# Filter dig input to print pseudosection contents only -buDigPseudosection() -{ - sed -ne "/^;; OPT PSEUDOSECTION:/,/^;; QUESTION SECTION/ p" | grep -vE '^;; (OPT PSEUDO|QUESTION )SECTION:' -} - -# Filter dig to print only desired value from single comment lines -# Useful for pseudosection -# Input is dig output -buDigGetField1() -{ - local FIELD="$1" - grep "^;\s\(.*\s\)\?${FIELD}:" | sed -e "s/.*\s${FIELD}:\s*\([^;,]*\)\([;,].*\|$\)/\1/" -} - -# Ensure reply has noerror status -buDigSuccess() -{ - rlRun -s "dig $*" - local STATUS="$(buDigGetField status < $rlRun_LOG)" - rlAssertEquals "Check result was positive" "$STATUS" NOERROR -} - -# Ensure reply is signed and verified -buDigSuccessSecure() -{ - rlRun -s "dig $*" - local STATUS="$(buDigGetField status < $rlRun_LOG)" - rlAssertEquals "Check dig result was positive" "$STATUS" NOERROR - local FLAGS="$(buDigGetField flags < $rlRun_LOG)" - rlRun "echo $FLAGS | grep -w ad" 0 "Check dig result has AD bit set" -} - -# Ensure reply is positive but insecure -buDigSuccessInsecure() -{ - rlRun -s "dig $*" - local STATUS="$(buDigGetField status < $rlRun_LOG)" - rlAssertEquals "Check dig result was positive" "$STATUS" NOERROR - local FLAGS="$(buDigGetField flags < $rlRun_LOG)" - rlRun "echo $FLAGS | grep -vw ad" 0 "Check dig result has AD bit unset" -} - -# Extract KSK key id from dig -buDigKskId() -{ - dig +nocrypto +short -t dnskey "$@"| tail -n1 | awk '$1 == 257 { sub("]", "", $7); print $7 }' -} - - -rlJournalStart - rlPhaseStartSetup - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - rlRun "set -o pipefail" - rlRun "named -V" - rlRun "dig -v" - rlRun "buGetSecureNameservers" || rlFail "No secure servers obtained" - rlFileBackup --missing-ok /etc/named/forwarders.conf - rlFileBackup /etc/named.conf - rlRun "buMakeForwarders ${bu_SECURE_SERVERS} > /etc/named/forwarders.conf" 0 - if ! buHasOption forwarders; then - rlLog "Inserting include to generated forwarders" - rlRun "sed -i -e '/^s*options\s*{/ a include \"/etc/named/forwarders.conf\";' /etc/named.conf" - fi - rlRun "named-checkconf" 0 "Test generated configuration is acccepted" - rlRun "rlServiceStop named" - if [ "$CLEAN_ANCHORS" = y ]; then - rlFileBackup --missing-ok /var/named/dynamic/managed-keys.bind{,.jnl} - rlRun "rm -f /var/named/dynamic/managed-keys.bind{,.jnl}" - fi - HAS_MANAGED_KEYS='' - rndc -h 2>&1 | grep -q 'managed-keys status' && HAS_MANAGED_KEYS='y' - rlPhaseEnd - -for I in {1..5}; do - rlPhaseStartTest "Basic test #$I" - rlRun "rlServiceStart named" - sleep 5 # this test works randomly - buDigSuccessSecure @localhost . DNSKEY - buDigSuccessSecure @localhost - - #KEYID=$(buDigKskId @localhost .) - #rlAssertGreater "Check $KEYID is non-zero" "$KEYID" 0 - #rlAssertNotEquals "Check keyId is not empty." "$KEYID" "" - -################ - EMPTY_COUNT=0 - KEYID="" - - for i in {1..30}; do - KEYID=$(buDigKskId @localhost .) - - if [[ -z "$KEYID" ]]; then - ((EMPTY_COUNT++)) - rlLog "Attempt $i: Empty result ($EMPTY_COUNT empty so far)" - else - rlLog "Attempt $i: Got KEYID = $KEYID" - LAST_WORKING_KEYID=$KEYID - fi - - sleep 0.2 - done - # If more than 3 failures, exit with error - rlAssertLesserOrEqual "Check EMPTY_COUNT is non-zero LESS than 21" "$EMPTY_COUNT" 21 -################ - - TEST1=$(dig +multi $LAST_WORKING_KEYID DNSKEY) - rlLog "`echo dig_for_dnskey;echo $TEST1`" - rlRun "rndc secroots" - rlRun "grep \"^./RSASHA256/$LAST_WORKING_KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted" - [ "$HAS_MANAGED_KEYS" = y ] && rlRun "rndc managed-keys status" - rlPhaseEnd -done - - rlPhaseStartTest "Host tests #$I" - for H in example.{org,com,net} fedoraproject.org isc.org - do - buDigSuccessSecure @localhost $H A - buDigSuccessSecure @localhost $H AAAA - done - for H in {org,com,net} - do - buDigSuccessSecure @localhost $H NS - buDigSuccessSecure @localhost $H DS - done - for H in {a,d,f}.root-servers.net ipv4only.arpa - do - buDigSuccessInsecure @localhost $H A - buDigSuccessInsecure @localhost $H AAAA - done - rlPhaseEnd - - rlPhaseStartCleanup - [ "$DEBUG" = y ] && PS1="test-debug $PS1" $SHELL -i - rlRun "popd" - rlRun "rm -f /etc/named/forwarders.conf" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlFileRestore - rlRun "rlServiceRestore named" - rlPhaseEnd -rlJournalEnd diff --git a/Sanity/named/dnstap-logging/Makefile b/Sanity/named/dnstap-logging/Makefile deleted file mode 100644 index ee7d5bf..0000000 --- a/Sanity/named/dnstap-logging/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/dnstap-logging -# Description: dnstap logging -# Author: psklenar@redhat.com -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2025 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/dnstap-logging -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: psklenar@redhat.com " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: dnstap logging" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Sanity/named/dnstap-logging/PURPOSE b/Sanity/named/dnstap-logging/PURPOSE deleted file mode 100644 index faa2fa7..0000000 --- a/Sanity/named/dnstap-logging/PURPOSE +++ /dev/null @@ -1,4 +0,0 @@ -PURPOSE of /CoreOS/bind/dnstap-logging -Description: dnstap logging -Author: psklenar@redhat.com -Bug summary: dnstap logging diff --git a/Sanity/named/dnstap-logging/main.fmf b/Sanity/named/dnstap-logging/main.fmf deleted file mode 100644 index f162df3..0000000 --- a/Sanity/named/dnstap-logging/main.fmf +++ /dev/null @@ -1,20 +0,0 @@ -summary: 'Test for: (dnstap logging)' -description: dnstap logging -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -duration: 15m -enabled: true -tag: - - NoRHEL6 - - NoRHEL7 - - Tier3 - - bind-utils -tier: '3' -adjust+: - - enabled: false - when: distro < rhel-9 - continue: false - - enabled: false - when: distro = rhel-alt-7 - continue: false diff --git a/Sanity/named/dnstap-logging/named.conf b/Sanity/named/dnstap-logging/named.conf deleted file mode 100644 index 1f497a3..0000000 --- a/Sanity/named/dnstap-logging/named.conf +++ /dev/null @@ -1,17 +0,0 @@ -options { - directory "/var/named"; - - // Enable dnstap logging - dnstap { all; }; - dnstap-output file "/var/named/data/dnstap.bin" versions 2; - - listen-on port 53 { any; }; - allow-query { any; }; - recursion yes; - dnssec-validation no; -}; - -zone "." IN { - type hint; - file "named.ca"; -}; diff --git a/Sanity/named/dnstap-logging/runtest.sh b/Sanity/named/dnstap-logging/runtest.sh deleted file mode 100755 index 68beb74..0000000 --- a/Sanity/named/dnstap-logging/runtest.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/dnstap-logging -# Description: Test for dnstap logging -# Author: psklenar@redhat.com -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2025 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE=${PACKAGE:-bind} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE || rlDie "Package $PACKAGE not installed" - TESTDIR=$(pwd) - DEFAULT_IF="$(ip a)" - rlLog "Arch: $(arch), PC name: $(hostname), $(hostname -A) User: $(whoami)" - rlLog "$DEFAULT_IF" - - rm -f /var/named/data/dnstap* - - rlPhaseEnd - - rlPhaseStartTest - rlFileBackup /etc/named/conf - cp named.conf /etc/named.conf - rlRun "rlServiceStart named" - sleep 5 - dig @127.0.0.1 fedoraproject.org - dig @127.0.0.1 fedoraproject.org - dig @127.0.0.1 fedoraproject.org - dig @127.0.0.1 ibm.com - dig @127.0.0.1 ibm.com - dig @127.0.0.1 ibm.com - sleep 1 - - rlLog "Is file readable?" - rlLog "`dnstap-read /var/named/data/dnstap.bin|tail`" - rlRun "dnstap-read /var/named/data/dnstapXXX.bin" - if [ $(wc -l < /var/named/data/dnstap.bin) -gt 2 ]; then - rlPass "File has more than 2 lines" - else - rlFail "File has 2 or fewer lines" - fi - - rlLog "rollout logs" - rlRun "rndc dnstap -roll 3" - rlRun "dnstap-read /var/named/data/dnstap.bin.0" - - rlPhaseEnd - - rlPhaseStartCleanup - rlLog 'Cleanup' - rm -f /var/named/data/dnstap.bin.0 /var/named/data/dnstap.bin - rlFileRestore - rlServiceRestore - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/named/geoip-support/Makefile b/Sanity/named/geoip-support/Makefile deleted file mode 100644 index 8b07309..0000000 --- a/Sanity/named/geoip-support/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Sanity/geoip-support -# Description: it tries more ip address from more locations -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Sanity/geoip-support -export TESTVERSION=1.1 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE a b c named.conf - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: it tries more ip address from more locations" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 66m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind libmaxminddb libmaxminddb-devel geolite2-country geolite2-city bind-utils" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Sanity/named/geoip-support/PURPOSE b/Sanity/named/geoip-support/PURPOSE deleted file mode 100644 index 63efa2b..0000000 --- a/Sanity/named/geoip-support/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/bind/Sanity/geoip-support -Description: it tries more ip address from more locations -Author: Petr Sklenar diff --git a/Sanity/named/geoip-support/a b/Sanity/named/geoip-support/a deleted file mode 100644 index 78f7038..0000000 --- a/Sanity/named/geoip-support/a +++ /dev/null @@ -1,18 +0,0 @@ -$ORIGIN petr.god. -$TTL 86400 -@ IN SOA dns.petr.god. hostmaster.petr.god. ( - 100 ; serial - 21600 ; - 3600 ; - 604800 ; - 86400 ) ; - - IN NS dns.petr.god. -dns IN A 127.0.0.1 -mail IN CNAME dns -petr.god. IN TXT "zone-a" -test1 IN A 1.1.1.1 -test2 IN A 1.1.1.2 -test3 IN A 1.1.1.3 -geo IN TXT "geo A" - diff --git a/Sanity/named/geoip-support/b b/Sanity/named/geoip-support/b deleted file mode 100644 index 0b6f3a6..0000000 --- a/Sanity/named/geoip-support/b +++ /dev/null @@ -1,18 +0,0 @@ -$ORIGIN petr.god. -$TTL 86400 -@ IN SOA dns.petr.god. hostmaster.petr.god. ( - 100 ; serial - 21600 ; - 3600 ; - 604800 ; - 86400 ) ; - - IN NS dns.petr.god. -dns IN A 127.0.0.1 -mail IN CNAME dns -petr.god. IN TXT "zone-b" -test1 IN A 2.2.2.1 -test2 IN A 2.2.2.2 -test3 IN A 2.2.2.3 -geo IN TXT "geo B" - diff --git a/Sanity/named/geoip-support/c b/Sanity/named/geoip-support/c deleted file mode 100644 index d513427..0000000 --- a/Sanity/named/geoip-support/c +++ /dev/null @@ -1,18 +0,0 @@ -$ORIGIN petr.god. -$TTL 86400 -@ IN SOA dns.petr.god. hostmaster.petr.god. ( - 100 ; serial - 21600 ; - 3600 ; - 604800 ; - 86400 ) ; - - IN NS dns.petr.god. -dns IN A 127.0.0.1 -mail IN CNAME dns -petr.god. IN TXT "zone-c" -test1 IN A 3.3.3.1 -test2 IN A 3.3.3.2 -test3 IN A 3.3.3.3 -geo IN TXT "geo C" - diff --git a/Sanity/named/geoip-support/main.fmf b/Sanity/named/geoip-support/main.fmf deleted file mode 100644 index 502989a..0000000 --- a/Sanity/named/geoip-support/main.fmf +++ /dev/null @@ -1,30 +0,0 @@ -summary: it tries more ip address from more locations -tier: '1' -description: '' -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -recommend: - - libmaxminddb - - libmaxminddb-devel - - geolite2-country - - geolite2-city -duration: 66m -enabled: true -tag: - - NoRHEL4 - - NoRHEL5 - - TIPfail_infra - - TIPpass - - bind9.16 - - bind9.18 -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1564443 -adjust+: - - enabled: false - when: distro < rhel-8 - continue: false -extra-nitrate: TC#0604089 -extra-summary: /CoreOS/bind/Sanity/geoip-support -extra-task: /CoreOS/bind/Sanity/geoip-support -id: e930061a-c2d5-4369-a2a3-5b02d29e75eb diff --git a/Sanity/named/geoip-support/named.conf b/Sanity/named/geoip-support/named.conf deleted file mode 100644 index 9918c15..0000000 --- a/Sanity/named/geoip-support/named.conf +++ /dev/null @@ -1,94 +0,0 @@ -// -// named.conf -// -// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS -// server as a caching only nameserver (as a localhost DNS resolver only). -// -// See /usr/share/doc/bind*/sample/ for example named configuration files. -// -// See the BIND Administrator's Reference Manual (ARM) for details about the -// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html - -options { - listen-on port 53 { 127.0.0.1; }; - listen-on-v6 port 53 { ::1; }; - directory "/var/named"; - dump-file "/var/named/data/cache_dump.db"; - statistics-file "/var/named/data/named_stats.txt"; - memstatistics-file "/var/named/data/named_mem_stats.txt"; - recursing-file "/var/named/data/named.recursing"; - secroots-file "/var/named/data/named.secroots"; - allow-query { any; }; - - /* - - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion. - - If you are building a RECURSIVE (caching) DNS server, you need to enable - recursion. - - If your recursive DNS server has a public IP address, you MUST enable access - control to limit queries to your legitimate users. Failing to do so will - cause your server to become part of large scale DNS amplification - attacks. Implementing BCP38 within your network would greatly - reduce such attack surface - */ - recursion yes; - - dnssec-validation yes; - - /* Path to ISC DLV key */ - bindkeys-file "/etc/named.root.key"; - - managed-keys-directory "/var/named/dynamic"; - - pid-file "/run/named/named.pid"; - session-keyfile "/run/named/session.key"; - geoip-directory "/usr/share/GeoIP"; -}; - -acl "geoname" { - geoip country US; -// geoip region CA; -// geoip city "Redwood City"; /* names, etc., must be quoted if they contain spaces */ -}; - -acl "tibet" { - geoip country CN; -}; - - - -view "geoname" { - match-clients { geoname;}; - zone "petr.god." { - file "a"; - type master; - }; -}; - -view "tibet" { - match-clients { tibet;}; - zone "petr.god." { - file "c"; - type master; - }; -}; - - -view "default" { - zone "petr.god." { - file "b"; - type master; - }; -}; - - - -logging { - channel default_debug { - file "data/named.run"; - severity dynamic; - }; -}; - -// include "/etc/named.rfc1912.zones"; -include "/etc/named.root.key"; - diff --git a/Sanity/named/geoip-support/notes b/Sanity/named/geoip-support/notes deleted file mode 100644 index 515d24d..0000000 --- a/Sanity/named/geoip-support/notes +++ /dev/null @@ -1,42 +0,0 @@ -bind-9.11.10-1.fc30.x86_64 -geolite2-country-20190806-1.fc30.noarch -libmaxminddb-devel -### tool mmdblookup ^ -libmaxminddb - - - 4 yum install libmax\* - 75 yum install geolite2-city a geolite2-country - 76 yum install geolite2-city geolite2-country - - -my NS with 4.3.2.1 - XY ip netns add blue - 12 ip link add cosi0 type veth peer name cosi1 - 15 ip link set cosi0 netns blue - 16 ip a - 17 ip addr add 192.168.88.1 dev cosi1@if6 - 18 ip addr add 192.168.88.1 dev cosi1 - - - -############# -mmdblookup --file /usr/share/GeoIP/GeoLite2-City.mmdb --ip 4.3.2.1 -.... - "country": - { - "geoname_id": - 6252001 - "iso_code": - "US" - "names": - -.....blabla - - - -[root@host-10-0-136-254 smoke-high-load]# dig -b 10.0.136.254 @127.0.0.1 test1.petr.god +short -192.168.122.222 -[root@host-10-0-136-254 smoke-high-load]# dig -b 4.3.2.1 @127.0.0.1 test1.petr.god +short -192.168.122.2 - diff --git a/Sanity/named/geoip-support/runtest.sh b/Sanity/named/geoip-support/runtest.sh deleted file mode 100755 index e99b9a7..0000000 --- a/Sanity/named/geoip-support/runtest.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Sanity/geoip-support -# Description: it tries more ip address from more locations -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlLog "PACKAGE=`echo $PACKAGE`" - - rlFileBackup /etc/named.conf /var/named/a /var/named/b - rlPhaseEnd - - rlPhaseStartSetup 'files' - rlRun "cp named.conf /etc/named.conf" - - rlRun "cp a /var/named/a" - rlRun "cp b /var/named/b" - rlRun "cp c /var/named/c" - chown root.named /var/named/a - chown root.named /var/named/b - chown root.named /var/named/c - rlRun "rlServiceStart named" - - rlPhaseEnd - - rlPhaseStartSetup 'net' - ip netns add blue - ip link add cosi0 type veth peer name cosi1 - ip link set cosi0 netns blue - ip addr add 4.3.2.1 dev cosi1 - ip addr add 222.19.68.0 dev cosi1 - - rlRun 'ip a|grep 222.19.68.0' - rlRun 'ip a|grep 4.3.2.1' - - rlPhaseEnd - - rlPhaseStartTest 'dig' - rlRun "dig -b 4.3.2.1 @127.0.0.1 test1.petr.god +short | grep '1.1.1.1'" - rlRun "dig -b 127.0.0.1 @127.0.0.1 test1.petr.god +short | grep '2.2.2.1'" - rlRun "dig -b 222.19.68.0 @127.0.0.1 test1.petr.god +short | grep '3.3.3.1'" - - rlRun "dig -b 4.3.2.1 +short @127.0.0.1 geo.petr.god TXT | grep 'geo A'" - rlRun "dig -b 222.19.68.0 +short @127.0.0.1 geo.petr.god TXT | grep 'geo C'" - rlRun "dig -b 127.0.0.1 +short @127.0.0.1 geo.petr.god TXT | grep 'geo B'" - rlPhaseEnd - -#for i in `seq 1 100000`;do dig -b 4.3.2.1 @127.0.0.1 test1.petr.god +short & dig -b 127.0.0.1 @127.0.0.1 test1.petr.god +short & dig -b 222.19.68.0 @127.0.0.1 test1.petr.god +short & done - - - rlPhaseStartCleanup - ip netns del blue - rlFileRestore - rlServiceRestore named - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/named/json-support/Makefile b/Sanity/named/json-support/Makefile deleted file mode 100644 index fcfda66..0000000 --- a/Sanity/named/json-support/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Sanity/json-support -# Description: Test for BZ#1899257 ([RFE] Request for libjson support to be added to) -# Author: Petr Mensik -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Sanity/json-support -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE readstats.py - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include $(realpath /usr/share/rhts/lib/rhts-make.include) - -$(METADATA): Makefile - @echo "Owner: Petr Mensik " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1899257 ([RFE] Request for libjson support to be added to)" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind bind-utils python3" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1899257" >> $(METADATA) - @echo "Releases: -RHEL4 -RHEL6 -RHEL7 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Sanity/named/json-support/PURPOSE b/Sanity/named/json-support/PURPOSE deleted file mode 100644 index 9518b0e..0000000 --- a/Sanity/named/json-support/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/bind/Sanity/json-support -Description: Test for BZ#1899257 ([RFE] Request for libjson support to be added to) -Author: Petr Mensik -Bug summary: [RFE] Request for libjson support to be added to bind compile options for statistics-channel -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1899257 diff --git a/Sanity/named/json-support/main.fmf b/Sanity/named/json-support/main.fmf deleted file mode 100644 index 8d6226c..0000000 --- a/Sanity/named/json-support/main.fmf +++ /dev/null @@ -1,17 +0,0 @@ -summary: Test for BZ#1899257 ([RFE] Request for libjson support to be added to) -description: | - Bug summary: [RFE] Request for libjson support to be added to bind compile options for statistics-channel - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1899257 -contact: - - Petr Mensik - - Petr Sklenar -test: ./runtest.sh -framework: beakerlib -recommend: - - python3 -duration: 5m -tier: 2 -extra-summary: /CoreOS/bind/Sanity/json-support -extra-task: /CoreOS/bind/Sanity/json-support -extra-nitrate: TC#0617580 -id: 5ee697b0-9cee-4316-b3ca-403629851c36 diff --git a/Sanity/named/json-support/readstats.py b/Sanity/named/json-support/readstats.py deleted file mode 100755 index 1a7c3b4..0000000 --- a/Sanity/named/json-support/readstats.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/python3 -# -# Script verifying BIND3 statistics interface work with json - -import urllib.request -import json -import sys - -url = 'http://localhost:80/json' # use first parameter to override -timeout = 10 # connection timeout in seconds - -if len(sys.argv)>1: - url = sys.argv[1] - -print("# Reading statistics from URL: {0}".format(url)) -with urllib.request.urlopen(url, timeout=timeout) as req: - js = json.load(req) - #print(json.dumps(js, indent=4)) - print('BIND version: ', js['version']) - print('Socket stats, IPV4 UDP requests: ', js['sockstats']['UDP4Open']) - print('Name server stats, UDP queries: ', js['nsstats']['QryUDP']) diff --git a/Sanity/named/json-support/runtest.sh b/Sanity/named/json-support/runtest.sh deleted file mode 100755 index c3d7eb2..0000000 --- a/Sanity/named/json-support/runtest.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Sanity/json-support -# Description: Test for BZ#1899257 ([RFE] Request for libjson support to be added to) -# Author: Petr Mensik -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlLog "PACKAGE=`echo $PACKAGE`" - - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - TESTDIR="`pwd`" - rlRun "pushd $TmpDir" - rlFileBackup /etc/named.conf - STATSURL='http://localhost:853/json' - cat >> /etc/named.conf < -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Sanity/named-checkzone -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE cptest2.tld.db - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Sanity/named-checkzone" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind bind-utils" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Sanity/named/named-checkzone/PURPOSE b/Sanity/named/named-checkzone/PURPOSE deleted file mode 100644 index e434329..0000000 --- a/Sanity/named/named-checkzone/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/bind/Sanity/named-checkzone -Description: Sanity/named-checkzone -Author: Petr Sklenar diff --git a/Sanity/named/named-checkzone/cptest2.tld.db b/Sanity/named/named-checkzone/cptest2.tld.db deleted file mode 100644 index 504021d..0000000 --- a/Sanity/named/named-checkzone/cptest2.tld.db +++ /dev/null @@ -1,30 +0,0 @@ -; cPanel first:11.49.9999.115 (update_time):1429809767 11.49.9999.115: Cpanel::ZoneFile::VERSION:1.3 hostname:i-00002f3f.cpanel.nova latest:11.49.9999.115 -; Zone file for cptest2.tld -$TTL 14400 -@ 86400 IN SOA ns1.cpanel.nova. julian.brown.cpanel.net. ( - 2015042303 ; serial, todays date+todays - 86400 ; refresh, seconds - 7200 ; retry, seconds - 3600000 ; expire, seconds - 86400 ) ; minimum, seconds - -cptest2.tld. 86400 IN NS ns1.cpanel.nova. -cptest2.tld. 86400 IN NS ns2.cpanel.nova. - - -cptest2.tld. IN A 10.6.27.120 - -cptest2.tld. IN MX 0 cptest2.tld. - -mail IN CNAME cptest2.tld. -www IN CNAME cptest2.tld. -ftp IN A 10.6.27.120 - -cptest2.tld. IN TXT "v=spf1 +a +mx +ip4:10.6.27.120 ~all" -cpanel IN A 10.6.27.120 -webdisk IN A 10.6.27.120 -cpcalendars IN A 10.6.27.120 -cpcontacts IN A 10.6.27.120 -whm IN A 10.6.27.120 -webmail IN A 10.6.27.120 -default._domainkey IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAna8Du0cGijhRQWLN1Eb0jqJZbggaSqmyyM2EEua3U8J9YWJ9nNMS08lSHGyQSpVPh8g/uJaHa1cMkXla5ZGGra5GhY+WbAd9m6W45ztcMnXMTBbmMtMu24LgdXWNj0Lkotl4ewCEn9UioQFxpIbNnn6qrhKMajsfygb5/Zzq1rF2NT+FjZRbXtkKGd6tgB03I" bnMlMrmuccNX8U3oVbAk0+hI+Y5eOErYK54iUPvysF9MJJWMV40H7woumNvx73jswA2iK+ZKPOGH9CNXbToqgTbJmRRoMpY0nwjCVsIhaCN9bZxrpF/LaoE/3qeccUAT1tIwEZJIj6ruC8Rx3ydwQIDAQAB\; diff --git a/Sanity/named/named-checkzone/main.fmf b/Sanity/named/named-checkzone/main.fmf deleted file mode 100644 index 8c0f39e..0000000 --- a/Sanity/named/named-checkzone/main.fmf +++ /dev/null @@ -1,22 +0,0 @@ -summary: Sanity/named-checkzone -description: '' -contact: Petr Sklenar -test: ./runtest.sh -tier: 2 -framework: beakerlib -duration: 5m -enabled: true -tag: - - NoRHEL4 - - NoRHEL5 - - TIP_fedora_pass - - TIPfail_infra - - TIPpass -adjust+: - - enabled: false - when: distro == rhel-4, rhel-5 - continue: false -extra-nitrate: TC#0500008 -extra-summary: /CoreOS/bind/Sanity/named-checkzone -extra-task: /CoreOS/bind/Sanity/named-checkzone -id: eae4f1cf-90e4-4cfe-a470-9b9ac6450f53 diff --git a/Sanity/named/named-checkzone/runtest.sh b/Sanity/named/named-checkzone/runtest.sh deleted file mode 100755 index b9871f4..0000000 --- a/Sanity/named/named-checkzone/runtest.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Sanity/named-checkzone -# Description: Sanity/named-checkzone -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlLog "PACKAGE=`echo $PACKAGE`" - - rlRun "ls cptest2.tld.db" - rlPhaseEnd - - rlPhaseStartTest "check zone file from bug 1215164" - rlRun "named-checkzone cptest2.tld cptest2.tld.db" - rlRun "named-checkzone cptest2.tld cptest2.tld.db | grep 'add matching type SPF record'" 1 - rlPhaseEnd - -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/utils/delv-smoke-test/Makefile b/Sanity/utils/delv-smoke-test/Makefile deleted file mode 100644 index d988927..0000000 --- a/Sanity/utils/delv-smoke-test/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Sanity/delv-smoke-test -# Description: Test for BZ#1578128 ([RFE] Provide delv functionality) -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Sanity/delv-smoke-test -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1578128 ([RFE] Provide delv functionality)" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 15m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind bind-utils" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1578128" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Sanity/utils/delv-smoke-test/PURPOSE b/Sanity/utils/delv-smoke-test/PURPOSE deleted file mode 100644 index 10312fc..0000000 --- a/Sanity/utils/delv-smoke-test/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/bind/Sanity/delv-smoke-test -Description: Test for BZ#1578128 ([RFE] Provide delv functionality) -Author: Petr Sklenar -Bug summary: [RFE] Provide delv functionality -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 diff --git a/Sanity/utils/delv-smoke-test/main.fmf b/Sanity/utils/delv-smoke-test/main.fmf deleted file mode 100644 index d1fe2d6..0000000 --- a/Sanity/utils/delv-smoke-test/main.fmf +++ /dev/null @@ -1,24 +0,0 @@ -summary: Test for BZ#1578128 ([RFE] Provide delv functionality) -description: | - Bug summary: [RFE] Provide delv functionality - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -duration: 15m -enabled: true -tag: - - NoRHEL4 - - NoRHEL5 - - TIPfail_infra - - TIPpass -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1578128 -adjust+: - - enabled: false - when: distro == rhel-4, rhel-5, rhel-6 - continue: false -extra-nitrate: TC#0600760 -extra-summary: /CoreOS/bind/Sanity/delv-smoke-test -extra-task: /CoreOS/bind/Sanity/delv-smoke-test -id: f1a91125-a3e4-4675-a598-dfa8969d20f1 diff --git a/Sanity/utils/delv-smoke-test/runtest.sh b/Sanity/utils/delv-smoke-test/runtest.sh deleted file mode 100755 index 737f6e2..0000000 --- a/Sanity/utils/delv-smoke-test/runtest.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Sanity/delv-smoke-test -# Description: Test for BZ#1578128 ([RFE] Provide delv functionality) -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} -BACKUP_RESOLV="" -SOURCE_RESOLV="/etc/resolv.conf" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE-utils - rlRun "REAL_RESOLV=$(realpath /etc/resolv.conf)" - rlRun "BACKUP_RESOLV=$(mktemp /etc/resolv-XXXXXX.conf)" - rlRun "rm -f $BACKUP_RESOLV" - rlRun -l "hostnamectl" 0-255 "Record type of used machine" - if [ "$REAL_RESOLV" = /run/systemd/resolve/stub-resolv.conf ]; then - rlWarning "systemd-resolved stub detected, temporary switching..." - rlRun "mv /etc/resolv.conf $BACKUP_RESOLV" - SOURCE_RESOLV="/run/systemd/resolve/resolv.conf" - else - rlRun "mv /etc/resolv.conf $BACKUP_RESOLV" - SOURCE_RESOLV="$BACKUP_RESOLV" - fi - rlRun "cp $SOURCE_RESOLV /etc/resolv.conf" - rlRun -l "cat /etc/resolv.conf" - DNSSEC="" - for NS in $(awk '$1 == "nameserver" { print $2 }' /etc/resolv.conf) - do - if dig +dnssec @$NS | grep -q RRSIG; then - rlLog "nameserver $NS supports DNSSEC" - DNSSEC=yes - else - rlLogWarning "nameserver $NS does not support DNSSEC!" - rlRun -l "dig +short @$NS -t txt -c ch -q version.bind" 0 "Query version of server $NS" - rlRun "sed -e '/$NS/ d' -i /etc/resolv.conf" - fi - rlRun -c "dig @$NS | grep -w RRSIG" 1 "Check signatures are not present always on $NS" - done - if [ -z "$DNSSEC" ]; then - DNSSEC=no - rlLogWarning "Infrastructure does not support DNSSEC at all!" - rlRun "cp $SOURCE_RESOLV /etc/resolv.conf" - fi - rlRun -l "cat /etc/resolv.conf" 0 "after modifications" - rlPhaseEnd - - rlPhaseStartTest - rlRun -l -s "delv redhat.com" - rlAssertGrep 'IN' $rlRun_LOG - rlRun -s "delv redhat.com soa +multi" - rlAssertGrep 'serial' $rlRun_LOG - rlRun -s "delv +multi +vtrace" - rlRun "LINES=$(wc -l <$rlRun_LOG)" - rlRun -l "cat $rlRun_LOG" - rlAssertGreater "delv +vtrace should show few lines" "$LINES" "10" - rlRun "delv +vtrace | grep 'fully validated'" - if [ "$DNSSEC" = yes ]; then - rlRun -s "delv" - rlAssertGrep 'fully validated' $rlRun_LOG - rlRun -s "delv example.net" - rlAssertGrep 'fully validated' $rlRun_LOG - rlRun -s "delv +vtrace fedoraproject.org" - rlAssertGrep 'fully validated' $rlRun_LOG - rlAssertGrep 'marking as secure' $rlRun_LOG - - fi - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "rm -f $rlRun_LOG" - if [ -n "$BACKUP_RESOLV" ]; then - rlRun "rm -f /etc/resolv.conf" - rlRun "mv $BACKUP_RESOLV /etc/resolv.conf" - fi - rlPhaseEnd - -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/utils/pkcs11-tools/main.fmf b/Sanity/utils/pkcs11-tools/main.fmf deleted file mode 100644 index 7393fd3..0000000 --- a/Sanity/utils/pkcs11-tools/main.fmf +++ /dev/null @@ -1,26 +0,0 @@ -summary: PKCS11 tools and operations test -description: | - Bug summary: PKCS11 key operations using tools - Issue link: https://issues.redhat.com/browse/RHEL-33729 - Generate softhsm token RSA keys, each for KSK and ZSK. - Then use bind tools to actually create small signed content and verify it is dnssec compatible. -contact: Petr Mensik -test: ./runtest.sh -framework: beakerlib -duration: 15m -enabled: true -tag: - - TIPpass -link: - - relates: https://issues.redhat.com/browse/RHEL-33729 -adjust+: - - enabled: false - when: distro < rhel-10 - continue: false -recommend+: - - bind-utils - - bind-dnssec-utils - - softhsm - - opensc - - pkcs11-provider - - openssl-engine diff --git a/Sanity/utils/pkcs11-tools/runtest.sh b/Sanity/utils/pkcs11-tools/runtest.sh deleted file mode 100755 index e57646f..0000000 --- a/Sanity/utils/pkcs11-tools/runtest.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k expandtab sts=4 -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/bind/Sanity/delv-smoke-test -# Description: Test for BZ#1578128 ([RFE] Provide delv functionality) -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:=bind} -BACKUP_RESOLV="" -SOURCE_RESOLV="/etc/resolv.conf" -: ${ENGINE:=pkcs11} -# auto to choose based on release, y to force engine usage -: ${USE_ENGINE:=auto} - -make_openssl_conf() { - cat << EOF -HOME = . - -# Use this in order to automatically load providers. -openssl_conf = openssl_init - -[openssl_init] -providers = provider_sect - -[provider_sect] -default = default_sect -pkcs11 = pkcs11_sect - -[default_sect] -activate = 1 - -[pkcs11_sect] -module = ${PROVIDER_MODULE} -pkcs11-module-path = ${SOFTHSM2_MODULE} -pkcs11-module-token-pin = file:${PIN_SOURCE} -activate = 1 -EOF -} - -make_localhost_zone() { - cat << 'EOF' -$TTL 10m -@ IN SOA @ rname.invalid. ( - 0 ; serial - 1D ; refresh - 1H ; retry - 1W ; expire - 3H ) ; minimum - NS @ - A 127.0.0.1 - AAAA ::1 - -EOF -} - -pkcs11_tool_object_uri() { - awk '"uri:" == $1 { print $2 }' -} - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE-utils - - TmpDir="$(mktemp -d)" - SETUP_SOFTHSM=`readlink -f setup-named-softhsm.sh` - SOFTHSM2_MODULE="$(rpm -E '%{_libdir}/pkcs11/libsofthsm2.so')" - PROVIDER_MODULE="$(rpm -E '%{_libdir}/ossl-modules/pkcs11.so')" - # Used by OpenSSL - PKCS11_PROVIDER_MODULE="$SOFTHSM2_MODULE" - export PKCS11_PROVIDER_MODULE PROVIDER_MODULE - export PKCS11_PROVIDER_DEBUG=file:$TmpDir/provider-debug.log,level:2 - - if [ -x "$SOFTHSM2_MODULE" ]; then - export SOFTHSM2_MODULE - fi - - rlRun "softhsm2-util --show-slots | grep 'Initialized: *yes'" 1 "Check no slot is initialized already" - rlRun "eval $(bash $SETUP_SOFTHSM -A)" 0 "Preparing PKCS#11 token slot" - rlLog "Vars: conf=$SOFTHSM2_CONF pin=$PIN_SOURCE sopin=$SOPIN_SOURCE" - - rlRun "pushd $TmpDir" - rlRun "make_openssl_conf | tee openssl.conf" 0 "Make provider enabled OpenSSL configuration" - rlRun "make_localhost_zone > test.zone" 0 "Create test zone" - export OPENSSL_CONF="$TmpDir/openssl.conf" - rlLog "OPENSSL_CONF=$OPENSSL_CONF" - DNSSEC_ENGINE="" - OSSL_ENGINE="" - if [ "$USE_ENGINE" = auto ]; then - if rlIsRHEL '<10' || rlIsFedora '<32' || rlIsCentOS '<10'; then - USE_ENGINE='y' - fi - fi - if [ "$USE_ENGINE" = y ]; then - rlLog "Using OpenSSL engine, legacy mode" - DNSSEC_ENGINE="-E $ENGINE" - OSSL_ENGINE="-engine $ENGINE" - else - rlLog "Not using engine, using OpenSSL provider" - fi - rlPhaseEnd - - rlPhaseStartSetup "Prepare token" - # This test prepares token to be used by the root user, not really complicating it with file access rights. - # It may not emulare properly what is used by named - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -L" 0 "check slots" - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -T" 0 "check tokens" - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:2048 --label test-zsk" 0 "generate new pair" - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE --pin $PIN --keypairgen --key-type RSA:4096 --label test-ksk" 0 "generate new pair" - rlRun "pkcs11-tool --module $SOFTHSM2_MODULE -O" 0 "check objects saved" - rlRun "ZSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE -O --label test-zsk --type pubkey | pkcs11_tool_object_uri)" 0 "Obtain slot zsk URI" - rlRun "KSK_URI=\$(pkcs11-tool --module $SOFTHSM2_MODULE -O --label test-ksk --type pubkey | pkcs11_tool_object_uri)" 0 "Obtain slot ksk URI" - rlRun "ZSK_URI=\"${ZSK_URI%;type=public}\"" 0 "Remove public type from ZSK URI" - rlRun "KSK_URI=\"${KSK_URI%;type=public}\"" 0 "Remove public type from KSK URI" - rlRun "test -n \"$ZSK_URI\"" 0 "Check URI were obtained" - rlRun "test -n \"$KSK_URI\"" 0 "Check URI were obtained" - rlRun "openssl pkey $OSSL_ENGINE -in '$KSK_URI?pin-source=$PIN_SOURCE' -pubout" 0,1 "Test OpenSSL knows the public KSK key" - rlRun "openssl pkey $OSSL_ENGINE -in '$ZSK_URI?pin-source=$PIN_SOURCE' -pubout" 0,1 "Test OpenSSL knows the public ZSK key" - if openssl storeutl -help >& /dev/null; then - rlRun "openssl storeutl $OSSL_ENGINE -text '$KSK_URI?pin-source=$PIN_SOURCE'" 0,1 "Test OpenSSL knows the public KSK key" - rlRun "openssl storeutl $OSSL_ENGINE -text '$ZSK_URI?pin-source=$PIN_SOURCE'" 0,1 "Test OpenSSL knows the public ZSK key" - fi - rlPhaseEnd - - rlPhaseStartTest "Test DNSSEC operations on token" - rlRun "ORIGIN='test'" - rlRun "ZONEFILE='test.zone'" - rlRun "SIGNEDFILE='test.zone.signed'" - rlRun "dnssec-keyfromlabel -a RSASHA256 $DNSSEC_ENGINE -l \"$ZSK_URI?pin-source=$PIN_SOURCE\" $ORIGIN" 0 "Import dnssec ZSK" - rlRun "dnssec-keyfromlabel -a RSASHA256 $DNSSEC_ENGINE -l \"$KSK_URI?pin-source=$PIN_SOURCE\" -f KSK $ORIGIN" 0 "Import dnssec KSK" - rlRun "dnssec-signzone $DNSSEC_ENGINE -S -o $ORIGIN -f $SIGNEDFILE $ZONEFILE" 0 "Create zone signatures" - rlRun "test -e $SIGNEDFILE" 0 "Check signed zone were created." - rlRun "dnssec-verify $DNSSEC_ENGINE -o $ORIGIN $SIGNEDFILE" 0 "Check zone were signed ok" - rlRun "named-checkzone $ORIGIN $ZONEFILE" 0 "Validate input zone file" - rlRun "named-checkzone $ORIGIN $SIGNEDFILE" 0 "Validate signed zone file" - [ "$DEBUG" = y ] && PS1="test-debug $PS1" bash -i - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "softhsm2-util --token rpm --delete-token" - rlRun "popd" - rlRun "rm -rf $TmpDir" - rlPhaseEnd - -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/utils/pkcs11-tools/setup-named-softhsm.sh b/Sanity/utils/pkcs11-tools/setup-named-softhsm.sh deleted file mode 100755 index a13c91e..0000000 --- a/Sanity/utils/pkcs11-tools/setup-named-softhsm.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh -# -# This script will initialise token storage of softhsm PKCS11 provider -# in custom location. Is useful to store tokens in non-standard location. -# -# Output can be evaluated from bash, it will prepare it for usage of temporary tokens. -# Recommended use: -# eval $(bash setup-named-softhsm.sh -A) -# - -SOFTHSM2_CONF="$1" -TOKENPATH="$2" -GROUPNAME="$3" -# Do not use this script for real keys worth protection -# This is intended for crypto accelerators using PKCS11 interface. -# Uninitialized token would fail any crypto operation. -PIN=1234 -SO_PIN=1234 -LABEL=rpm - -set -e - -echo_i() -{ - echo "#" $@ -} - -random() -{ - if [ -x "$(which openssl 2>/dev/null)" ]; then - openssl rand -base64 $1 - else - dd if=/dev/urandom bs=1c count=$1 | base64 - fi -} - -usage() -{ - echo "Usage: $0 -A [token directory] [group]" - echo " or: $0 [group]" -} - -if [ "$SOFTHSM2_CONF" = "-A" -a -z "$TOKENPATH" ]; then - TOKENPATH=$(mktemp -d /var/tmp/softhsm-XXXXXX) -fi - -if [ -z "$SOFTHSM2_CONF" -o -z "$TOKENPATH" ]; then - usage >&2 - exit 1 -fi - -if [ "$SOFTHSM2_CONF" = "-A" ]; then - # Automagic mode instead - MODE=secure - SOFTHSM2_CONF="$TOKENPATH/softhsm2.conf" - PIN_SOURCE="$TOKENPATH/pin" - SOPIN_SOURCE="$TOKENPATH/so-pin" - TOKENPATH="$TOKENPATH/tokens" -else - MODE=legacy -fi - -[ -d "$TOKENPATH" ] || mkdir -p "$TOKENPATH" - -umask 0022 - -if ! [ -f "$SOFTHSM2_CONF" ]; then -cat << SED > "$SOFTHSM2_CONF" -# SoftHSM v2 configuration file - -directories.tokendir = ${TOKENPATH} -objectstore.backend = file - -# ERROR, WARNING, INFO, DEBUG -log.level = ERROR - -# If CKF_REMOVABLE_DEVICE flag should be set -slots.removable = false -SED -else - echo_i "Config file $SOFTHSM2_CONF already exists" >&2 -fi - -if [ -n "$PIN_SOURCE" ]; then - touch "$PIN_SOURCE" "$SOPIN_SOURCE" - chmod 0600 "$PIN_SOURCE" "$SOPIN_SOURCE" - if [ -n "$GROUPNAME" ]; then - chgrp "$GROUPNAME" "$PIN_SOURCE" "$SOPIN_SOURCE" - chmod g+r "$PIN_SOURCE" "$SOPIN_SOURCE" - fi -fi - -export SOFTHSM2_CONF - -if softhsm2-util --show-slots | grep 'Initialized:[[:space:]]*yes' > /dev/null -then - echo_i "Token in ${TOKENPATH} is already initialized" >&2 - - [ -f "$PIN_SOURCE" ] && PIN=$(cat "$PIN_SOURCE") - [ -f "$SOPIN_SOURCE" ] && SO_PIN=$(cat "$SOPIN_SOURCE") -else - PIN=$(random 6) - SO_PIN=$(random 18) - if [ -n "$PIN_SOURCE" ]; then - echo -n "$PIN" > "$PIN_SOURCE" - echo -n "$SO_PIN" > "$SOPIN_SOURCE" - fi - - echo_i "Initializing tokens to ${TOKENPATH}..." - softhsm2-util --init-token --free --label "$LABEL" --pin "$PIN" --so-pin "$SO_PIN" | sed -e 's/^/# /' - - if [ -n "$GROUPNAME" ]; then - chgrp -R -- "$GROUPNAME" "$TOKENPATH" - chmod -R -- g=rX,o= "$TOKENPATH" - fi -fi - -echo "export SOFTHSM2_CONF=\"$SOFTHSM2_CONF\"" -echo "export PIN_SOURCE=\"$PIN_SOURCE\"" -echo "export SOPIN_SOURCE=\"$SOPIN_SOURCE\"" -# These are intentionaly not exported -echo "PIN=\"$PIN\"" -echo "SO_PIN=\"$SO_PIN\"" diff --git a/Smoke/IpaInstallAndStart/main.fmf b/Smoke/IpaInstallAndStart/main.fmf deleted file mode 100644 index 8bf4036..0000000 --- a/Smoke/IpaInstallAndStart/main.fmf +++ /dev/null @@ -1,16 +0,0 @@ -summary: Ipa install, Start and basic usage -test: ./test.sh -framework: beakerlib -duration: 68m -contact: Petr Sklenar -adjust+: - - enabled: false - when: component != bind - because: freeipa is not supported with alternative components -extra-nitrate: TC#0617581 -tag: morecpu -id: d4375cba-a2fd-4b33-bb8a-83cda760e237\ -check: - - how: avc - result: info - when: distro < rhel-9 diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh deleted file mode 100755 index dd363bb..0000000 --- a/Smoke/IpaInstallAndStart/test.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Author: Petr Sklenar -# test based on original Petr Mensik's tests -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - - - -DM_SECRET=dmSecret -ADMIN_SECRET=adminSecret -HOST_SECRET=hostSecret -DOMAIN=ipa.test -REALM=IPA.TEST - -fetch_local_ipv4() -{ - ip address | awk '$1 == "inet" { print $2 }' | cut -d/ -f1 | grep -v '^127\.'| tail -n1 -} - -prepareIpaServer() -{ - if rlIsRHEL >= 8 - then - rlRun "dnf -y module install idm:DL1" - fi - - rlRun "dnf -y install freeipa-server-dns" - ORIG_HOSTNAME=${HOSTNAME} -# there is longer name at AWS, more than 64char - #echo '127.0.0.1 ipa.ipa' >> /etc/hosts - HOSTNAME='petr.svetr' - hostnamectl hostname petr.svetr - IP4=`fetch_local_ipv4` - hostname ${HOSTNAME} - - if ! ipactl status - then - if ! grep ${HOSTNAME} /etc/hosts - then - # getent hosts ${HOSTNAME} >> /etc/hosts - echo "${IP4} ${HOSTNAME} ${ORIG_HOSTNAME}" >> /etc/hosts - fi - rlRun "ipa-server-install -U --hostname ${HOSTNAME} --ip-address ${IP4} -n ${DOMAIN} -r ${REALM} --setup-dns -p ${DM_SECRET} -a ${ADMIN_SECRET} --auto-forwarders" - fi -} - -make_update() -{ - local IPV4=`fetch_local_ipv4` - local TTL=600 - cat << NSUPDATE -gsstsig -prereq yxdomain primary.ipa.test -update del primary.ipa.test -send - -gsstsig -update add primary.ipa.test ${TTL} IN A ${IPV4} -send -NSUPDATE -} - -rlJournalStart - rlPhaseStartSetup - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "TestDir=`pwd`" 0 "Saving test directory" - rlRun "pushd $TmpDir" - echo ===============MEMINFO=================================== - cat /proc/meminfo - echo ______________________________________________________________ - rlPhaseEnd - - rlPhaseStartSetup "Prepare IPA" - rlFileBackup /etc/hosts - echo '' > /etc/hosts - prepareIpaServer - rpm -qa | grep bind > pkgs - rlLog "`cat pkgs`" - rlPhaseEnd - - rlPhaseStartTest - for i in `seq 5 10`;do - rlRun "ipactl restart" - sleep $i - #rhel8 mask named service. Also named restart is probably not needed. - uname -a | grep 'el8' || rlRun "systemctl restart named.service" - sleep $i - done - rlPhaseEnd - - rlPhaseStartTest - rlRun "kinit -kt /etc/krb5.keytab" 0 "Login machine into kerberos" - rlRun "klist" 0 "Ensure some ticket is there" - rlRun "make_update > update" - #rlRun "/usr/bin/nsupdate -g -d update" - echo "===============DEBUG" - echo "file update\n----------" - cat update - echo "nsupdate -g -d update\n---------" - /usr/bin/nsupdate -g -d update - echo "=============== END of DEBUG" - rlRun "host -t SOA $DOMAIN localhost" 0 "Check localhost service is running" - rlRun "host -t NS $DOMAIN localhost" 0 "Check localhost nameservers work" - rlRun "host -t SOA $DOMAIN" 0 "Check default resolver reaches local domain" - rlRun "host -t NS $DOMAIN" 0 "Check default resolver reaches local nameserver" - - rlPhaseEnd - - rlPhaseStartCleanup - rlFileSubmit /var/log/ipaserver-install.log - grep LAST1000_ipaserver-install.log - tail -n1000 /var/log/ipaserver-install.log - grep _______________end - ipa-server-install --uninstall --unattended - killall named - rlFileRestore - systemctl daemon-reload - rlServiceStop named - systemctl stop named - pkill -9 named - killall -9 named - rlRun "rm -f $rlRun_LOG" - rlRun "popd" - rlRun "hostname ${ORIG_HOSTNAME}" - rlRun "hostnamectl hostname ${ORIG_HOSTNAME}" 0-255 - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd - diff --git a/Stub/master-and-stub-server-talks-a-bit/Makefile b/Stub/master-and-stub-server-talks-a-bit/Makefile deleted file mode 100644 index 27bf75c..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/bind/Stub/master-and-stub-server-talks-a-bit -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE petr.god.zone named.conf.MASTER named.conf.STUB - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: sanity testing of stub server" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 10m" >> $(METADATA) - @echo "RunFor: bind" >> $(METADATA) - @echo "Requires: bind bind-utils" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/Stub/master-and-stub-server-talks-a-bit/PURPOSE b/Stub/master-and-stub-server-talks-a-bit/PURPOSE deleted file mode 100644 index 93fc47c..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/PURPOSE +++ /dev/null @@ -1 +0,0 @@ -Author: Petr Sklenar diff --git a/Stub/master-and-stub-server-talks-a-bit/main.fmf b/Stub/master-and-stub-server-talks-a-bit/main.fmf deleted file mode 100644 index 883a780..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/main.fmf +++ /dev/null @@ -1,27 +0,0 @@ -summary: sanity testing of stub server -description: '' -contact: Petr Sklenar -test: ./runtest.sh -framework: beakerlib -recommend: [] -duration: 10m -enabled: true -tag: - - NoRHEL4 - - NoRHEL5 - - TIPfail_infra - - TIPpass -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1291185 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1227189 -adjust+: - - enabled: false - when: distro == rhel-4, rhel-5 - continue: false - - enabled: false - when: arch == ppc64le - continue: false -extra-nitrate: TC#0518539 -extra-summary: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit -extra-task: /CoreOS/bind/Stub/master-and-stub-server-talks-a-bit -id: 7ac90330-6225-4a37-85ae-3fb8af6e71cc diff --git a/Stub/master-and-stub-server-talks-a-bit/named.conf.MASTER b/Stub/master-and-stub-server-talks-a-bit/named.conf.MASTER deleted file mode 100644 index b6b36de..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/named.conf.MASTER +++ /dev/null @@ -1,21 +0,0 @@ -options { - listen-on port 53 { - 127.0.0.1; - }; - directory "/tmp/bind-for-petr"; - version "unknown"; - recursion no; - allow-query { - any; - }; - dnssec-validation no; -}; - -zone "." { - type hint; - file "/dev/null"; -}; -zone "petr.god." IN { - type master; - file "petr.god.zone"; -}; diff --git a/Stub/master-and-stub-server-talks-a-bit/named.conf.STUB b/Stub/master-and-stub-server-talks-a-bit/named.conf.STUB deleted file mode 100644 index 9de8354..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/named.conf.STUB +++ /dev/null @@ -1,26 +0,0 @@ -options { - listen-on port 51 { - 127.0.0.1; - }; - version "unknown"; - notify-source 127.0.0.1; - transfer-source 127.0.0.1; - recursion yes; - directory "/tmp/bind-for-petr"; - allow-query { any; }; - - dnssec-validation no; -}; - -zone "." IN { - type hint; - //file "named.ca"; - file "/dev/null"; -}; -zone "petr.god." IN { - - type stub; - file "petr.god.zone-named2"; - masters { 127.0.0.1 port 53; }; - //delegation-only yes; -}; diff --git a/Stub/master-and-stub-server-talks-a-bit/petr.god.zone b/Stub/master-and-stub-server-talks-a-bit/petr.god.zone deleted file mode 100644 index f2a0861..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/petr.god.zone +++ /dev/null @@ -1,16 +0,0 @@ -$ORIGIN petr.god. -$TTL 86400 -@ IN SOA dns.petr.god. hostmaster.petr.god. ( - 100 ; serial - 21600 ; - 3600 ; - 604800 ; - 86400 ) ; - - IN NS dns.petr.god. -dns IN A 127.0.0.1 -mail IN CNAME dns -petr.god. IN TXT "v=spf1 +ip4:192.168.122.0/24 -all" -test1 IN A 192.168.122.2 -test2 IN A 192.168.122.3 -test3 IN A 192.168.122.212 diff --git a/Stub/master-and-stub-server-talks-a-bit/runtest.sh b/Stub/master-and-stub-server-talks-a-bit/runtest.sh deleted file mode 100755 index b3dc85b..0000000 --- a/Stub/master-and-stub-server-talks-a-bit/runtest.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of example.com.zone Makefile named.conf.MASTER named.conf.STUB PURPOSE runtest.sh -# Description: sanity testing of stub server -# Author: Petr Sklenar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -: ${PACKAGE:="bind"} - -rlJournalStart - rlPhaseStartSetup "base setup" - rlAssertRpm $PACKAGE - rlLog "PACKAGE=`echo $PACKAGE`" - rlLog "packages" - rlLog "`rpm -qa | grep bind`" - dir='/tmp/bind-for-petr' - rm -rf $dir - mkdir -p $dir - killall named - systemctl stop named - cp petr.god.zone $dir - cp named.conf.MASTER $dir/named.conf.MASTER - cp named.conf.STUB $dir/named.conf.STUB - chmod a+rw -R $dir - rlRun "named -u named -fg -d10 -c $dir/named.conf.MASTER &>/$dir/named.conf.MASTER.log &" 0 "named on port 53" - rlRun "named -u named -fg -d10 -c $dir/named.conf.STUB &>/$dir/named.conf.STUB.log &" 0 "named on port 51" - rlPhaseEnd - - - - rlPhaseStartTest 'petr.god' - rlRun "dig +short @127.0.0.1 -p 51 petr.god ds" - rlRun "dig @127.0.0.1 -p 51 test1.petr.god +short | grep '192.168.122'" - rlRun "dig @127.0.0.1 -p 51 dns.petr.god +short | grep '127'" - rlPhaseEnd -sleep 1 - rlPhaseStartTest "debug logs" - lines=`cat /$dir/named.conf.MASTER.log | wc -l` - rlAssertGreater "log should be short" 1000 $lines - lines=`cat /$dir/named.conf.MASTER.log|wc -l` - rlAssertGreater "log shold be short" 1000 $lines - rlRun "grep -v 'Werror=' /$dir/named.conf.MASTER.log | grep -i error" 1 - rlAssertGreater 'no more then one known' 3 `grep error //tmp/bind-for-petr/named.conf.STUB.log | wc -l` - rlAssertGreater "only few known err" 7 `grep -i fail //tmp/bind-for-petr/named.conf.*.log | wc -l` - rlPhaseEnd - - rlPhaseStartCleanup - rlFileSubmit /$dir/named.conf.MASTER.log - rlFileSubmit /$dir/named.conf.STUB.log - rm -rf $dir - killall named - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..6cddfeb --- /dev/null +++ b/dead.package @@ -0,0 +1,2 @@ +All tests were moved to CentOS Stream gitlab.com: +https://gitlab.com/redhat/centos-stream/tests/bind diff --git a/main.fmf b/main.fmf deleted file mode 100644 index e89125e..0000000 --- a/main.fmf +++ /dev/null @@ -1,29 +0,0 @@ -# QE owner -contact: Petr Sklenar -adjust: - - require+: - - bind - - bind-utils - environment+: - PACKAGE: bind - when: component == bind - - require+: - - bind9-next - - bind9-next-utils - environment+: - PACKAGE: bind9-next - when: component == bind9-next - - require+: - - bind9.16 - - bind9.16-utils - environment+: - PACKAGE: bind9.16 - when: component == bind9.16 - - require+: - - bind9.18 - - bind9.18-utils - environment+: - PACKAGE: bind9.18 - when: component == bind9.18 -check: - - how: avc diff --git a/plans/bind/ci.fmf b/plans/bind/ci.fmf deleted file mode 100644 index d646b66..0000000 --- a/plans/bind/ci.fmf +++ /dev/null @@ -1,8 +0,0 @@ -summary: CI plan, picks up all tests, runs in beakerlib. -discover: - - name: fedora - how: fmf -execute: - how: tmt -context: - component: bind diff --git a/plans/bind/morecpu.fmf b/plans/bind/morecpu.fmf deleted file mode 100644 index 24a0150..0000000 --- a/plans/bind/morecpu.fmf +++ /dev/null @@ -1,23 +0,0 @@ -context: - component: bind -environment: - PACKAGE: bind - -/tagmorecpu: - summary: tests with more MEM and CPU - discover: - - name: public - how: fmf - filter: 'tag: morecpu' - url: "https://src.fedoraproject.org/tests/bind.git" - - name: internal - how: fmf - filter: 'tag: morecpu' - url: https://gitlab.com/redhat/rhel/tests/bind - provision: - hardware: - memory: ">= 4 GB" - cpu: - processors: ">= 6" - execute: - how: tmt diff --git a/plans/bind/others.fmf b/plans/bind/others.fmf deleted file mode 100644 index b869b00..0000000 --- a/plans/bind/others.fmf +++ /dev/null @@ -1,31 +0,0 @@ -/public: - summary: Public other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -moremem' - url: "https://src.fedoraproject.org/tests/bind.git" - provision: - hardware: - memory: ">= 4 GB" - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind - -/internal: - summary: Internal other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -moremem' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind diff --git a/plans/bind/tier1.fmf b/plans/bind/tier1.fmf deleted file mode 100644 index c254834..0000000 --- a/plans/bind/tier1.fmf +++ /dev/null @@ -1,28 +0,0 @@ -/public: - summary: Public Tier1 tests - discover: - how: fmf - filter: 'tier: 1' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind - -/internal: - summary: Internal Tier1 tests - discover: - how: fmf - filter: 'tier: 1' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind diff --git a/plans/bind/tier2-tier3.fmf b/plans/bind/tier2-tier3.fmf deleted file mode 100644 index fc6b05f..0000000 --- a/plans/bind/tier2-tier3.fmf +++ /dev/null @@ -1,28 +0,0 @@ -/public: - summary: Public Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 | tier: 3' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind - -/internal: - summary: Internal Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 | tier: 3' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind - environment+: - PACKAGE: bind diff --git a/plans/bind9.16/morecpu.fmf b/plans/bind9.16/morecpu.fmf deleted file mode 100644 index dca2833..0000000 --- a/plans/bind9.16/morecpu.fmf +++ /dev/null @@ -1,23 +0,0 @@ -context: - component: bind9.16 -environment: - PACKAGE: bind9.16 - -/tagmorecpu: - summary: tests with more MEM and CPU - discover: - - name: public - how: fmf - filter: 'tag: morecpu' - url: "https://src.fedoraproject.org/tests/bind.git" - - name: internal - how: fmf - filter: 'tag: morecpu' - url: https://gitlab.com/redhat/rhel/tests/bind - provision: - hardware: - memory: ">= 4 GB" - cpu: - processors: ">= 6" - execute: - how: tmt diff --git a/plans/bind9.16/others.fmf b/plans/bind9.16/others.fmf deleted file mode 100644 index 94fac3c..0000000 --- a/plans/bind9.16/others.fmf +++ /dev/null @@ -1,29 +0,0 @@ -/public: - summary: Public other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library & tag: -moremem' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind9.16 - environment+: - PACKAGE: bind9.16 - - -/internal: - summary: Internal other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library & tag: -moremem' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind9.16 - environment+: - PACKAGE: bind9.16 diff --git a/plans/bind9.16/tier1.fmf b/plans/bind9.16/tier1.fmf deleted file mode 100644 index 838e1ac..0000000 --- a/plans/bind9.16/tier1.fmf +++ /dev/null @@ -1,28 +0,0 @@ -/public: - summary: Public Tier1 tests - discover: - how: fmf - filter: 'tier: 1 & tag: -library' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind9.16 - environment+: - PACKAGE: bind9.16 - -/internal: - summary: Internal Tier1 tests - discover: - how: fmf - filter: 'tier: 1 & tag: -library' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind9.16 - environment+: - PACKAGE: bind9.16 diff --git a/plans/bind9.16/tier2-tier3.fmf b/plans/bind9.16/tier2-tier3.fmf deleted file mode 100644 index 3a3342b..0000000 --- a/plans/bind9.16/tier2-tier3.fmf +++ /dev/null @@ -1,28 +0,0 @@ -/public: - summary: Public Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind9.16 - environment+: - PACKAGE: bind9.16 - -/internal: - summary: Internal Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind9.16 - environment+: - PACKAGE: bind9.16 diff --git a/plans/bind9.18/morecpu.fmf b/plans/bind9.18/morecpu.fmf deleted file mode 100644 index e753077..0000000 --- a/plans/bind9.18/morecpu.fmf +++ /dev/null @@ -1,23 +0,0 @@ -context: - component: bind9.18 -environment: - PACKAGE: bind9.18 - -/tagmorecpu: - summary: tests with more MEM and CPU - discover: - - name: public - how: fmf - filter: 'tag: morecpu' - url: "https://src.fedoraproject.org/tests/bind.git" - - name: internal - how: fmf - filter: 'tag: morecpu' - url: https://gitlab.com/redhat/rhel/tests/bind - provision: - hardware: - memory: ">= 4 GB" - cpu: - processors: ">= 6" - execute: - how: tmt diff --git a/plans/bind9.18/others.fmf b/plans/bind9.18/others.fmf deleted file mode 100644 index 33815b8..0000000 --- a/plans/bind9.18/others.fmf +++ /dev/null @@ -1,30 +0,0 @@ -context: - component: bind9.18 -environment: - PACKAGE: bind9.18 - -/public: - summary: Public other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library & tag: -moremem' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - -/internal: - summary: Internal other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -library & tag: -moremem' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - #context+: - # component+: bind9.18 - #environment+: - # PACKAGE: bind9.18 - diff --git a/plans/bind9.18/tier1.fmf b/plans/bind9.18/tier1.fmf deleted file mode 100644 index f300adb..0000000 --- a/plans/bind9.18/tier1.fmf +++ /dev/null @@ -1,28 +0,0 @@ -/public: - summary: Public Tier1 tests - discover: - how: fmf - filter: 'tier: 1 & tag: -library' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind9.18 - environment: - PACKAGE: bind9.18 - -/internal: - summary: Internal Tier1 tests - discover: - how: fmf - filter: 'tier: 1 & tag: -library' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind9.18 - environment: - PACKAGE: bind9.18 diff --git a/plans/bind9.18/tier2-tier3.fmf b/plans/bind9.18/tier2-tier3.fmf deleted file mode 100644 index 7692249..0000000 --- a/plans/bind9.18/tier2-tier3.fmf +++ /dev/null @@ -1,28 +0,0 @@ -/public: - summary: Public Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - context: - component: bind9.18 - environment+: - PACKAGE: bind9.18 - -/internal: - summary: Internal Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 & tag: -library | tier: 3 & tag: -library' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - context: - component: bind9.18 - environment+: - PACKAGE: bind9.18 diff --git a/plans/ci.fmf b/plans/ci.fmf deleted file mode 100644 index d646b66..0000000 --- a/plans/ci.fmf +++ /dev/null @@ -1,8 +0,0 @@ -summary: CI plan, picks up all tests, runs in beakerlib. -discover: - - name: fedora - how: fmf -execute: - how: tmt -context: - component: bind diff --git a/plans/others.fmf b/plans/others.fmf deleted file mode 100644 index 30ac53b..0000000 --- a/plans/others.fmf +++ /dev/null @@ -1,23 +0,0 @@ -/public: - summary: Public other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -moremem' - url: "https://src.fedoraproject.org/tests/bind.git" - provision: - hardware: - memory: ">= 4 GB" - execute: - how: tmt - -/internal: - summary: Internal other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost & tag: -moremem' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt diff --git a/plans/tier1.fmf b/plans/tier1.fmf deleted file mode 100644 index 2ac2ed2..0000000 --- a/plans/tier1.fmf +++ /dev/null @@ -1,20 +0,0 @@ -/public: - summary: Public Tier1 tests - discover: - how: fmf - filter: 'tier: 1' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - -/internal: - summary: Internal Tier1 tests - discover: - how: fmf - filter: 'tier: 1' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt diff --git a/plans/tier2-tier3.fmf b/plans/tier2-tier3.fmf deleted file mode 100644 index 74d7b07..0000000 --- a/plans/tier2-tier3.fmf +++ /dev/null @@ -1,20 +0,0 @@ -/public: - summary: Public Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 | tier: 3' - url: "https://src.fedoraproject.org/tests/bind.git" - execute: - how: tmt - -/internal: - summary: Internal Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 | tier: 3' - url: https://gitlab.com/redhat/rhel/tests/bind - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt