From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 124A1A31F3 for ; Sat, 19 Oct 2019 18:56:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DBFB51BEA3; Sat, 19 Oct 2019 18:56:42 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 42A59324D for ; Sat, 19 Oct 2019 18:56:41 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9JGtHcP021310 for ; Sat, 19 Oct 2019 09:56:40 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=+9f5NZTDoHXs41+PIKWyUOzcMMQN4SYqIeTkH1S9/LI=; b=Qybv1X2bHEntncfDA+blRXs8urLB55BmAxZIz4BIVi4gt09DUJ4S6/5D/+Y2lqoiLV0d H6NeuIKqF5H4ZVEMJ0i3y7UknwZKtP2x73rm9ESDLkSq3n7XCSfJc0VxOaznnySCf+Me McTOHQYZzbO+RcNOml1MHNRALtpBzDcmRU23H6wuZgool/nHzaVSaLNI/TvDplRE81E1 t2aX5SZZNG2mtJMHo/AFcLK7Mk6O5vMnvg4DMjfat3D96efzWcJR3Ss6z6Kxlw7UZnRZ NRRtaPZGlQsBiXyMzFFZ/0nZNHs3B0Q6+3+lkX3RaJSidq8TAoPowUtp2ri/Njgezw+o Kg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2vr20mgmjj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sat, 19 Oct 2019 09:56:40 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sat, 19 Oct 2019 09:56:38 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Sat, 19 Oct 2019 09:56:38 -0700 Received: from phanendra-system.marvell.com (unknown [10.28.11.20]) by maili.marvell.com (Postfix) with ESMTP id 3DC013F703F; Sat, 19 Oct 2019 09:56:37 -0700 (PDT) From: To: CC: , , Phanendra Vukkisala Date: Sat, 19 Oct 2019 22:26:28 +0530 Message-ID: <1571504188-29749-1-git-send-email-pvukkisala@marvell.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-19_04:2019-10-18,2019-10-19 signatures=0 Subject: [dts] [PATCH] shutdown_api: support vector mode to this test X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" From: Phanendra Vukkisala Vector mode needs multiple of 4 packets Make sure link is up at end of tests(even test fails) to avoid further tests failure Signed-off-by: Phanendra Vukkisala --- tests/TestSuite_shutdown_api.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py index 32bb765..d7f070f 100644 --- a/tests/TestSuite_shutdown_api.py +++ b/tests/TestSuite_shutdown_api.py @@ -116,7 +116,7 @@ class TestShutdownApi(TestCase): pkg = 'Ether(src="%s", dst="%s")/IP()/Raw(load="P" * %d)' % (smac, dmac, padding) self.tester.scapy_foreground() - self.tester.scapy_append('sendp(%s, iface="%s")' % (pkg, itf)) + self.tester.scapy_append('sendp(%s, iface="%s", count=4)' % (pkg, itf)) self.tester.scapy_execute() time.sleep(3) @@ -131,8 +131,8 @@ class TestShutdownApi(TestCase): p1rx_pkts -= gp1rx_pkts p1rx_bytes -= gp1rx_bytes - rx_bytes_exp = pktSize - tx_bytes_exp = pktSize + rx_bytes_exp = pktSize*4 + tx_bytes_exp = pktSize*4 if self.kdriver == "fm10k": # RRC will always strip rx/tx crc @@ -144,11 +144,11 @@ class TestShutdownApi(TestCase): tx_bytes_exp -= 4 else: # some NIC will always include tx crc - rx_bytes_exp -= 4 - tx_bytes_exp -= 4 + rx_bytes_exp -= 16 + tx_bytes_exp -= 16 if vlan_strip is True: # vlan strip default is off - tx_bytes_exp -= 4 + tx_bytes_exp -= 16 # fortville nic enable send lldp packet function when port setup # now the tx-packets size is lldp_size(110) * n + forward packe size @@ -548,6 +548,16 @@ class TestShutdownApi(TestCase): Run after each test case. """ self.dut.kill_all() + self.pmdout.start_testpmd("Default", "--portmask=%s --port-topology=loop" % utils.create_mask(self.ports), socket=self.ports_socket) + ports_num = len(self.ports) + # link up test, to avoid failing further tests if link was down + for i in range(ports_num): + ## sometimes output text messingup testpmd prompt so trimmed prompt + self.dut.send_expect("set link-up port %d" % i, ">") + # start ports, to avodi failing further tests if ports are stoped + self.dut.send_expect("port start all", "testpmd> ", 100) + self.dut.send_expect("quit", "# ") + def tear_down_all(self): """ -- 1.7.9.5