test suite reviews and discussions
 help / color / mirror / Atom feed
From: Hongbo Li <hongbox.li@intel.com>
To: dts@dpdk.org
Cc: Hongbo Li <hongbox.li@intel.com>
Subject: [dts] [PATCH V1 3/3] tests/ice_limit_value_test: optimize scripts
Date: Tue, 15 Nov 2022 07:42:14 +0000	[thread overview]
Message-ID: <20221115074214.62185-3-hongbox.li@intel.com> (raw)
In-Reply-To: <20221115074214.62185-1-hongbox.li@intel.com>

1.when the dpdk testpmd exits abnormally, the port will not be initialized, and sometimes
the test of other cases will be affected. therefore, after the test, should use quit to
close the dpdk testpmd normally to avoid the impact between cases.
2.the object named "self.session_third" is undefined, delete useless code.

Signed-off-by: Hongbo Li <hongbox.li@intel.com>
---
 tests/TestSuite_ice_limit_value_test.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tests/TestSuite_ice_limit_value_test.py b/tests/TestSuite_ice_limit_value_test.py
index b75cea84..b5bc6dc2 100644
--- a/tests/TestSuite_ice_limit_value_test.py
+++ b/tests/TestSuite_ice_limit_value_test.py
@@ -1256,13 +1256,10 @@ class TestICELimitValue(TestCase):
 
     def tear_down(self):
         # destroy all flow rule on port 0
-        self.dut.kill_all()
-        self.destroy_env()
         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()
 
     def tear_down_all(self):
         self.dut.kill_all()
-        self.destroy_env()
-- 
2.25.1


  parent reply	other threads:[~2022-11-15  8:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15  7:42 [dts] [PATCH V1 1/3] tests/ice_iavf_fdir: " Hongbo Li
2022-11-15  7:42 ` [dts] [PATCH V1 2/3] tests/ice_fdir: " Hongbo Li
2022-11-15  7:42 ` Hongbo Li [this message]
2022-11-17  7:48   ` [dts] [PATCH V1 3/3] tests/ice_limit_value_test: " Jiale, SongX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221115074214.62185-3-hongbox.li@intel.com \
    --to=hongbox.li@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).