Adding tests

/CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command
/CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option
/CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error
/CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp
This commit is contained in:
František Hrdina 2023-05-30 10:50:08 +02:00
commit 9294b72cca
16 changed files with 655 additions and 2 deletions

View file

@ -19,7 +19,10 @@ link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1979426
adjust:
- enabled: false
when: distro ~< rhel-8.6
when: distro < rhel-8
continue: false
- enabled: false
when: distro < rhel-8.6
continue: false
extra-nitrate: TC#0611598
extra-summary: /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance

View file

@ -0,0 +1,26 @@
summary: Test for BZ#1937423 (frr scriptlet fails line 15 hostname command not)
description: |
Bug summary: frr scriptlet fails: line 15: hostname: command not found
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1937423
contact: František Hrdina <fhrdina@redhat.com>
component:
- frr
test: ./runtest.sh
framework: beakerlib
recommend:
- frr
duration: 15m
enabled: true
tag:
- Tier3
tier: '3'
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1937423
adjust:
- enabled: false
when: distro < rhel-9
continue: false
extra-nitrate: TC#0611715
extra-summary: /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command
extra-task: /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command
id: 88887b40-49df-41a1-98b2-1362203b94ae

View file

@ -0,0 +1,45 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command
# Description: Test for BZ#1937423 (frr scriptlet fails line 15 hostname command not)
# Author: František Hrdina <fhrdina@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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="frr"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlPhaseEnd
rlPhaseStartTest
rlRun "rpm -q --requires frr | grep \"hostname\"" 0 "Check if hostname is dependency of frr"
rlPhaseEnd
rlPhaseStartCleanup
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,80 @@
# This file tells the frr package which daemons to start.
#
# Sample configurations for these daemons can be found in
# /usr/share/doc/frr/examples/.
#
# ATTENTION:
#
# When activating a daemon for the first time, a config file, even if it is
# empty, has to be present *and* be owned by the user and group "frr", else
# the daemon will not be started by /etc/init.d/frr. The permissions should
# be u=rw,g=r,o=.
# When using "vtysh" such a config file is also needed. It should be owned by
# group "frrvty" and set to ug=rw,o= though. Check /etc/pam.d/frr, too.
#
# The watchfrr and zebra daemons are always started.
#
bgpd=no
ospfd=yes
ospf6d=no
ripd=no
ripngd=no
isisd=no
pimd=no
ldpd=no
nhrpd=no
eigrpd=no
babeld=no
sharpd=no
pbrd=no
bfdd=no
fabricd=no
vrrpd=no
#
# If this option is set the /etc/init.d/frr script automatically loads
# the config via "vtysh -b" when the servers are started.
# Check /etc/pam.d/frr if you intend to use "vtysh"!
#
vtysh_enable=yes
zebra_options=" -A 127.0.0.1 -s 90000000"
bgpd_options=" -A 127.0.0.1"
ospfd_options=" -A 127.0.0.1"
ospf6d_options=" -A ::1"
ripd_options=" -A 127.0.0.1"
ripngd_options=" -A ::1"
isisd_options=" -A 127.0.0.1"
pimd_options=" -A 127.0.0.1"
ldpd_options=" -A 127.0.0.1"
nhrpd_options=" -A 127.0.0.1"
eigrpd_options=" -A 127.0.0.1"
babeld_options=" -A 127.0.0.1"
sharpd_options=" -A 127.0.0.1"
pbrd_options=" -A 127.0.0.1"
staticd_options="-A 127.0.0.1"
bfdd_options=" -A 127.0.0.1"
fabricd_options="-A 127.0.0.1"
vrrpd_options=" -A 127.0.0.1"
# configuration profile
#
#frr_profile="traditional"
#frr_profile="datacenter"
#
# This is the maximum number of FD's that will be available.
# Upon startup this is read by the control files and ulimit
# is called. Uncomment and use a reasonable value for your
# setup if you are expecting a large number of peers in
# say BGP.
#MAX_FDS=1024
# The list of daemons to watch is automatically generated by the init script.
#watchfrr_options=""
# for debugging purposes, you can specify a "wrap" command to start instead
# of starting the daemon directly, e.g. to use valgrind on ospfd:
# ospfd_wrap="/usr/bin/valgrind"
# or you can use "all_wrap" for all daemons, e.g. to use perf record:
# all_wrap="/usr/bin/perf record --call-graph -"
# the normal daemon command is added to this at the end.

View file

@ -0,0 +1,13 @@
hostname ROUTER1
password zebra
log file /var/log/frr/ospfd.log
!
!
router ospf
ospf router-id ROUTER_ID
network 10.0.0.0/8 area 0
network 192.168.101.0/24 area 1
network 192.168.201.0/24 area 2
ospf opaque-lsa
!
line vty

View file

@ -0,0 +1,26 @@
summary: Test for BZ#1997603 (ospfd not running with ospf opaque-lsa option)
description: |
Bug summary: ospfd not running with ospf opaque-lsa option used
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1997603
contact: František Hrdina <fhrdina@redhat.com>
component:
- frr
test: ./runtest.sh
framework: beakerlib
recommend:
- frr
duration: 15m
enabled: true
tag:
- Tier1
tier: '1'
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1997603
adjust:
- enabled: false
when: distro < rhel-8
continue: false
extra-nitrate: TC#0611420
extra-summary: /CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option
extra-task: /CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option
id: bd411aed-c312-4da5-b817-39ed63624153

View file

@ -0,0 +1,65 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option
# Description: Test for BZ#1997603 (ospfd not running with ospf opaque-lsa option)
# Author: František Hrdina <fhrdina@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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="frr"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "ip link add dummy1 type dummy" 0 "Adding dummy1 interface"
rlRun "ip address add 192.168.101.1/24 dev dummy1" 0 "Setting up dummy1 interface"
rlRun "ip link set dummy1 up" 0 "Bring up dummy1 interface"
rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files"
rlRun "cp -f daemons /etc/frr/daemons" 0 "Placing daemons configuration with ospfd enabled"
ROUTER_ID=$(hostname -I | awk '{print $1}')
rlRun "sed -i \"s/ROUTER_ID/$ROUTER_ID/g\" frr.conf" 0 "Setting ospf router id"
if rlIsRHEL '>=9' || rlIsFedora || rlIsCentOS '>=9'; then
rlRun "cp -f frr.conf /etc/frr/frr.conf" 0 "Placing frr.conf with ospf configuration"
else
rlRun "cp -f frr.conf /etc/frr/ospfd.conf" 0 "Placing ospf.conf with ospf configuration"
fi
rlPhaseEnd
rlPhaseStartTest
rlRun "systemctl start frr" 0 "Starting frr service"
sleep 41
rlRun "systemctl status frr | grep \"ospfd -d -F traditional -A 127.0.0.1\"" 0 "Check if ospfd is running"
rlRun "vtysh -c 'show ip ospf database' |& grep \"ospfd is not running\"" 1 "Test if showing ip ospf database not fail"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "systemctl stop frr" 0 "Stopping frr service"
rlRun "ip link del dummy1 type dummy" 0 "Removing dummy1 interface"
rlRun "rlFileRestore" 0 "Restoring original config files"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,81 @@
# This file tells the frr package which daemons to start.
#
# Sample configurations for these daemons can be found in
# /usr/share/doc/frr/examples/.
#
# ATTENTION:
#
# When activating a daemon for the first time, a config file, even if it is
# empty, has to be present *and* be owned by the user and group "frr", else
# the daemon will not be started by /etc/init.d/frr. The permissions should
# be u=rw,g=r,o=.
# When using "vtysh" such a config file is also needed. It should be owned by
# group "frrvty" and set to ug=rw,o= though. Check /etc/pam.d/frr, too.
#
# The watchfrr, zebra and staticd daemons are always started.
#
bgpd=yes
ospfd=no
ospf6d=no
ripd=no
ripngd=no
isisd=no
pimd=no
nhrpd=no
eigrpd=no
sharpd=no
pbrd=no
bfdd=yes
fabricd=no
vrrpd=no
#
# If this option is set the /etc/init.d/frr script automatically loads
# the config via "vtysh -b" when the servers are started.
# Check /etc/pam.d/frr if you intend to use "vtysh"!
#
vtysh_enable=yes
zebra_options=" -A 127.0.0.1 -s 90000000"
bgpd_options=" -A 127.0.0.1"
ospfd_options=" -A 127.0.0.1"
ospf6d_options=" -A ::1"
ripd_options=" -A 127.0.0.1"
ripngd_options=" -A ::1"
isisd_options=" -A 127.0.0.1"
pimd_options=" -A 127.0.0.1"
nhrpd_options=" -A 127.0.0.1"
eigrpd_options=" -A 127.0.0.1"
sharpd_options=" -A 127.0.0.1"
pbrd_options=" -A 127.0.0.1"
staticd_options="-A 127.0.0.1"
bfdd_options=" -A 127.0.0.1"
fabricd_options="-A 127.0.0.1"
vrrpd_options=" -A 127.0.0.1"
# configuration profile
#
#frr_profile="traditional"
#frr_profile="datacenter"
#
# This is the maximum number of FD's that will be available.
# Upon startup this is read by the control files and ulimit
# is called. Uncomment and use a reasonable value for your
# setup if you are expecting a large number of peers in
# say BGP.
#MAX_FDS=1024
# The list of daemons to watch is automatically generated by the init script.
#watchfrr_options=""
# To make watchfrr create/join the specified netns, use the following option:
#watchfrr_options="--netns"
# This only has an effect in /etc/frr/<somename>/daemons, and you need to
# start FRR with "/usr/lib/frr/frrinit.sh start <somename>".
# for debugging purposes, you can specify a "wrap" command to start instead
# of starting the daemon directly, e.g. to use valgrind on ospfd:
# ospfd_wrap="/usr/bin/valgrind"
# or you can use "all_wrap" for all daemons, e.g. to use perf record:
# all_wrap="/usr/bin/perf record --call-graph -"
# the normal daemon command is added to this at the end.

View file

@ -0,0 +1,28 @@
summary: Test for BZ#2029958 (FRR reloader generating invalid BFD)
description: |
Bug summary: FRR reloader generating invalid BFD configurations, exits with error
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2029958
contact: František Hrdina <fhrdina@redhat.com>
component:
- frr
test: ./runtest.sh
framework: beakerlib
recommend:
- frr
duration: 15m
enabled: true
tag:
- Tier1
tier: '1'
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2029958
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2031076
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2031077
adjust:
- enabled: false
when: distro < rhel-8
continue: false
extra-nitrate: TC#0612674
extra-summary: /CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error
extra-task: /CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error
id: d0fcbecb-b200-4448-a468-da5104f31f30

View file

@ -0,0 +1,35 @@
frr version 7.5
frr defaults traditional
hostname new.localdomain
service integrated-vtysh-config
!
router bgp 64512
bgp router-id 10.10.10.0
no bgp ebgp-requires-policy
no bgp default ipv4-unicast
no bgp network import-check
neighbor 192.168.111.1 remote-as 64512
neighbor 192.168.111.1 bfd profile echo
neighbor 192.168.111.1 password ibgp-test
neighbor 192.168.111.1 timers 30 90
!
address-family ipv4 unicast
neighbor 192.168.111.1 activate
exit-address-family
!
address-family ipv6 unicast
neighbor 192.168.111.1 activate
exit-address-family
!
line vty
!
bfd
profile echo
transmit-interval 81
receive-interval 80
echo-mode
echo-interval 82
minimum-ttl 254
!
!
end

View file

@ -0,0 +1,62 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error
# Description: Test for BZ#2029958 (FRR reloader generating invalid BFD)
# Author: František Hrdina <fhrdina@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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="frr"
rlJournalStart
rlPhaseStartSetup
TestDir=$(pwd)
rlAssertRpm $PACKAGE
rlRun "rlFileBackup --clean /etc/frr" 0 "Backuping current configuration"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "cp -f $TestDir/daemons /etc/frr/daemons" 0 "Placing daemons"
rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf"
rlServiceStart "frr"
sleep 5
if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8.7'; then
DIR="libexec"
else
DIR="lib"
fi
rlRun "/usr/$DIR/frr/frr-reload.py --overwrite --reload $TestDir/new-frr.conf &> frr-reload.log"
rlPhaseEnd
rlPhaseStartCleanup
rlServiceRestore "frr"
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlRun "rlFileRestore" 0 "Restoring original config files"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,81 @@
# This file tells the frr package which daemons to start.
#
# Sample configurations for these daemons can be found in
# /usr/share/doc/frr/examples/.
#
# ATTENTION:
#
# When activating a daemon for the first time, a config file, even if it is
# empty, has to be present *and* be owned by the user and group "frr", else
# the daemon will not be started by /etc/init.d/frr. The permissions should
# be u=rw,g=r,o=.
# When using "vtysh" such a config file is also needed. It should be owned by
# group "frrvty" and set to ug=rw,o= though. Check /etc/pam.d/frr, too.
#
# The watchfrr, zebra and staticd daemons are always started.
#
bgpd=yes
ospfd=no
ospf6d=no
ripd=no
ripngd=no
isisd=no
pimd=no
nhrpd=no
eigrpd=no
sharpd=no
pbrd=no
bfdd=no
fabricd=no
vrrpd=no
#
# If this option is set the /etc/init.d/frr script automatically loads
# the config via "vtysh -b" when the servers are started.
# Check /etc/pam.d/frr if you intend to use "vtysh"!
#
vtysh_enable=yes
zebra_options=" -A 127.0.0.1 -s 90000000"
bgpd_options=" -A 127.0.0.1"
ospfd_options=" -A 127.0.0.1"
ospf6d_options=" -A ::1"
ripd_options=" -A 127.0.0.1"
ripngd_options=" -A ::1"
isisd_options=" -A 127.0.0.1"
pimd_options=" -A 127.0.0.1"
nhrpd_options=" -A 127.0.0.1"
eigrpd_options=" -A 127.0.0.1"
sharpd_options=" -A 127.0.0.1"
pbrd_options=" -A 127.0.0.1"
staticd_options="-A 127.0.0.1"
bfdd_options=" -A 127.0.0.1"
fabricd_options="-A 127.0.0.1"
vrrpd_options=" -A 127.0.0.1"
# configuration profile
#
#frr_profile="traditional"
#frr_profile="datacenter"
#
# This is the maximum number of FD's that will be available.
# Upon startup this is read by the control files and ulimit
# is called. Uncomment and use a reasonable value for your
# setup if you are expecting a large number of peers in
# say BGP.
#MAX_FDS=1024
# The list of daemons to watch is automatically generated by the init script.
#watchfrr_options=""
# To make watchfrr create/join the specified netns, use the following option:
#watchfrr_options="--netns"
# This only has an effect in /etc/frr/<somename>/daemons, and you need to
# start FRR with "/usr/lib/frr/frrinit.sh start <somename>".
# for debugging purposes, you can specify a "wrap" command to start instead
# of starting the daemon directly, e.g. to use valgrind on ospfd:
# ospfd_wrap="/usr/bin/valgrind"
# or you can use "all_wrap" for all daemons, e.g. to use perf record:
# all_wrap="/usr/bin/perf record --call-graph -"
# the normal daemon command is added to this at the end.

View file

@ -0,0 +1,26 @@
hostname ctrl-3-0
log file /var/log/frr/frr.log debugging
service integrated-vtysh-config
line vty
router bgp 64999
bgp log-neighbor-changes
bgp graceful-shutdown
neighbor uplink peer-group
neighbor uplink remote-as internal
neighbor uplink bfd
neighbor uplink ttl-security hops 1
neighbor enp2s0 interface peer-group uplink
neighbor enp3s0 interface peer-group uplink
address-family ipv4 unicast
redistribute connected
neighbor uplink allowas-in origin
exit-address-family
address-family ipv6 unicast
redistribute connected
neighbor uplink activate
neighbor uplink allowas-in origin
exit-address-family

View file

@ -0,0 +1,26 @@
summary: Test for BZ#1917269 (vtysh running-config output not showing bgp)
description: |
Bug summary: vtysh running-config output not showing bgp ttl-security hops option
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1917269
contact: František Hrdina <fhrdina@redhat.com>
component:
- frr
test: ./runtest.sh
framework: beakerlib
recommend:
- frr
duration: 15m
enabled: true
tag:
- Tier2
tier: '2'
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1917269
adjust:
- enabled: false
when: distro < rhel-8
continue: false
extra-nitrate: TC#0611713
extra-summary: /CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp
extra-task: /CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp
id: bd0f6afa-1eaf-412b-9ad5-84664af133ff

View file

@ -0,0 +1,56 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp
# Description: Test for BZ#1917269 (vtysh running-config output not showing bgp)
# Author: František Hrdina <fhrdina@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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="frr"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files"
rlRun "cp frr.conf /etc/frr/frr.conf" 0 "Placing frr.conf file"
rlRun "cp daemons /etc/frr/daemons" 0 "Placing daemons file"
rlServiceStart "frr"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "vtysh -c \"sh ru\" | grep \"neighbor uplink ttl-security hops 1\"" 0 "Testing if configuration is in running config"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlServiceRestore "frr"
rlRun "rlFileRestore" 0 "Restoring original config files"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -39,7 +39,7 @@ rlJournalStart
rlPhaseEnd
rlPhaseStartTest
if rlIsRHEL '>9' || rlIsFedora; then
if rlIsRHEL '>9' || rlIsFedora || rlIsCentOS '>9'; then
daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd pathd"
else
daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd"