From patchwork Mon Jul 27 17:07:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mei, JianweiX" X-Patchwork-Id: 74837 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9EBC2A0524; Mon, 27 Jul 2020 10:45:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 721BC1BFE2; Mon, 27 Jul 2020 10:45:25 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id C8C681BFE0 for ; Mon, 27 Jul 2020 10:45:23 +0200 (CEST) IronPort-SDR: u2EfuGzVBktSUvhgov/9vhOkDqMdBZjaZXEvsbCBKzM12fDkHkODizOgubh/kd9rTJSZo3NYSZ bE+kdttAVsKg== X-IronPort-AV: E=McAfee;i="6000,8403,9694"; a="131040509" X-IronPort-AV: E=Sophos;i="5.75,402,1589266800"; d="scan'208";a="131040509" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2020 01:45:22 -0700 IronPort-SDR: LNbs03kdQPebs75B37muPPaatCbzuFkHci5l2nWq8Jb7VD3VsVOi9uIYgtRCV+aCMRzj9QiFyF mooKoFLNAxEg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,402,1589266800"; d="scan'208";a="303383382" Received: from unknown (HELO localhost.localdomain) ([10.240.183.106]) by orsmga002.jf.intel.com with ESMTP; 27 Jul 2020 01:45:21 -0700 From: Jianwei Mei To: dts@dpdk.org Cc: Jianwei Mei Date: Mon, 27 Jul 2020 17:07:56 +0000 Message-Id: <20200727170756.12691-1-jianweix.mei@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V2] tests/dcf_lifecycle:recovery ENV for other cases run 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" 1. If vf is created, set a vf as trust will fail, so destroy it before set trust. 2. Need recovery the ENV for other cases after case test_dcf_with_l2fwd_03 and test_dcf_with_l2fwd_02 run. Signed-off-by: Jianwei Mei --- tests/TestSuite_dcf_lifecycle.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/TestSuite_dcf_lifecycle.py b/tests/TestSuite_dcf_lifecycle.py index 3971941..9be071c 100644 --- a/tests/TestSuite_dcf_lifecycle.py +++ b/tests/TestSuite_dcf_lifecycle.py @@ -933,6 +933,8 @@ class TestDcfLifeCycle(TestCase): self.run_test_post() self.check_dcf_with_l2fwd_adp_failed_result(output) # Exit DCF mode, PF can set L2 forwarding. + self.dut.destroy_sriov_vfs_by_port(0) + time.sleep(1) output = self.set_adq_mac_vlan() self.check_dcf_with_l2fwd_adp_result(output) except Exception as e: @@ -956,6 +958,8 @@ class TestDcfLifeCycle(TestCase): pmd_opts = [['pf1_vf0_dcf', 'dcf']] self.run_test_pre(pmd_opts) # run PF1 DCF mode, PF2 can set L2 forwarding. + self.dut.destroy_sriov_vfs_by_port(1) + time.sleep(1) output = self.set_adq_mac_vlan(1) self.remove_adq_mac_vlan(1) self.run_test_post() @@ -1048,6 +1052,10 @@ class TestDcfLifeCycle(TestCase): """ Run after each test case. """ + if self._suite_result.test_case == "test_dcf_with_l2fwd_03" or self._suite_result.test_case == "test_dcf_with_l2fwd_02": + self.destroy_resource() + self.init_suite() + self.preset_test_environment() self.dut.kill_all() self.clear_flags()