diff mbox series

[V1] tests/cvl_dcf_switch_filter: eliminate the impact between cases

Message ID 1631169862-226195-1-git-send-email-songx.jiale@intel.com (mailing list archive)
State Accepted
Headers show
Series [V1] tests/cvl_dcf_switch_filter: eliminate the impact between cases | expand

Checks

Context Check Description
ci/Intel-dts-test success Testing OK

Commit Message

Jiale Song Sept. 9, 2021, 6:44 a.m. UTC
the case test_dcf_stop_start directly modified the variable data when calling the global 
variable tv_mac_ipv4_udp_pay, which affected the testing of other cases

Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
 tests/TestSuite_cvl_dcf_switch_filter.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 tests/TestSuite_cvl_dcf_switch_filter.py

Comments

Tu, Lijuan Sept. 29, 2021, 3:40 a.m. UTC | #1
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Jiale Song
> Sent: 2021年9月9日 14:44
> To: dts@dpdk.org
> Cc: Jiale, SongX <songx.jiale@intel.com>
> Subject: [dts] [PATCH V1] tests/cvl_dcf_switch_filter: eliminate the impact
> between cases
> 
> the case test_dcf_stop_start directly modified the variable data when calling the
> global variable tv_mac_ipv4_udp_pay, which affected the testing of other cases
> 
> Signed-off-by: Jiale Song <songx.jiale@intel.com>

Applied
diff mbox series

Patch

diff --git a/tests/TestSuite_cvl_dcf_switch_filter.py b/tests/TestSuite_cvl_dcf_switch_filter.py
old mode 100644
new mode 100755
index 437a262..a73db42
--- a/tests/TestSuite_cvl_dcf_switch_filter.py
+++ b/tests/TestSuite_cvl_dcf_switch_filter.py
@@ -1786,8 +1786,9 @@  class CVLDCFSwitchFilterTest(TestCase):
         self.dut.send_expect("port stop 0", "testpmd> ")
         self.dut.send_expect("port start 0", "testpmd> ")
         #send matched packets, port 1 can not receive the packets.
-        matched_dic['expect_results'] = {"expect_pkts":0}
-        self.send_and_check_packets(matched_dic)
+        destroy_dict = copy.deepcopy(matched_dic)
+        destroy_dict['expect_results'] = {"expect_pkts":0}
+        self.send_and_check_packets(destroy_dict)
 
     @skip_unsupported_pkg(['os default', 'wireless'])
     def test_mac_ipv4_pfcp_node(self):