Remove empty search nonsense

Empty search does not make sense. It is invalid configuration, which
does not make sense. Just use 'search .' instead to disable searching.
This commit is contained in:
Petr Menšík 2021-03-01 23:30:03 +01:00
commit af29d76634
4 changed files with 0 additions and 180 deletions

View file

@ -1,64 +0,0 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz669163-empty-search-option-in-etc-resolv-conf-causes
# Description: bz669163-empty-search-option-in-etc-resolv-conf-causes
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2011 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/Regression/bz669163-empty-search-option-in-etc-resolv-conf-causes
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)
chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Martin Cermak <mcermak@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: bz669163-empty-search-option-in-etc-resolv-conf-causes" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 15m" >> $(METADATA)
@echo "RunFor: bind-utils" >> $(METADATA)
@echo "Requires: bind-utils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 669163" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -1,6 +0,0 @@
PURPOSE of /CoreOS/bind/Regression/bz669163-empty-search-option-in-etc-resolv-conf-causes
Description: bz669163-empty-search-option-in-etc-resolv-conf-causes
Author: Martin Cermak <mcermak@redhat.com>
Bug summary: empty "search" option in /etc/resolv.conf causes resolution failure
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=669163

View file

@ -1,22 +0,0 @@
summary: bz669163-empty-search-option-in-etc-resolv-conf-causes
description: |+
Bug summary: empty "search" option in /etc/resolv.conf causes resolution failure
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=669163
contact: Petr Sklenar <psklenar@redhat.com>
component: []
test: ./runtest.sh
require:
- bind-utils
duration: 15m
enabled: true
tag:
- TIP_fedora_pass
- TIPfail_infra
- TIPpass
- Tier1
- tip_destructive_el8
tier: '1'
extra-summary: /CoreOS/bind/Regression/bz669163-empty-search-option-in-etc-resolv-conf-causes
extra-task: /CoreOS/bind/Regression/bz669163-empty-search-option-in-etc-resolv-conf-causes
extra-nitrate: TC#0126561

View file

@ -1,88 +0,0 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz669163-empty-search-option-in-etc-resolv-conf-causes
# Description: bz669163-empty-search-option-in-etc-resolv-conf-causes
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2011 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.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. /usr/lib/beakerlib/beakerlib.sh
RESOLV="/etc/resolv.conf"
function testResolver() {
rlRun "host $NSFQDN"
rlRun "dig $NSFQDN +short"
}
rlJournalStart
rlPhaseStartSetup
rlAssertRpm "$( rpm -qf /usr/bin/dig )"
rlFileBackup --clean "$RESOLV"
# resolv.conf can be symlink to systemd-resolved for example.
# Normal backup would not work well
rlRun "cat /etc/resolv.conf" 0 "SHOW INITIAL RESOLVER SETTINGS"
# I'll rely on this:
if ping -c 1 ns1.redhat.com; then
rlRun "NSFQDN=ns1.redhat.com"
elif ping -c 1 ns2.redhat.com; then
rlRun "NSFQDN=ns2.redhat.com"
elif ping -c 1 ns3.redhat.com; then
rlRun "NSFQDN=ns3.redhat.com"
else
rlRun "false" 0 "No nameserver reachable"
fi
rlLog "ns: $NSFQDN"
rlRun "NSIP=$(dig +short $NSFQDN)"
rlRun "rm -f $RESOLV" 0 "Remove original $RESOLV"
rlLogInfo "Testcase 1"
cat > $RESOLV <<EOF
search
nameserver $NSIP
EOF
rlRun "cat $RESOLV"
testResolver
rlLogInfo "Testcase 2"
cat > $RESOLV <<EOF
search foo.com
nameserver $NSIP
EOF
rlRun "cat $RESOLV"
testResolver
rlLogInfo "Testcase 3"
cat > $RESOLV <<EOF
search
nameserver $NSIP
EOF
rlRun "cat $RESOLV"
testResolver
rlFileRestore
rlPhaseEnd
rlJournalEnd