Moving tests to fedora repo
/CoreOS/net-tools/Sanity/netstat-notrim-option /CoreOS/net-tools/Regression/bz234045-missing-causes-netstat-I-and-netstat
This commit is contained in:
parent
11f0beafa6
commit
575dd7a5e2
4 changed files with 159 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
summary: Test for BZ#234045 (missing '=' causes "netstat -I" and "netstat)
|
||||
description: |
|
||||
Bug summary: missing '=' causes "netstat -I" and "netstat --interfaces" to segfault
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=234045
|
||||
contact: fhrdina@redhat.com
|
||||
component:
|
||||
- net-tools
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- net-tools
|
||||
duration: 5m
|
||||
enabled: true
|
||||
tag:
|
||||
- Tier1
|
||||
tier: '1'
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=234045
|
||||
extra-nitrate: TC#0174619
|
||||
extra-summary: /CoreOS/net-tools/Regression/bz234045-missing-causes-netstat-I-and-netstat
|
||||
extra-task: /CoreOS/net-tools/Regression/bz234045-missing-causes-netstat-I-and-netstat
|
||||
48
Regression/bz234045-missing-causes-netstat-I-and-netstat/runtest.sh
Executable file
48
Regression/bz234045-missing-causes-netstat-I-and-netstat/runtest.sh
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/net-tools/Regression/bz234045-missing-causes-netstat-I-and-netstat
|
||||
# Description: Test for BZ#234045 (missing '=' causes "netstat -I" and "netstat)
|
||||
# Author: Alex Sersen <asersen@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2012 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.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="net-tools"
|
||||
|
||||
DEF_ETH=`ip route show | grep default | awk '{print $5}' | head -1`
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "netstat -i" 0
|
||||
rlRun "netstat -I" 0
|
||||
rlRun "netstat --interfaces=$DEF_ETH" 0
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
24
Sanity/netstat-notrim-option/main.fmf
Normal file
24
Sanity/netstat-notrim-option/main.fmf
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
summary: Test for bz732984 (netstat truncates IPV6 UDP sockets even with)
|
||||
description: |
|
||||
Bug summary: netstat truncates IPV6 UDP sockets even with --notrim specifed
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=732984
|
||||
contact: fhrdina@redhat.com
|
||||
component:
|
||||
- net-tools
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- net-tools
|
||||
- nmap-ncat
|
||||
- nc
|
||||
- iproute
|
||||
duration: 10m
|
||||
enabled: true
|
||||
tag:
|
||||
- Tier1
|
||||
tier: '1'
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=732984
|
||||
extra-nitrate: TC#0111106
|
||||
extra-summary: /CoreOS/net-tools/Sanity/netstat-notrim-option
|
||||
extra-task: /CoreOS/net-tools/Sanity/netstat-notrim-option
|
||||
66
Sanity/netstat-notrim-option/runtest.sh
Executable file
66
Sanity/netstat-notrim-option/runtest.sh
Executable file
|
|
@ -0,0 +1,66 @@
|
|||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/net-tools/Sanity/netstat-notrim-option
|
||||
# Description: Test for bz732984 (netstat truncates IPV6 UDP sockets even with)
|
||||
# Author: Ales Zelinka <azelinka@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.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="net-tools"
|
||||
def_PORT="15151"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartTest
|
||||
rlAssertRpm $PACKAGE
|
||||
#starting with rhel7 the option changed. feature, not a bug.
|
||||
if rlIsRHEL 5 6 ; then
|
||||
OPTION="T"
|
||||
else
|
||||
OPTION="W"
|
||||
fi
|
||||
|
||||
DEFAULT_IF=`ip r | grep default | awk '{print $5}' | head -1`
|
||||
IPV6_DEF_ADDR="$(ip a l dev $DEFAULT_IF | grep 'inet6 ' | grep -v 'scope link' | awk NR\=\=1 | sed 's/.* inet6 \s*\([^/]*\).*/\1/')"
|
||||
rlLog "DEFAULT_IF: \"$DEFAULT_IF\"" # default interface
|
||||
rlLog "IPV6_DEF_ADDR: \"$IPV6_DEF_ADDR\"" # first global IPv6 addr. of default interface
|
||||
|
||||
# run udp6 NC server on IPv6 address of default interface
|
||||
# to make sure there is at least 1 ipv6/udp server listening
|
||||
rlRun "nc -6ul $IPV6_DEF_ADDR $def_PORT &"
|
||||
sleep 10
|
||||
echo "######################## jobs ########################"; jobs # debug
|
||||
echo "#################### netstat -tulen ##################"; netstat -tulen # debug
|
||||
echo "#################### ss -tulen ##################"; ss -tulen # debug (netstat not showing new job on s390x sometimes - try "ss" also)
|
||||
|
||||
ip a l dev "$DEFAULT_IF" | grep 'inet6 ' | grep -v 'scope link' | sed 's/.* inet6 \s*\([^/]*\).*/\1/' | \
|
||||
while read ADDRESS ; do
|
||||
rlRun "netstat -A inet6 -an$OPTION |grep udp|grep $ADDRESS" 0 "netstat listed untrimmed address $ADDRESS"
|
||||
done
|
||||
rlLog "echo 'Why was it empty?'"
|
||||
pkill nc # kill nc server
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue