Date: Fri, 18 Sep 2020 07:27:01 +0000 (UTC) From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365874 - in head/tests/sys: netinet netinet6 Message-ID: <202009180727.08I7R1SH085183@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: melifaro Date: Fri Sep 18 07:27:01 2020 New Revision: 365874 URL: https://svnweb.freebsd.org/changeset/base/365874 Log: Use atf_fail instead of exit 1 to indicate mpath tests failure. Modified: head/tests/sys/netinet/output.sh head/tests/sys/netinet6/output6.sh Modified: head/tests/sys/netinet/output.sh ============================================================================== --- head/tests/sys/netinet/output.sh Fri Sep 18 05:54:59 2020 (r365873) +++ head/tests/sys/netinet/output.sh Fri Sep 18 07:27:01 2020 (r365874) @@ -339,11 +339,10 @@ output_tcp_flowid_mpath_success_body() pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'` pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'` if [ ${pkt_0} -le 10 ]; then - echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" - exit 1 + atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" fi if [ ${pkt_1} -le 10 ]; then - echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" + atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" exit 1 fi echo "TCP Balancing: 1: ${pkt_0} 2: ${pkt_1}" @@ -468,12 +467,10 @@ output_udp_flowid_mpath_success_body() pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'` pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'` if [ ${pkt_0} -le 10 ]; then - echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" - exit 1 + atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" fi if [ ${pkt_1} -le 10 ]; then - echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" - exit 1 + atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" fi echo "UDP BALANCING: 1: ${pkt_0} 2: ${pkt_1}" } @@ -561,12 +558,10 @@ output_raw_flowid_mpath_success_body() jexec ${jname}a netstat -bWf link -I ${epair0}a jexec ${jname}a netstat -bWf link -I ${epair1}a if [ ${pkt_0} -le 10 ]; then - echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" - exit 1 + atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" fi if [ ${pkt_1} -le 10 ]; then - echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" - exit 1 + atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" fi echo "RAW BALANCING: 1: ${pkt_0} 2: ${pkt_1}" } Modified: head/tests/sys/netinet6/output6.sh ============================================================================== --- head/tests/sys/netinet6/output6.sh Fri Sep 18 05:54:59 2020 (r365873) +++ head/tests/sys/netinet6/output6.sh Fri Sep 18 07:27:01 2020 (r365874) @@ -376,12 +376,10 @@ output6_tcp_flowid_mpath_success_body() pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'` pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'` if [ ${pkt_0} -le 10 ]; then - echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" - exit 1 + atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" fi if [ ${pkt_1} -le 10 ]; then - echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" - exit 1 + atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" fi echo "TCP Balancing: 1: ${pkt_0} 2: ${pkt_1}" } @@ -519,12 +517,10 @@ output6_udp_flowid_mpath_success_body() pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'` pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'` if [ ${pkt_0} -le 10 ]; then - echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" - exit 1 + atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" fi if [ ${pkt_1} -le 10 ]; then - echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" - exit 1 + atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" fi echo "UDP BALANCING: 1: ${pkt_0} 2: ${pkt_1}" } @@ -628,12 +624,10 @@ output6_raw_flowid_mpath_success_body() jexec ${jname}a netstat -bWf link -I ${epair0}a jexec ${jname}a netstat -bWf link -I ${epair1}a if [ ${pkt_0} -le 10 ]; then - echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" - exit 1 + atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" fi if [ ${pkt_1} -le 10 ]; then - echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" - exit 1 + atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" fi echo "RAW BALANCING: 1: ${pkt_0} 2: ${pkt_1}" }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009180727.08I7R1SH085183>