diff --git a/Sanity/ifconfig-inaccurately-rounds-exabytes/data b/Sanity/ifconfig-inaccurately-rounds-exabytes/data new file mode 100644 index 0000000..c91f3d7 --- /dev/null +++ b/Sanity/ifconfig-inaccurately-rounds-exabytes/data @@ -0,0 +1,6 @@ +431640404764:401.9 GiB +1125899906842624:1024.0 TiB +1125899906842625:1.0 PiB +2154408931384050514:1.8 EiB +9223372036854775807:8.0 EiB +9999999999999999999999999999992154408931384050514:16.0 EiB diff --git a/Sanity/ifconfig-inaccurately-rounds-exabytes/dev b/Sanity/ifconfig-inaccurately-rounds-exabytes/dev new file mode 100644 index 0000000..cfb7bba --- /dev/null +++ b/Sanity/ifconfig-inaccurately-rounds-exabytes/dev @@ -0,0 +1,3 @@ +Inter-| Receive | Transmit + face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed + lo: XXX 690 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/Sanity/ifconfig-inaccurately-rounds-exabytes/main.fmf b/Sanity/ifconfig-inaccurately-rounds-exabytes/main.fmf new file mode 100644 index 0000000..91d5f4b --- /dev/null +++ b/Sanity/ifconfig-inaccurately-rounds-exabytes/main.fmf @@ -0,0 +1,28 @@ +summary: Test for BZ#1177980 (ifconfig inaccurately rounds exabytes) +description: | + Bug summary: ifconfig inaccurately rounds exabytes + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1177980 +enabled: true +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1177980 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1592732 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1414765 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1392910 +tag: + - Tier1 +tier: '1' +adjust: + - enabled: false + when: distro < rhel-6 + continue: false +contact: fhrdina@redhat.com +component: + - net-tools +test: ./runtest.sh +framework: beakerlib +recommend: + - net-tools +duration: 20m +extra-nitrate: TC#0539000 +extra-summary: /CoreOS/net-tools/Sanity/ifconfig-inaccurately-rounds-exabytes +extra-task: /CoreOS/net-tools/Sanity/ifconfig-inaccurately-rounds-exabytes diff --git a/Sanity/ifconfig-inaccurately-rounds-exabytes/runtest.sh b/Sanity/ifconfig-inaccurately-rounds-exabytes/runtest.sh new file mode 100755 index 0000000..159d110 --- /dev/null +++ b/Sanity/ifconfig-inaccurately-rounds-exabytes/runtest.sh @@ -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/ifconfig-inaccurately-rounds-exabytes +# Description: Test for BZ#1177980 (ifconfig inaccurately rounds exabytes) +# Author: Petr Sklenar +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2016 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="net-tools" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + chrootd=`mktemp -d` + rlIsFedora && rlRun "dnf -y --installroot=$chrootd --releasever=`rlGetDistroRelease` install net-tools" + rlIsFedora && dnf -y --installroot=$chrootd --releasever=rawhide upgrade net-tools --nogpg + rlIsRHEL && rlRun "yum -y --installroot=$chrootd install net-tools --nogpgcheck" + rlRun "mkdir $chrootd/proc/net -p" + rlPhaseEnd + + + rlPhaseStartTest + old="$IFS" + #IFS = delimiter: + IFS=' +' + for i in $( $chrootd/proc/net/dev + chroot $chrootd /bin/bash -c "ifconfig" | grep "$iB" + rlAssert0 "$iB" $? + chroot $chrootd /bin/bash -c "ifconfig" + echo =========== + done + IFS="$old" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm -r $chrootd" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd