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 6112FA0032; Fri, 30 Dec 2022 11:22:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BA7340DD8; Fri, 30 Dec 2022 11:22:41 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 1C4C44067B for ; Fri, 30 Dec 2022 11:22:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672395760; x=1703931760; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Vxc9SgyesYxxpijZq0cHwJ5pSwDRMpRGJO26L4qb4c8=; b=OVBRZmfrMnAJEn7b1uy9riq7N9tjI7L7L3+foJscgtFGGeA9CaIlWrhn YUOqNCFDhDyvEl8dMk6CPVI6fGfJTWlXMVRHZrHIMsOUlNNtSOiQcdcwE QE9TM6vmQWAWulVgQS6W2kKcADMZ8Y6ivn5QuGCFIZXPw4n4ALahcNHq8 K+IzIVfyvKK7Fdn+caIxgl9MRRBcyGoKcZZr7iquKyas1h2jFuzz6/lrn P4zIIseXZLNplJ1j+a3yS45q1kd2xrpPeIUcGRFTAr+7FKxAkFtLY25QV xZ9YIqKury/57qLjhFQqNVU8tq8t/dqCg4wKDKjNq2SOf+grpReY/Jhn3 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10575"; a="301558603" X-IronPort-AV: E=Sophos;i="5.96,287,1665471600"; d="scan'208";a="301558603" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Dec 2022 02:22:39 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10575"; a="722306739" X-IronPort-AV: E=Sophos;i="5.96,287,1665471600"; d="scan'208";a="722306739" Received: from unknown (HELO localhost.localdomain) ([10.239.252.20]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Dec 2022 02:22:38 -0800 From: Song Jiale To: dts@dpdk.org Cc: Song Jiale , Jin Ling Subject: [dts] [PATCH V3 2/2] test_plans/multiprocess: add 1 case Date: Fri, 30 Dec 2022 18:20:28 +0000 Message-Id: <20221230182028.1004481-2-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221230182028.1004481-1-songx.jiale@intel.com> References: <20221230182028.1004481-1-songx.jiale@intel.com> 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 add a case to test the testpmd secondary process crash of the pf port. Signed-off-by: Jin Ling Signed-off-by: Song Jiale --- v3: -redesign 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