#4 Adding test + updating main.fmf of old tests
Merged 2 years ago by fhrdina. Opened 2 years ago by fhrdina.
tests/ fhrdina/frr main  into  main

@@ -0,0 +1,54 @@ 

+ # 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=no

+ ospfd=yes

+ ospfd_instances=1,2

+ 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"

@@ -0,0 +1,26 @@ 

+ summary: Test for BZ#1979426 (FRR Unable to configure OSPF in multi-instance)

+ description: |

+     Bug summary: FRR: Unable to configure OSPF  in multi-instance mode

+     Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1979426

+ contact: FrantiĊĦek Hrdina <fhrdina@redhat.com>

+ component:

+   - frr

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+   - frr

+ duration: 15m

+ enabled: true

+ tag:

+   - Tier1

+   - customer_scenario

+ tier: '1'

+ link:

+   - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1979426

+ adjust:

+   - 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

+ extra-task: /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance

@@ -0,0 +1,72 @@ 

+ #!/bin/bash

+ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance

+ #   Description: Test for BZ#1979426 (FRR Unable to configure OSPF in multi-instance)

+ #   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 daemons /etc/frr/daemons" 0 "Placing frr daemon file"

+         rlServiceStart "frr"

+         sleep 5

+         rlRun "vtysh -c \"conf t\" -c \"router ospf 1\" -c \"ospf router-id 1.2.3.4\"" 0 "Setting up router ospf 1 instance"

+         rlRun "vtysh -c \"conf t\" -c \"router ospf 2\" -c \"ospf router-id 5.6.7.8\"" 0 "Setting up router ospf 2 instance"

+         rlRun "vtysh -c \"write file\"" 0 "Saving router configuration into file"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest "Testing running configuration of router"

+         rlRun "vtysh -c \"sh ru\" | grep \"router ospf 1\"" 0 "Router ospf 1 in running configuration of router"

+         rlRun "vtysh -c \"sh ru\" | grep \"router-id 1.2.3.4\"" 0 "Router-id of ospf 1 in running configuration of router"

+         rlRun "vtysh -c \"sh ru\" | grep \"router ospf 2\"" 0 "Router ospf 2 in running configuration of router"

+         rlRun "vtysh -c \"sh ru\" | grep \"router-id 5.6.7.8\"" 0 "Router-id of ospf 2 in running configuration of router"    

+     rlPhaseEnd

+ 

+     rlPhaseStartTest "Testing saved configuration of router"

+         if rlIsRHEL '>=9' || rlIsFedora; then

+             ospf1_config="frr.conf"

+             ospf2_config=$ospf1_config

+         else

+             ospf1_config="ospfd-1.conf"

+             ospf2_config="ospfd-2.conf"

+         fi

+         

+         rlRun "cat /etc/frr/$ospf1_config | grep \"router ospf 1\"" 0 "Router ospf 1 in saved configuration of router"

+         rlRun "cat /etc/frr/$ospf1_config | grep \"router-id 1.2.3.4\"" 0 "Router-id of ospf 1 in saved configuration of router"

+         rlRun "cat /etc/frr/$ospf2_config | grep \"router ospf 2\"" 0 "Router ospf 2 in saved configuration of router"

+         rlRun "cat /etc/frr/$ospf2_config |  grep \"router-id 5.6.7.8\"" 0 "Router-id of ospf 2 in saved configuration of router"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlServiceRestore "frr"

+         rlRun "rlFileRestore" 0 "Restoring original config files"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

file modified
+2 -5
@@ -10,16 +10,13 @@ 

  duration: 5m

  enabled: true

  tag:

- - NoRHEL4

- - NoRHEL5

- - TIPfail

  - Tier1

  tier: '1'

  link:

  -   relates: https://bugzilla.redhat.com/show_bug.cgi?id=1776342

  adjust:

- -   enabled: false

-     when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-alt-7

+   - enabled: false

+     when: distro < rhel-8

      continue: false

  extra-nitrate: TC#0600616

  extra-summary: /CoreOS/frr/Sanity/initscript

@@ -0,0 +1,83 @@ 

+ # 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=yes

+ ospf6d=yes

+ ripd=yes

+ ripngd=yes

+ isisd=yes

+ pimd=yes

+ nhrpd=yes

+ eigrpd=yes

+ sharpd=yes

+ pbrd=yes

+ bfdd=yes

+ fabricd=yes

+ vrrpd=yes

+ pathd=yes

+ 

+ #

+ # 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"

+ pathd_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.

@@ -0,0 +1,21 @@ 

+ summary: The test enables frr daemons and checks, if they are run.

+ description: ''

+ contact: FrantiĊĦek Hrdina <fhrdina@redhat.com>

+ component:

+   - frr

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+   - frr

+ duration: 15m

+ enabled: true

+ tag:

+   - Tier1

+ tier: '1'

+ adjust:

+   - enabled: false

+     when: distro < rhel-8

+     continue: false

+ extra-nitrate: TC#0611431

+ extra-summary: /CoreOS/frr/Sanity/starting-daemons-test

+ extra-task: /CoreOS/frr/Sanity/starting-daemons-test

@@ -0,0 +1,63 @@ 

+ #!/bin/bash

+ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /CoreOS/frr/Sanity/starting-daemons-test

+ #   Description: The test enables frr daemons and checks, if they are run.

+ #   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"

+ SERVICE_LOG="frr.log"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

+         rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files"

+         rlRun "cp daemons /etc/frr/daemons" 0 "Placing frr daemons file"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         if rlIsRHEL '>9' || rlIsFedora; 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"

+         fi

+         rlRun "service frr start" 0 "Starting frr service"

+         sleep 10

+         rlRun "service frr status &> $SERVICE_LOG" 0 "Creating service log"

+         rlRun "grep -i \"frr/watchfrr -d -F traditional $daemons\" $SERVICE_LOG" 0 "Checking if watchfrr is running"

+ 

+         for i in $daemons; do

+             rlRun "grep -i \"frr/$i -d -F traditional -A\" $SERVICE_LOG" 0 "Checking if $i daemon started"

+         done;

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "rm -f $SERVICE_LOG" 0 "Removing service log $SERVICE_LOG"

+         rlRun "service frr stop" 0 "Stopping frr service"

+         rlRun "rlFileRestore" 0 "Restoring original config files"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -1,7 +1,8 @@ 

  summary: It sets extcommunity and then list it

  description: ''

  contact: fhrdina@redhat.com

- component: []

+ component:

+   - frr

  test: ./runtest.sh

  framework: beakerlib

  recommend:
@@ -9,14 +10,11 @@ 

  duration: 25m

  enabled: true

  tag:

-   - NoRHEL4

-   - NoRHEL5

-   - TIPfail

    - Tier1

  tier: '1'

  adjust:

    - enabled: false

-     when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-alt-7

+     when: distro < rhel-8

      continue: false

  extra-nitrate: TC#0600617

  extra-summary: /CoreOS/frr/Sanity/vtysh/extcommunity-list