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 EBCACA0032; Fri, 30 Dec 2022 11:42:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C626B40DD8; Fri, 30 Dec 2022 11:42:52 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 542F04067B for ; Fri, 30 Dec 2022 11:42:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672396970; x=1703932970; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=lFJ3FVioJbpHErij8HZO9Fv6uPUHqR0wSfq9eKQhYn4=; b=ZybH/IpcYgh7P6OR8/9TvwJkQQ/8fkGPI4zCM0W4CKe3vElH+diH4U9u sCvztBG8B3wEnD4l18Hosd8jAt0711EOvcRJX3/N4pOa9iDlhiHwhNlwS k5A0pbzz0PPMA1mSozuSp8XPusi4hriZJzYAZNWA8lFWLMarlNEYF8foa /AvC9RFYMWlY/+ETeZZATl+zpHTYpD0SlHbfFqI51c7ddFqIUVHh1vfO3 3Lc2uIqFo/v5/n/Vzo4ZqtqmrhkDu2lHwBpT/QvjU9vj/FNZAWMVZlG1Y ujYDvpy+rSDif+/nr9Q0z/9FSnOclW1sNFX1x4kw4Aniev0cVY9zrodI8 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10575"; a="318887650" X-IronPort-AV: E=Sophos;i="5.96,287,1665471600"; d="scan'208";a="318887650" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Dec 2022 02:42:49 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10575"; a="827944183" X-IronPort-AV: E=Sophos;i="5.96,287,1665471600"; d="scan'208";a="827944183" Received: from unknown (HELO localhost.localdomain) ([10.239.252.20]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Dec 2022 02:42:47 -0800 From: Song Jiale To: dts@dpdk.org Cc: Song Jiale Subject: [dts] [PATCH V3 1/2] tests/multiprocess_iavf: add new case according to testplan Date: Fri, 30 Dec 2022 18:40:38 +0000 Message-Id: <20221230184039.1005671-1-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. add 1 case according to testplan. 2. the optimization script, sort the results of regular matching. Signed-off-by: Song Jiale --- v3: -rework the test case according to the new testplan tests/TestSuite_multiprocess_iavf.py | 46 +++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_multiprocess_iavf.py b/tests/TestSuite_multiprocess_iavf.py index bb8e0c98..c52bfa9c 100644 --- a/tests/TestSuite_multiprocess_iavf.py +++ b/tests/TestSuite_multiprocess_iavf.py @@ -476,7 +476,7 @@ class TestMultiprocessIavf(TestCase): ) pkt_num = kwargs.get("pkt_num") res = self.get_pkt_statistic(out, **kwargs) - res_num = res["rx-total"] + res_num = res["rx-packets"] self.verify( res_num == pkt_num, "fail: got wrong number of packets, expect pakcet number {}, got {}".format( @@ -1068,6 +1068,7 @@ class TestMultiprocessIavf(TestCase): r"Port \d+\s+-\s+rx:\s+(?P\d+)\s+tx:.*PORTS", out, re.DOTALL ) rx_num = re.findall(r"Client\s+\d\s+-\s+rx:\s+(\d+)", res.group(0)) + rx_num.sort(reverse=True) for i in range(proc_num): self.verify( int(rx_num[i]) > 0, @@ -1677,6 +1678,49 @@ class TestMultiprocessIavf(TestCase): } self.rte_flow(mac_ipv4_symmetric, self.multiprocess_rss_data, **pmd_param) + def test_multiprocess_negative_action(self): + """ + Test Case: test_multiprocess_negative_action + + """ + # start testpmd multi-process + self.launch_multi_testpmd( + proc_type="auto", + queue_num=4, + process_num=2, + ) + for pmd_output in self.pmd_output_list: + pmd_output.execute_cmd("stop") + # set primary process port stop + try: + self.pmd_output_list[0].execute_cmd("port stop 0") + except Exception as ex: + out = ex.output + self.logger.error(out) + self.verify( + "core dump" not in out, "Core dump occurred in the primary process!!!" + ) + for pmd_output in self.pmd_output_list: + pmd_output.quit() + # start testpmd multi-process + self.launch_multi_testpmd( + proc_type="auto", + queue_num=4, + process_num=2, + ) + for pmd_output in self.pmd_output_list: + pmd_output.execute_cmd("stop") + # reset port in secondary process + try: + self.pmd_output_list[1].execute_cmd("port stop 0") + self.pmd_output_list[1].execute_cmd("port reset 0") + except Exception as ex: + out = ex.output + self.logger.error(out) + self.verify( + "core dump" not in out, "Core dump occurred in the second process!!!" + ) + def set_fields(self): """set ip protocol field behavior""" fields_config = { -- 2.25.1