From patchwork Mon Aug 15 14:00:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 115103 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 98ABBA034C; Mon, 15 Aug 2022 08:00:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 81D924021D; Mon, 15 Aug 2022 08:00:29 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 11E56400EF for ; Mon, 15 Aug 2022 08:00:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660543228; x=1692079228; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NH7VQlXJBhGsXOLb9UfG57ZEn6alIOioveKDpJzbG4w=; b=a4/OX0liO1MPnOvxHzxHhgfW+0jH57HENaF0mBD73vZKG6tHRc9GxTQ4 RFHHXfS5ER5ZMUJXYPMhl407MZHqk3s5ncRbcEqFrDm09t9M4ChfDSHOb htWJZB2L11uZIhgNwa3rMnmDyG1lCPEtehJGzzgWbDpBjy/mx488m/AIo HqFZY/ZNBZe9n1eWNCUeJsi9IBM+kNH7aeEKPbSiTbGLbUdvR9vumfX3t Ye/iIR7fxzByw0qnO2NEOwdTeANEyXiCwqVO1sbKn+aTTRGVtk9EqfwEy 9j8UUr2FVZ6M4a3TOLJasWG7Q8f8Dcfzn3tOeOmTnKWQqil8MxVuxQv0L w==; X-IronPort-AV: E=McAfee;i="6400,9594,10439"; a="272290079" X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="272290079" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2022 23:00:27 -0700 X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="666551206" Received: from unknown (HELO localhost.localdomain) ([10.239.252.20]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2022 23:00:26 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V1 2/5] tests/ice_switch_filter: optimize the rte_flow test process Date: Mon, 15 Aug 2022 14:00:32 +0000 Message-Id: <20220815140035.1186904-2-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220815140035.1186904-1-songx.jiale@intel.com> References: <20220815140035.1186904-1-songx.jiale@intel.com> MIME-Version: 1.0 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 1. synchronize test plans, lower log level. 2. optimization scripts, remove the method of reload ice. 3. optimize the rte_flow test process that the action is switch to queue. Signed-off-by: Jiale Song Acked-by: Peng, Yuan Signed-off-by: Jiale Song --- tests/TestSuite_ice_switch_filter.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tests/TestSuite_ice_switch_filter.py b/tests/TestSuite_ice_switch_filter.py index 76bd630f..f5f8ec1f 100644 --- a/tests/TestSuite_ice_switch_filter.py +++ b/tests/TestSuite_ice_switch_filter.py @@ -4279,16 +4279,14 @@ class ICESwitchFilterTest(TestCase): self.generate_file_with_fdir_rules() self.path = self.dut.apps_name["test-pmd"] - - def reload_ice(self): - self.dut.send_expect("rmmod ice", "# ", 15) - self.dut.send_expect("modprobe ice", "# ", 15) + self.rxq = 16 + self.rxq_param = "--rxq={0} --txq={0}".format(self.rxq) def set_up(self): """ Run before each test case. """ - self.reload_ice() + pass def generate_file_with_fdir_rules(self): """ @@ -4327,9 +4325,8 @@ class ICESwitchFilterTest(TestCase): # Prepare testpmd EAL and parameters all_eal_param = self.dut.create_eal_parameters(cores="1S/4C/1T", ports=[0]) command = ( - self.path + all_eal_param + ' --log-level="ice,8" -- -i --rxq=16 --txq=16 ' + self.path + all_eal_param + ' --log-level="ice,7" -- -i %s' % self.rxq_param ) - # command = "./%s/app/testpmd %s --log-level=\"ice,8\" -- -i %s" % (self.dut.target, all_eal_param, "--rxq=16 --txq=16") return command def create_testpmd_command_pipeline_mode(self): @@ -4341,7 +4338,7 @@ class ICESwitchFilterTest(TestCase): cores="1S/4C/1T", ports=[0], port_options={0: "pipeline-mode-support=1"} ) command = ( - self.path + all_eal_param + ' --log-level="ice,8" -- -i --rxq=16 --txq=16' + self.path + all_eal_param + ' --log-level="ice,7" -- -i %s' % self.rxq_param ) return command @@ -4370,13 +4367,15 @@ class ICESwitchFilterTest(TestCase): """ # Specify the port to use dic["check_func"]["param"]["expect_port"] = port + dic["check_func"]["param"]["rxq"] = self.rxq + self.pmd.wait_link_status_up(port) self.dut.send_expect("start", "testpmd> ", 15) - time.sleep(2) # send packets self.pkt.update_pkt(dic["scapy_str"]) self.pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=1, timeout=370) - time.sleep(3) - out = self.dut.send_expect("stop", "testpmd> ", 15) + out1 = self.pmd.get_output(timeout=1) + out2 = self.pmd.execute_cmd("stop") + out = out1 + out2 result_flag, log_msg = dic["check_func"]["func"]( out, dic["check_func"]["param"], dic["expect_results"] ) @@ -4701,6 +4700,9 @@ class ICESwitchFilterTest(TestCase): count = 1 for tv in test_vectors: pattern_name = tv["name"] + self.logger.info( + GREEN("{0} case_name:{1} {0}".format("*" * 20, pattern_name)) + ) test_results[pattern_name] = OrderedDict() # get the queues that packets originally came to if count == 1: