Adds tests according to the CI
justification
Adds tests according to the CI wiki specifically the standard test interface in the spec.
The playbook includes Tier1 level test cases that have been tested in the following contexts and
is passing reliably: Classic. Test logs are stored in the artifacts directory.
The following steps are used to execute the tests using the standard test interface:
Test enveronment
Make sure you have installed packages from the spec
```
ansible-2.4.1.0-2.fc28.noarch
python2-dnf-2.7.5-1.fc28.noarch
libselinux-python-2.7-2.fc28.x86_64
standard-test-roles-2.5-1.fc28.noarch
Run tests for Classic
```
Snip of the example test run for Classic tests:
```
test_ipset_add_bitmap_ip (__main__.IpsetTests) ... 192.168.11.12 is in set testnet.
192.168.11.13 is in set testnet.
192.168.11.14 is in set testnet.
192.168.11.15 is in set testnet.
ok
test_ipset_bitmap_ip_netfilter (__main__.IpsetTests) ... 192.168.225.32 is in set testnetiperf.
192.168.225.33 is in set testnetiperf.
Connecting to host 192.168.225.32, port 55555
[ 5] local 192.168.225.32 port 54652 connected to 192.168.225.32 port 55555
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 7.79 GBytes 66.9 Gbits/sec 0 895 KBytes
[ 5] 1.00-2.00 sec 7.99 GBytes 68.6 Gbits/sec 0 895 KBytes
[ 5] 2.00-3.00 sec 7.99 GBytes 68.6 Gbits/sec 0 1.75 MBytes
[ 5] 3.00-4.00 sec 7.79 GBytes 66.9 Gbits/sec 0 1.75 MBytes
[ 5] 4.00-5.00 sec 8.03 GBytes 69.0 Gbits/sec 0 1.75 MBytes
[ 5] 5.00-6.00 sec 7.94 GBytes 68.2 Gbits/sec 0 2.25 MBytes
[ 5] 6.00-7.00 sec 7.88 GBytes 67.7 Gbits/sec 0 2.25 MBytes
[ 5] 7.00-8.00 sec 8.06 GBytes 69.2 Gbits/sec 0 2.25 MBytes
[ 5] 8.00-9.00 sec 7.89 GBytes 67.8 Gbits/sec 0 2.25 MBytes
[ 5] 9.00-10.00 sec 7.85 GBytes 67.4 Gbits/sec 0 2.25 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 79.2 GBytes 68.0 Gbits/sec 0 sender
[ 5] 0.00-10.04 sec 79.2 GBytes 67.8 Gbits/sec receiver
iperf Done.
iperf3: error - unable to connect to server: Connection timed out
ok
test_ipset_delete_bitmap_ip (__main__.IpsetTests) ... 192.168.11.12 is in set testnet.
192.168.11.13 is in set testnet.
192.168.11.12 is NOT in set testnet.
ok
test_ipset_hash_bitmap_ipport (__main__.IpsetTests) ... 192.168.1.1,udp:53 is in set testipport.
192.168.1.1,tcp:5555 is in set testipport.
192.168.1.1,tcp:5555 is NOT in set testipport.
ok
test_ipset_hash_bitmap_ipportip (__main__.IpsetTests) ... 192.168.1.1,tcp:80,10.0.0.1 is in set testipportip.
192.168.1.1,tcp:80,10.0.0.1 is in set testipportip.
192.168.1.1,tcp:80,10.0.0.1 is NOT in set testipportip.
ok
192.168.1.1,tcp:80,10.0.0.1 is NOT in set testipportip.
ok
test_ipset_hash_bitmap_mac (__main__.IpsetTests) ... 02:01:02:03:04:09 is in set testmac.
02:01:02:03:04:09 is NOT in set testmac.
ok
test_ipset_hash_bitmap_netiface (__main__.IpsetTests) ... 192.168.0.0/24,veth-test is in set testnetiface.
192.167.0.0/24,veth-peer is in set testnetiface.
192.168.0.0/24,veth-test is NOT in set testnetiface.
ok
----------------------------------------------------------------------
Ran 7 tests in 15.545s
OK
:: [ 16:37:57 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ipset-tests.py' (Expected 0, got 0)
:: [ 16:37:57 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ipset-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 15s
:: Duration: 15s
:: Assertions: 1 good, 0 bad
:: Assertions: 1 good, 0 bad
:: RESULT: PASS
:: RESULT: PASS
```
2018-06-24 11:08:43 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# SPDX-License-Identifier: LGPL-2.1+
|
|
|
|
# ~~~
|
|
|
|
# runtest.sh of ipset
|
|
|
|
# Description: ipset tests.
|
|
|
|
#
|
|
|
|
# Author: Susant Sahani <susant@redhat.com>
|
|
|
|
# Copyright (c) 2018 Red Hat, Inc.
|
|
|
|
# ~~~
|
|
|
|
|
|
|
|
# Include Beaker environment
|
|
|
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
|
|
|
|
|
|
PACKAGE="ipset"
|
|
|
|
|
|
|
|
SERVICE_UNITDIR="/var/run/systemd/system"
|
|
|
|
|
|
|
|
rlJournalStart
|
|
|
|
rlPhaseStartSetup
|
|
|
|
rlAssertRpm $PACKAGE
|
2024-09-03 12:44:57 +00:00
|
|
|
rlAssertRpm kernel-modules-extra-$(uname -r)
|
Adds tests according to the CI
justification
Adds tests according to the CI wiki specifically the standard test interface in the spec.
The playbook includes Tier1 level test cases that have been tested in the following contexts and
is passing reliably: Classic. Test logs are stored in the artifacts directory.
The following steps are used to execute the tests using the standard test interface:
Test enveronment
Make sure you have installed packages from the spec
```
ansible-2.4.1.0-2.fc28.noarch
python2-dnf-2.7.5-1.fc28.noarch
libselinux-python-2.7-2.fc28.x86_64
standard-test-roles-2.5-1.fc28.noarch
Run tests for Classic
```
Snip of the example test run for Classic tests:
```
test_ipset_add_bitmap_ip (__main__.IpsetTests) ... 192.168.11.12 is in set testnet.
192.168.11.13 is in set testnet.
192.168.11.14 is in set testnet.
192.168.11.15 is in set testnet.
ok
test_ipset_bitmap_ip_netfilter (__main__.IpsetTests) ... 192.168.225.32 is in set testnetiperf.
192.168.225.33 is in set testnetiperf.
Connecting to host 192.168.225.32, port 55555
[ 5] local 192.168.225.32 port 54652 connected to 192.168.225.32 port 55555
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 7.79 GBytes 66.9 Gbits/sec 0 895 KBytes
[ 5] 1.00-2.00 sec 7.99 GBytes 68.6 Gbits/sec 0 895 KBytes
[ 5] 2.00-3.00 sec 7.99 GBytes 68.6 Gbits/sec 0 1.75 MBytes
[ 5] 3.00-4.00 sec 7.79 GBytes 66.9 Gbits/sec 0 1.75 MBytes
[ 5] 4.00-5.00 sec 8.03 GBytes 69.0 Gbits/sec 0 1.75 MBytes
[ 5] 5.00-6.00 sec 7.94 GBytes 68.2 Gbits/sec 0 2.25 MBytes
[ 5] 6.00-7.00 sec 7.88 GBytes 67.7 Gbits/sec 0 2.25 MBytes
[ 5] 7.00-8.00 sec 8.06 GBytes 69.2 Gbits/sec 0 2.25 MBytes
[ 5] 8.00-9.00 sec 7.89 GBytes 67.8 Gbits/sec 0 2.25 MBytes
[ 5] 9.00-10.00 sec 7.85 GBytes 67.4 Gbits/sec 0 2.25 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 79.2 GBytes 68.0 Gbits/sec 0 sender
[ 5] 0.00-10.04 sec 79.2 GBytes 67.8 Gbits/sec receiver
iperf Done.
iperf3: error - unable to connect to server: Connection timed out
ok
test_ipset_delete_bitmap_ip (__main__.IpsetTests) ... 192.168.11.12 is in set testnet.
192.168.11.13 is in set testnet.
192.168.11.12 is NOT in set testnet.
ok
test_ipset_hash_bitmap_ipport (__main__.IpsetTests) ... 192.168.1.1,udp:53 is in set testipport.
192.168.1.1,tcp:5555 is in set testipport.
192.168.1.1,tcp:5555 is NOT in set testipport.
ok
test_ipset_hash_bitmap_ipportip (__main__.IpsetTests) ... 192.168.1.1,tcp:80,10.0.0.1 is in set testipportip.
192.168.1.1,tcp:80,10.0.0.1 is in set testipportip.
192.168.1.1,tcp:80,10.0.0.1 is NOT in set testipportip.
ok
192.168.1.1,tcp:80,10.0.0.1 is NOT in set testipportip.
ok
test_ipset_hash_bitmap_mac (__main__.IpsetTests) ... 02:01:02:03:04:09 is in set testmac.
02:01:02:03:04:09 is NOT in set testmac.
ok
test_ipset_hash_bitmap_netiface (__main__.IpsetTests) ... 192.168.0.0/24,veth-test is in set testnetiface.
192.167.0.0/24,veth-peer is in set testnetiface.
192.168.0.0/24,veth-test is NOT in set testnetiface.
ok
----------------------------------------------------------------------
Ran 7 tests in 15.545s
OK
:: [ 16:37:57 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ipset-tests.py' (Expected 0, got 0)
:: [ 16:37:57 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ipset-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 15s
:: Duration: 15s
:: Assertions: 1 good, 0 bad
:: Assertions: 1 good, 0 bad
:: RESULT: PASS
:: RESULT: PASS
```
2018-06-24 11:08:43 +00:00
|
|
|
rlRun "systemctl stop firewalld" 0,5
|
|
|
|
|
|
|
|
rlRun "[ -e /sys/class/net/veth-test ] && ip link del veth-test" 0,1
|
|
|
|
|
|
|
|
rlRun "cp iperf3d.service $SERVICE_UNITDIR"
|
|
|
|
rlRun "systemctl daemon-reload"
|
2024-09-03 12:44:57 +00:00
|
|
|
|
|
|
|
rlRun "ip link add veth-test type veth peer name veth-peer"
|
|
|
|
rlRun "ip link set veth-test addr 02:01:02:03:04:08"
|
|
|
|
rlRun "ip link set veth-peer addr 02:01:02:03:04:09"
|
|
|
|
rlRun "ip addr add 192.168.225.32/24 dev veth-test"
|
|
|
|
rlRun "ip addr add 192.168.225.33/24 dev veth-peer"
|
|
|
|
rlRun "ip link set veth-test up"
|
|
|
|
rlRun "ip link set veth-peer up"
|
Adds tests according to the CI
justification
Adds tests according to the CI wiki specifically the standard test interface in the spec.
The playbook includes Tier1 level test cases that have been tested in the following contexts and
is passing reliably: Classic. Test logs are stored in the artifacts directory.
The following steps are used to execute the tests using the standard test interface:
Test enveronment
Make sure you have installed packages from the spec
```
ansible-2.4.1.0-2.fc28.noarch
python2-dnf-2.7.5-1.fc28.noarch
libselinux-python-2.7-2.fc28.x86_64
standard-test-roles-2.5-1.fc28.noarch
Run tests for Classic
```
Snip of the example test run for Classic tests:
```
test_ipset_add_bitmap_ip (__main__.IpsetTests) ... 192.168.11.12 is in set testnet.
192.168.11.13 is in set testnet.
192.168.11.14 is in set testnet.
192.168.11.15 is in set testnet.
ok
test_ipset_bitmap_ip_netfilter (__main__.IpsetTests) ... 192.168.225.32 is in set testnetiperf.
192.168.225.33 is in set testnetiperf.
Connecting to host 192.168.225.32, port 55555
[ 5] local 192.168.225.32 port 54652 connected to 192.168.225.32 port 55555
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 7.79 GBytes 66.9 Gbits/sec 0 895 KBytes
[ 5] 1.00-2.00 sec 7.99 GBytes 68.6 Gbits/sec 0 895 KBytes
[ 5] 2.00-3.00 sec 7.99 GBytes 68.6 Gbits/sec 0 1.75 MBytes
[ 5] 3.00-4.00 sec 7.79 GBytes 66.9 Gbits/sec 0 1.75 MBytes
[ 5] 4.00-5.00 sec 8.03 GBytes 69.0 Gbits/sec 0 1.75 MBytes
[ 5] 5.00-6.00 sec 7.94 GBytes 68.2 Gbits/sec 0 2.25 MBytes
[ 5] 6.00-7.00 sec 7.88 GBytes 67.7 Gbits/sec 0 2.25 MBytes
[ 5] 7.00-8.00 sec 8.06 GBytes 69.2 Gbits/sec 0 2.25 MBytes
[ 5] 8.00-9.00 sec 7.89 GBytes 67.8 Gbits/sec 0 2.25 MBytes
[ 5] 9.00-10.00 sec 7.85 GBytes 67.4 Gbits/sec 0 2.25 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 79.2 GBytes 68.0 Gbits/sec 0 sender
[ 5] 0.00-10.04 sec 79.2 GBytes 67.8 Gbits/sec receiver
iperf Done.
iperf3: error - unable to connect to server: Connection timed out
ok
test_ipset_delete_bitmap_ip (__main__.IpsetTests) ... 192.168.11.12 is in set testnet.
192.168.11.13 is in set testnet.
192.168.11.12 is NOT in set testnet.
ok
test_ipset_hash_bitmap_ipport (__main__.IpsetTests) ... 192.168.1.1,udp:53 is in set testipport.
192.168.1.1,tcp:5555 is in set testipport.
192.168.1.1,tcp:5555 is NOT in set testipport.
ok
test_ipset_hash_bitmap_ipportip (__main__.IpsetTests) ... 192.168.1.1,tcp:80,10.0.0.1 is in set testipportip.
192.168.1.1,tcp:80,10.0.0.1 is in set testipportip.
192.168.1.1,tcp:80,10.0.0.1 is NOT in set testipportip.
ok
192.168.1.1,tcp:80,10.0.0.1 is NOT in set testipportip.
ok
test_ipset_hash_bitmap_mac (__main__.IpsetTests) ... 02:01:02:03:04:09 is in set testmac.
02:01:02:03:04:09 is NOT in set testmac.
ok
test_ipset_hash_bitmap_netiface (__main__.IpsetTests) ... 192.168.0.0/24,veth-test is in set testnetiface.
192.167.0.0/24,veth-peer is in set testnetiface.
192.168.0.0/24,veth-test is NOT in set testnetiface.
ok
----------------------------------------------------------------------
Ran 7 tests in 15.545s
OK
:: [ 16:37:57 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ipset-tests.py' (Expected 0, got 0)
:: [ 16:37:57 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ipset-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 15s
:: Duration: 15s
:: Assertions: 1 good, 0 bad
:: Assertions: 1 good, 0 bad
:: RESULT: PASS
:: RESULT: PASS
```
2018-06-24 11:08:43 +00:00
|
|
|
rlPhaseEnd
|
|
|
|
|
2024-09-03 12:44:57 +00:00
|
|
|
rlPhaseStartTest "test_ipset_bitmap_ip_netfilter"
|
|
|
|
rlRun "ipset create testnetiperf hash:ip"
|
|
|
|
rlRun "ipset add testnetiperf 192.168.225.32"
|
|
|
|
rlRun "ipset add testnetiperf 192.168.225.33"
|
|
|
|
rlRun "ipset test testnetiperf 192.168.225.32"
|
|
|
|
rlRun "ipset test testnetiperf 192.168.225.33"
|
|
|
|
rlRun "systemctl start iperf3d.service"
|
|
|
|
sleep 1
|
|
|
|
rlRun "iperf3 -c 192.168.225.32 -p 55555 --connect-timeout 5"
|
|
|
|
rlRun "iptables -I INPUT -m set --match-set testnetiperf src -j DROP"
|
|
|
|
rlRun "iperf3 -c 192.168.225.32 -p 55555 --connect-timeout 5" 1
|
|
|
|
rlRun "systemctl stop iperf3d.service"
|
|
|
|
rlRun "iptables --delete INPUT -m set --match-set testnetiperf src -j DROP"
|
|
|
|
rlRun "ipset destroy testnetiperf"
|
|
|
|
rlPhaseEnd
|
|
|
|
|
|
|
|
rlPhaseStartTest "test_ipset_add_bitmap_ip"
|
|
|
|
rlRun "ipset create testnet hash:ip"
|
|
|
|
rlRun "ipset add testnet 192.168.11.12"
|
|
|
|
rlRun "ipset add testnet 192.168.11.13"
|
|
|
|
rlRun "ipset add testnet 192.168.11.14"
|
|
|
|
rlRun "ipset add testnet 192.168.11.15"
|
|
|
|
rlRun "ipset test testnet 192.168.11.12"
|
|
|
|
rlRun "ipset test testnet 192.168.11.13"
|
|
|
|
rlRun "ipset test testnet 192.168.11.14"
|
|
|
|
rlRun "ipset test testnet 192.168.11.15"
|
|
|
|
rlRun "ipset destroy testnet"
|
|
|
|
rlPhaseEnd
|
|
|
|
|
|
|
|
rlPhaseStartTest "test_ipset_delete_bitmap_ip"
|
|
|
|
rlRun "ipset create testnet hash:ip"
|
|
|
|
rlRun "ipset add testnet 192.168.11.12"
|
|
|
|
rlRun "ipset add testnet 192.168.11.13"
|
|
|
|
rlRun "ipset test testnet 192.168.11.12"
|
|
|
|
rlRun "ipset test testnet 192.168.11.13"
|
|
|
|
rlRun "ipset del testnet 192.168.11.12"
|
|
|
|
rlRun "ipset test testnet 192.168.11.12" 1
|
|
|
|
rlRun "ipset destroy testnet"
|
|
|
|
rlPhaseEnd
|
|
|
|
|
|
|
|
rlPhaseStartTest "test_ipset_hash_bitmap_mac"
|
|
|
|
rlRun "ipset create testmac hash:mac"
|
|
|
|
rlRun "ipset add testmac 02:01:02:03:04:09"
|
|
|
|
rlRun "ipset test testmac 02:01:02:03:04:09"
|
|
|
|
rlRun "ipset del testmac 02:01:02:03:04:09"
|
|
|
|
rlRun "ipset test testmac 02:01:02:03:04:09" 1
|
|
|
|
rlRun "ipset destroy testmac"
|
|
|
|
rlPhaseEnd
|
|
|
|
|
|
|
|
rlPhaseStartTest "test_ipset_hash_bitmap_ipport"
|
|
|
|
rlRun "ipset create testipport hash:ip,mac"
|
|
|
|
rlRun "ipset add testipport 1.1.1.1,02:01:02:03:04:09"
|
|
|
|
rlRun "ipset test testipport 1.1.1.1,02:01:02:03:04:09"
|
|
|
|
rlRun "ipset del testipport 1.1.1.1,02:01:02:03:04:09"
|
|
|
|
rlRun "ipset test testipport 1.1.1.1,02:01:02:03:04:09" 1
|
|
|
|
rlRun "ipset destroy testipport"
|
|
|
|
rlPhaseEnd
|
|
|
|
|
|
|
|
rlPhaseStartTest "test_ipset_hash_bitmap_ipport"
|
|
|
|
rlRun "ipset create testipport hash:ip,port"
|
|
|
|
rlRun "ipset add testipport 192.168.1.1,udp:53"
|
|
|
|
rlRun "ipset add testipport 192.168.1.1,5555"
|
|
|
|
rlRun "ipset test testipport 192.168.1.1,udp:53"
|
|
|
|
rlRun "ipset test testipport 192.168.1.1,5555"
|
|
|
|
rlRun "ipset del testipport 192.168.1.1,5555"
|
|
|
|
rlRun "ipset test testipport 192.168.1.1,5555" 1
|
|
|
|
rlRun "ipset destroy testipport"
|
|
|
|
rlPhaseEnd
|
|
|
|
|
|
|
|
rlPhaseStartTest "test_ipset_hash_bitmap_ipportip"
|
|
|
|
rlRun "ipset create testipportip hash:ip,port,ip"
|
|
|
|
rlRun "ipset add testipportip 192.168.1.1,80,10.0.0.1"
|
|
|
|
rlRun "ipset add testipportip 192.168.1.2,80,10.0.0.2"
|
|
|
|
rlRun "ipset test testipportip 192.168.1.1,80,10.0.0.1"
|
|
|
|
rlRun "ipset test testipportip 192.168.1.1,80,10.0.0.1"
|
|
|
|
rlRun "ipset del testipportip 192.168.1.1,80,10.0.0.1"
|
|
|
|
rlRun "ipset test testipportip 192.168.1.1,80,10.0.0.1" 1
|
|
|
|
rlRun "ipset destroy testipportip"
|
|
|
|
rlPhaseEnd
|
|
|
|
|
|
|
|
rlPhaseStartTest "test_ipset_hash_bitmap_netiface"
|
|
|
|
rlRun "ipset create testnetiface hash:net,iface"
|
|
|
|
rlRun "ipset add testnetiface 192.168.0/24,veth-test"
|
|
|
|
rlRun "ipset add testnetiface 192.167.0/24,veth-peer"
|
|
|
|
rlRun "ipset test testnetiface 192.168.0/24,veth-test"
|
|
|
|
rlRun "ipset test testnetiface 192.167.0/24,veth-peer"
|
|
|
|
rlRun "ipset del testnetiface 192.168.0/24,veth-test"
|
|
|
|
rlRun "ipset test testnetiface 192.168.0/24,veth-test" 1
|
|
|
|
rlRun "ipset destroy testnetiface"
|
Adds tests according to the CI
justification
Adds tests according to the CI wiki specifically the standard test interface in the spec.
The playbook includes Tier1 level test cases that have been tested in the following contexts and
is passing reliably: Classic. Test logs are stored in the artifacts directory.
The following steps are used to execute the tests using the standard test interface:
Test enveronment
Make sure you have installed packages from the spec
```
ansible-2.4.1.0-2.fc28.noarch
python2-dnf-2.7.5-1.fc28.noarch
libselinux-python-2.7-2.fc28.x86_64
standard-test-roles-2.5-1.fc28.noarch
Run tests for Classic
```
Snip of the example test run for Classic tests:
```
test_ipset_add_bitmap_ip (__main__.IpsetTests) ... 192.168.11.12 is in set testnet.
192.168.11.13 is in set testnet.
192.168.11.14 is in set testnet.
192.168.11.15 is in set testnet.
ok
test_ipset_bitmap_ip_netfilter (__main__.IpsetTests) ... 192.168.225.32 is in set testnetiperf.
192.168.225.33 is in set testnetiperf.
Connecting to host 192.168.225.32, port 55555
[ 5] local 192.168.225.32 port 54652 connected to 192.168.225.32 port 55555
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 7.79 GBytes 66.9 Gbits/sec 0 895 KBytes
[ 5] 1.00-2.00 sec 7.99 GBytes 68.6 Gbits/sec 0 895 KBytes
[ 5] 2.00-3.00 sec 7.99 GBytes 68.6 Gbits/sec 0 1.75 MBytes
[ 5] 3.00-4.00 sec 7.79 GBytes 66.9 Gbits/sec 0 1.75 MBytes
[ 5] 4.00-5.00 sec 8.03 GBytes 69.0 Gbits/sec 0 1.75 MBytes
[ 5] 5.00-6.00 sec 7.94 GBytes 68.2 Gbits/sec 0 2.25 MBytes
[ 5] 6.00-7.00 sec 7.88 GBytes 67.7 Gbits/sec 0 2.25 MBytes
[ 5] 7.00-8.00 sec 8.06 GBytes 69.2 Gbits/sec 0 2.25 MBytes
[ 5] 8.00-9.00 sec 7.89 GBytes 67.8 Gbits/sec 0 2.25 MBytes
[ 5] 9.00-10.00 sec 7.85 GBytes 67.4 Gbits/sec 0 2.25 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 79.2 GBytes 68.0 Gbits/sec 0 sender
[ 5] 0.00-10.04 sec 79.2 GBytes 67.8 Gbits/sec receiver
iperf Done.
iperf3: error - unable to connect to server: Connection timed out
ok
test_ipset_delete_bitmap_ip (__main__.IpsetTests) ... 192.168.11.12 is in set testnet.
192.168.11.13 is in set testnet.
192.168.11.12 is NOT in set testnet.
ok
test_ipset_hash_bitmap_ipport (__main__.IpsetTests) ... 192.168.1.1,udp:53 is in set testipport.
192.168.1.1,tcp:5555 is in set testipport.
192.168.1.1,tcp:5555 is NOT in set testipport.
ok
test_ipset_hash_bitmap_ipportip (__main__.IpsetTests) ... 192.168.1.1,tcp:80,10.0.0.1 is in set testipportip.
192.168.1.1,tcp:80,10.0.0.1 is in set testipportip.
192.168.1.1,tcp:80,10.0.0.1 is NOT in set testipportip.
ok
192.168.1.1,tcp:80,10.0.0.1 is NOT in set testipportip.
ok
test_ipset_hash_bitmap_mac (__main__.IpsetTests) ... 02:01:02:03:04:09 is in set testmac.
02:01:02:03:04:09 is NOT in set testmac.
ok
test_ipset_hash_bitmap_netiface (__main__.IpsetTests) ... 192.168.0.0/24,veth-test is in set testnetiface.
192.167.0.0/24,veth-peer is in set testnetiface.
192.168.0.0/24,veth-test is NOT in set testnetiface.
ok
----------------------------------------------------------------------
Ran 7 tests in 15.545s
OK
:: [ 16:37:57 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ipset-tests.py' (Expected 0, got 0)
:: [ 16:37:57 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ipset-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 15s
:: Duration: 15s
:: Assertions: 1 good, 0 bad
:: Assertions: 1 good, 0 bad
:: RESULT: PASS
:: RESULT: PASS
```
2018-06-24 11:08:43 +00:00
|
|
|
rlPhaseEnd
|
|
|
|
|
|
|
|
rlPhaseStartCleanup
|
2024-09-03 12:44:57 +00:00
|
|
|
rlRun "ip link del veth-test"
|
Adds tests according to the CI
justification
Adds tests according to the CI wiki specifically the standard test interface in the spec.
The playbook includes Tier1 level test cases that have been tested in the following contexts and
is passing reliably: Classic. Test logs are stored in the artifacts directory.
The following steps are used to execute the tests using the standard test interface:
Test enveronment
Make sure you have installed packages from the spec
```
ansible-2.4.1.0-2.fc28.noarch
python2-dnf-2.7.5-1.fc28.noarch
libselinux-python-2.7-2.fc28.x86_64
standard-test-roles-2.5-1.fc28.noarch
Run tests for Classic
```
Snip of the example test run for Classic tests:
```
test_ipset_add_bitmap_ip (__main__.IpsetTests) ... 192.168.11.12 is in set testnet.
192.168.11.13 is in set testnet.
192.168.11.14 is in set testnet.
192.168.11.15 is in set testnet.
ok
test_ipset_bitmap_ip_netfilter (__main__.IpsetTests) ... 192.168.225.32 is in set testnetiperf.
192.168.225.33 is in set testnetiperf.
Connecting to host 192.168.225.32, port 55555
[ 5] local 192.168.225.32 port 54652 connected to 192.168.225.32 port 55555
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 7.79 GBytes 66.9 Gbits/sec 0 895 KBytes
[ 5] 1.00-2.00 sec 7.99 GBytes 68.6 Gbits/sec 0 895 KBytes
[ 5] 2.00-3.00 sec 7.99 GBytes 68.6 Gbits/sec 0 1.75 MBytes
[ 5] 3.00-4.00 sec 7.79 GBytes 66.9 Gbits/sec 0 1.75 MBytes
[ 5] 4.00-5.00 sec 8.03 GBytes 69.0 Gbits/sec 0 1.75 MBytes
[ 5] 5.00-6.00 sec 7.94 GBytes 68.2 Gbits/sec 0 2.25 MBytes
[ 5] 6.00-7.00 sec 7.88 GBytes 67.7 Gbits/sec 0 2.25 MBytes
[ 5] 7.00-8.00 sec 8.06 GBytes 69.2 Gbits/sec 0 2.25 MBytes
[ 5] 8.00-9.00 sec 7.89 GBytes 67.8 Gbits/sec 0 2.25 MBytes
[ 5] 9.00-10.00 sec 7.85 GBytes 67.4 Gbits/sec 0 2.25 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 79.2 GBytes 68.0 Gbits/sec 0 sender
[ 5] 0.00-10.04 sec 79.2 GBytes 67.8 Gbits/sec receiver
iperf Done.
iperf3: error - unable to connect to server: Connection timed out
ok
test_ipset_delete_bitmap_ip (__main__.IpsetTests) ... 192.168.11.12 is in set testnet.
192.168.11.13 is in set testnet.
192.168.11.12 is NOT in set testnet.
ok
test_ipset_hash_bitmap_ipport (__main__.IpsetTests) ... 192.168.1.1,udp:53 is in set testipport.
192.168.1.1,tcp:5555 is in set testipport.
192.168.1.1,tcp:5555 is NOT in set testipport.
ok
test_ipset_hash_bitmap_ipportip (__main__.IpsetTests) ... 192.168.1.1,tcp:80,10.0.0.1 is in set testipportip.
192.168.1.1,tcp:80,10.0.0.1 is in set testipportip.
192.168.1.1,tcp:80,10.0.0.1 is NOT in set testipportip.
ok
192.168.1.1,tcp:80,10.0.0.1 is NOT in set testipportip.
ok
test_ipset_hash_bitmap_mac (__main__.IpsetTests) ... 02:01:02:03:04:09 is in set testmac.
02:01:02:03:04:09 is NOT in set testmac.
ok
test_ipset_hash_bitmap_netiface (__main__.IpsetTests) ... 192.168.0.0/24,veth-test is in set testnetiface.
192.167.0.0/24,veth-peer is in set testnetiface.
192.168.0.0/24,veth-test is NOT in set testnetiface.
ok
----------------------------------------------------------------------
Ran 7 tests in 15.545s
OK
:: [ 16:37:57 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ipset-tests.py' (Expected 0, got 0)
:: [ 16:37:57 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ipset-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 15s
:: Duration: 15s
:: Assertions: 1 good, 0 bad
:: Assertions: 1 good, 0 bad
:: RESULT: PASS
:: RESULT: PASS
```
2018-06-24 11:08:43 +00:00
|
|
|
|
|
|
|
rlRun "rm $SERVICE_UNITDIR/iperf3d.service"
|
|
|
|
rlRun "systemctl daemon-reload"
|
|
|
|
|
|
|
|
rlLog "ipset tests done"
|
|
|
|
rlPhaseEnd
|
|
|
|
rlJournalPrintText
|
|
|
|
rlJournalEnd
|
|
|
|
|
|
|
|
rlGetTestState
|