Hi!
> ---
>  testcases/network/iptables/iptables_tests.sh |   22 +++++++++++++++-------
>  1 file changed, 15 insertions(+), 7 deletions(-)
> 
> diff --git a/testcases/network/iptables/iptables_tests.sh 
> b/testcases/network/iptables/iptables_tests.sh
> index 028d54e..641f327 100755
> --- a/testcases/network/iptables/iptables_tests.sh
> +++ b/testcases/network/iptables/iptables_tests.sh
> @@ -165,13 +165,21 @@ test01()
>               return $RC
>       else
>               chaincnt=$(grep -c Chain $LTPTMP/tst_iptables.out)
> -             if [ $chaincnt -ne 3 ]; then
> -                     tst_res TFAIL $LTPTMP/tst_iptables.out \
> -                             "$TCID: $cmd failed to list rules. Reason:"
> -                     return $chaincnt
> -             else
> -                     tst_resm TINFO "$TCID: $cmd lists rules."
> -             fi
> +            # for debian or ubuntu
> +            if [ -f /etc/debian_version ]; then
> +                if [ $chaincnt -ne 4 ]; then
> +                    tst_res TFAIL $LTPTMP/tst_iptables.out \
> +                        "$TCID: $cmd failed to list rules. Reason:"
> +                        return $chaincnt
> +                fi
> +            else
> +                if [ $chaincnt -ne 3 ]; then
> +                    tst_res TFAIL $LTPTMP/tst_iptables.out \
> +                        "$TCID: $cmd failed to list rules. Reason:"
> +                        return $chaincnt
> +                fi
> +            fi
> +            tst_resm TINFO "$TCID: $cmd lists rules."
>       fi

It has four Chain lines on basically every new enough Linux. So let's
accept either 3 or 4 in the general case.

-- 
Cyril Hrubis
chru...@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to