From patchwork Tue Nov 15 01:58:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, HongboX" X-Patchwork-Id: 119861 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 5DE77A0547; Tue, 15 Nov 2022 03:58:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 598B140DFD; Tue, 15 Nov 2022 03:58:06 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 006DA40150 for ; Tue, 15 Nov 2022 03:58:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668481085; x=1700017085; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=vdCBrxisiAz7zfbMiC9vdCVb78P8wncjsgucoglPfoU=; b=K3qOXQdIqINsPcbHh+DY6cucNE+x/GULY2++fJEr2L6Dm8dzmqbkmFLs YlVsjrNgSiNxyOFKgL/YsAzSfas7SOMmDfKtfz9HxnsIeDIRHuOnqsRZ8 XqlnNqhi1P3ldfz1bCeEIMM9QNY46GK9oVlg0H4km/EsoIxGHFxo3W+WK OXwvwu92U/KcG/8vO7bNzCD9i7jiwVX0oSSZXKdjGugu5rrCZ1ehRnV77 j9qOJwOwMlmD2M1BtbCX+i64D+QFWVwK4cqmVXcg8WUiMQ0U1bt0MzkKz vwB+YQh8TSphLrQ3gfQZh60QuWN6IGBNB0TjUx10M+Su1qPi7Tx+KjeVX g==; X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="312147737" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="312147737" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 18:58:00 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="669918032" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="669918032" Received: from unknown (HELO localhost.localdomain) ([10.239.252.19]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 18:57:59 -0800 From: Hongbo Li To: dts@dpdk.org Cc: Hongbo Li Subject: [dts][PATCH V1] tests/ice_iavf_fdir.py ensure that the environment can be cleaned up after an exception occurs in the case Date: Tue, 15 Nov 2022 01:58:16 +0000 Message-Id: <20221115015816.52371-1-hongbox.li@intel.com> X-Mailer: git-send-email 2.25.1 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.If testcase throws an exception, the vf will not be cleaned, and cause other cases to fail. 2.Ensure that all sessions exit before deleting vf by adjusting the cleaning environment order. Signed-off-by: Hongbo Li --- tests/TestSuite_ice_iavf_fdir.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_ice_iavf_fdir.py b/tests/TestSuite_ice_iavf_fdir.py index d6ca832a..b7954784 100644 --- a/tests/TestSuite_ice_iavf_fdir.py +++ b/tests/TestSuite_ice_iavf_fdir.py @@ -11932,12 +11932,12 @@ class TestICEIAVFFdir(TestCase): "test_mac_ipv6_multicast_protocol", ]: self.pmd_output.execute_cmd("mcast_addr remove 0 11:22:33:44:55:66") - self.destroy_env() - self.dut.kill_all() if getattr(self, "session_secondary", None): self.dut.close_session(self.session_secondary) if getattr(self, "session_third", None): self.dut.close_session(self.session_third) + self.destroy_env() + self.dut.kill_all() if self.running_case in [ "test_pfcp_vlan_strip_off_sw_checksum",