From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 40F7AA0C53; Tue, 10 Aug 2021 08:31:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 041634117E; Tue, 10 Aug 2021 08:31:05 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 6A2134068E for ; Tue, 10 Aug 2021 08:31:01 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10070"; a="202024275" X-IronPort-AV: E=Sophos;i="5.84,309,1620716400"; d="scan'208";a="202024275" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2021 23:31:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,309,1620716400"; d="scan'208";a="671561643" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga006.fm.intel.com with ESMTP; 09 Aug 2021 23:31:00 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 9 Aug 2021 23:30:59 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Tue, 10 Aug 2021 14:30:51 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.010; Tue, 10 Aug 2021 14:30:51 +0800 From: "Tu, Lijuan" To: "Chen, LingliX" , "dts@dpdk.org" CC: "Chen, LingliX" , "Lin, Xueqin" Thread-Topic: [dts] [PATCH V1] tests/generic_flow_api: add two test cases Thread-Index: AQHXhQ2yFRiAloENQUSGwzk/0bqy6atsVr8Q Date: Tue, 10 Aug 2021 06:30:51 +0000 Message-ID: <10dfa56804c04ffead8eb6bb164563da@intel.com> References: <20210730151031.27163-1-linglix.chen@intel.com> In-Reply-To: <20210730151031.27163-1-linglix.chen@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/generic_flow_api: add two test cases X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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" > -----Original Message----- > From: dts On Behalf Of Lingli Chen > Sent: 2021=1B$BG/=1B(B7=1B$B7n=1B(B30=1B$BF|=1B(B 23:11 > To: dts@dpdk.org > Cc: Chen, LingliX > Subject: [dts] [PATCH V1] tests/generic_flow_api: add two test cases >=20 > add new i40e test cases. 1, the 2 cases are i40e specific, but I do not see any verification based o= n NIC type, furthermore, checklist should be updated too. 2, no any exception management. If exception happened, testpmd didn't quit = as expected, it absolutely will impact other cases. 3, test plan and test cases should be coupled in the same series. >=20 > Signed-off-by: Lingli Chen > --- > tests/TestSuite_generic_flow_api.py | 54 +++++++++++++++++++++++++++++ > 1 file changed, 54 insertions(+) >=20 > diff --git a/tests/TestSuite_generic_flow_api.py > b/tests/TestSuite_generic_flow_api.py > index b97b49f2..546e63a7 100644 > --- a/tests/TestSuite_generic_flow_api.py > +++ b/tests/TestSuite_generic_flow_api.py > @@ -2487,6 +2487,60 @@ class TestGeneric_flow_api(TestCase): > flag =3D 0 > self.verify(flag, "The packet index %d and %d hash values ar= e same, > rss_granularity_config failed!" %(result_rows[3][0],result_rows[4][0])) >=20 > + def test_create_same_rule_after_destroy(self): > + > + self.pmdout.start_testpmd("%s" % self.cores, "--disable-rss --r= xq=3D%d -- > txq=3D%d" % (MAX_QUEUE+1, MAX_QUEUE+1)) > + self.dut.send_expect("set fwd rxonly", "testpmd> ", 120) > + self.dut.send_expect("set verbose 1", "testpmd> ", 120) > + self.dut.send_expect("start", "testpmd> ", 120) > + time.sleep(2) > + > + self.dut.send_expect( > + "flow create 0 ingress pattern eth / ipv4 / udp src is 32 /= end actions > queue index 2 / end", "created") > + > + out =3D self.dut.send_expect("flow destroy 0 rule 0", "testpmd>= ") > + p =3D re.compile(r"Flow rule #(\d+) destroyed") > + m =3D p.search(out) > + self.verify(m, "flow rule 0 delete failed" ) > + > + self.dut.send_expect( > + "flow create 0 ingress pattern eth / ipv4 / udp src is 32 /= end actions > queue index 2 / end", "created") > + > + self.sendpkt(pktstr=3D'Ether(dst=3D"%s")/IP()/UDP(sport=3D32)/R= aw("x" * 20)' % > self.pf_mac) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"2= ", > verify_mac=3Dself.pf_mac) > + self.sendpkt(pktstr=3D'Ether(dst=3D"%s")/IP()/UDP(dport=3D32)/R= aw("x" * 20)' % > self.pf_mac) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0= ", > verify_mac=3Dself.pf_mac) > + > + self.dut.send_expect("quit", "# ") > + time.sleep(2) > + > + def test_create_different_rule_after_destroy(self): > + > + self.pmdout.start_testpmd("%s" % self.cores, "--disable-rss --r= xq=3D%d -- > txq=3D%d" % (MAX_QUEUE+1, MAX_QUEUE+1)) > + self.dut.send_expect("set fwd rxonly", "testpmd> ", 120) > + self.dut.send_expect("set verbose 1", "testpmd> ", 120) > + self.dut.send_expect("start", "testpmd> ", 120) > + time.sleep(2) > + > + self.dut.send_expect( > + "flow create 0 ingress pattern eth / ipv4 / udp src is 32 /= end actions > queue index 2 / end", "created") > + > + out =3D self.dut.send_expect("flow destroy 0 rule 0", "testpmd>= ") > + p =3D re.compile(r"Flow rule #(\d+) destroyed") > + m =3D p.search(out) > + self.verify(m, "flow rule 0 delete failed" ) > + > + self.dut.send_expect( > + "flow create 0 ingress pattern eth / ipv4 / udp dst is 32 /= end actions > queue index 2 / end", "created") > + > + self.sendpkt(pktstr=3D'Ether(dst=3D"%s")/IP()/UDP(dport=3D32)/R= aw("x" * 20)' % > self.pf_mac) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"2= ", > verify_mac=3Dself.pf_mac) > + self.sendpkt(pktstr=3D'Ether(dst=3D"%s")/IP()/UDP(sport=3D32)/R= aw("x" * 20)' % > self.pf_mac) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0= ", > verify_mac=3Dself.pf_mac) > + > + self.dut.send_expect("quit", "# ") > + time.sleep(2) > + > def tear_down(self): > """ > Run after each test case. > -- > 2.17.1