test suite reviews and discussions
 help / color / mirror / Atom feed
* [PATCH] tests/unit_tests: fix self.__name__ error
@ 2022-06-22  2:24 Daxue Gao
  2022-06-29  1:24 ` lijuan.tu
  2022-06-29  1:27 ` lijuan.tu
  0 siblings, 2 replies; 3+ messages in thread
From: Daxue Gao @ 2022-06-22  2:24 UTC (permalink / raw)
  To: dts; +Cc: lijuan.tu, qingx.sun, Daxue Gao

fix tests/unit_tests: self.__name__ is attribute does not exist.

Signed-off-by: Daxue Gao <daxuex.gao@intel.com>
---
 tests/TestSuite_unit_tests_cmdline.py        | 2 +-
 tests/TestSuite_unit_tests_crc.py            | 2 +-
 tests/TestSuite_unit_tests_cryptodev_func.py | 2 +-
 tests/TestSuite_unit_tests_dump.py           | 2 +-
 tests/TestSuite_unit_tests_eal.py            | 2 +-
 tests/TestSuite_unit_tests_event_timer.py    | 2 +-
 tests/TestSuite_unit_tests_kni.py            | 2 +-
 tests/TestSuite_unit_tests_loopback.py       | 2 +-
 tests/TestSuite_unit_tests_lpm.py            | 2 +-
 tests/TestSuite_unit_tests_mbuf.py           | 2 +-
 tests/TestSuite_unit_tests_mempool.py        | 2 +-
 tests/TestSuite_unit_tests_pmd_perf.py       | 2 +-
 tests/TestSuite_unit_tests_power.py          | 2 +-
 tests/TestSuite_unit_tests_qos.py            | 2 +-
 tests/TestSuite_unit_tests_ring.py           | 2 +-
 tests/TestSuite_unit_tests_ringpmd.py        | 2 +-
 tests/TestSuite_unit_tests_timer.py          | 2 +-
 17 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/tests/TestSuite_unit_tests_cmdline.py b/tests/TestSuite_unit_tests_cmdline.py
index 2ae6e8c1..f5ddc398 100644
--- a/tests/TestSuite_unit_tests_cmdline.py
+++ b/tests/TestSuite_unit_tests_cmdline.py
@@ -33,7 +33,7 @@ class TestUnitTestsCmdline(TestCase):
         # icc compilation cost long long time.
         self.cores = self.dut.get_core_list("all")
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_crc.py b/tests/TestSuite_unit_tests_crc.py
index 683360d5..99ece8bd 100644
--- a/tests/TestSuite_unit_tests_crc.py
+++ b/tests/TestSuite_unit_tests_crc.py
@@ -31,7 +31,7 @@ class TestUnitTestsCrc(TestCase):
         """
         self.cores = self.dut.get_core_list("all")
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_cryptodev_func.py b/tests/TestSuite_unit_tests_cryptodev_func.py
index 9aff00ea..74e25528 100644
--- a/tests/TestSuite_unit_tests_cryptodev_func.py
+++ b/tests/TestSuite_unit_tests_cryptodev_func.py
@@ -14,7 +14,7 @@ class UnitTestsCryptodev(TestCase):
         self._app_path = self.dut.apps_name["test"]
         cc.bind_qat_device(self, "vfio-pci")
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_dump.py b/tests/TestSuite_unit_tests_dump.py
index da4caf25..680ef9c9 100644
--- a/tests/TestSuite_unit_tests_dump.py
+++ b/tests/TestSuite_unit_tests_dump.py
@@ -40,7 +40,7 @@ class TestUnitTestsDump(TestCase):
         self.start_test_time = 60
         self.run_cmd_time = 60
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_eal.py b/tests/TestSuite_unit_tests_eal.py
index 431fda01..7d62a759 100644
--- a/tests/TestSuite_unit_tests_eal.py
+++ b/tests/TestSuite_unit_tests_eal.py
@@ -39,7 +39,7 @@ class TestUnitTestsEal(TestCase):
         app_name = self.dut.apps_name["test"]
         self.test_app_cmdline = app_name + eal_params
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_event_timer.py b/tests/TestSuite_unit_tests_event_timer.py
index 01b64099..7691208b 100644
--- a/tests/TestSuite_unit_tests_event_timer.py
+++ b/tests/TestSuite_unit_tests_event_timer.py
@@ -40,7 +40,7 @@ class TestUnitTestEventTimer(TestCase):
             self.dut.bind_eventdev_port(port_to_bind=self.eventdev_timer_device_bus_id)
 
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_kni.py b/tests/TestSuite_unit_tests_kni.py
index 2b4b44aa..0bb2bcac 100644
--- a/tests/TestSuite_unit_tests_kni.py
+++ b/tests/TestSuite_unit_tests_kni.py
@@ -38,7 +38,7 @@ class TestUnitTestsKni(TestCase):
         self.verify("Error" not in out, "Error loading KNI module: " + out)
 
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     #
diff --git a/tests/TestSuite_unit_tests_loopback.py b/tests/TestSuite_unit_tests_loopback.py
index 368dfbeb..076a84e7 100644
--- a/tests/TestSuite_unit_tests_loopback.py
+++ b/tests/TestSuite_unit_tests_loopback.py
@@ -56,7 +56,7 @@ class TestUnitTestsLoopback(TestCase):
         self.dut.send_expect("rm -fr %s" % self.tmp_path, "# ")
         self.dut.send_expect("cp app/test/test_pmd_perf.c %s" % self.tmp_path, "# ")
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_lpm.py b/tests/TestSuite_unit_tests_lpm.py
index 711d705f..a5651203 100644
--- a/tests/TestSuite_unit_tests_lpm.py
+++ b/tests/TestSuite_unit_tests_lpm.py
@@ -35,7 +35,7 @@ class TestUnitTestsLpmIpv6(TestCase):
         """
         self.cores = self.dut.get_core_list("all")
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_mbuf.py b/tests/TestSuite_unit_tests_mbuf.py
index c6b8c0ad..4b86b8c0 100644
--- a/tests/TestSuite_unit_tests_mbuf.py
+++ b/tests/TestSuite_unit_tests_mbuf.py
@@ -32,7 +32,7 @@ class TestUnitTestsMbuf(TestCase):
         """
         self.cores = self.dut.get_core_list("all")
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_mempool.py b/tests/TestSuite_unit_tests_mempool.py
index a7f2d49d..15a61db5 100644
--- a/tests/TestSuite_unit_tests_mempool.py
+++ b/tests/TestSuite_unit_tests_mempool.py
@@ -32,7 +32,7 @@ class TestUnitTestsMempool(TestCase):
         """
         self.cores = self.dut.get_core_list("all")
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_tests_pmd_perf.py
index d043bc2c..e5ef3db3 100644
--- a/tests/TestSuite_unit_tests_pmd_perf.py
+++ b/tests/TestSuite_unit_tests_pmd_perf.py
@@ -45,7 +45,7 @@ class TestUnitTestsPmdPerf(TestCase):
         socket_id = self.dut.ports_info[0]["port"].socket
         self.cores = self.dut.get_core_list(config="1S/4C/1T", socket=socket_id)
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_power.py b/tests/TestSuite_unit_tests_power.py
index 9bd2ce67..302af0c5 100644
--- a/tests/TestSuite_unit_tests_power.py
+++ b/tests/TestSuite_unit_tests_power.py
@@ -33,7 +33,7 @@ class TestUnitTestsPower(TestCase):
         """
         self.cores = self.dut.get_core_list("all")
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_qos.py b/tests/TestSuite_unit_tests_qos.py
index 20459622..0a6b94e5 100644
--- a/tests/TestSuite_unit_tests_qos.py
+++ b/tests/TestSuite_unit_tests_qos.py
@@ -34,7 +34,7 @@ class TestUnitTestsQos(TestCase):
         """
         self.cores = self.dut.get_core_list("all")
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_ring.py b/tests/TestSuite_unit_tests_ring.py
index 924778a0..fc4dfdaa 100644
--- a/tests/TestSuite_unit_tests_ring.py
+++ b/tests/TestSuite_unit_tests_ring.py
@@ -32,7 +32,7 @@ class TestUnitTestsRing(TestCase):
         """
         self.cores = self.dut.get_core_list("all")
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_ringpmd.py b/tests/TestSuite_unit_tests_ringpmd.py
index 137c6f37..ccc80e4e 100644
--- a/tests/TestSuite_unit_tests_ringpmd.py
+++ b/tests/TestSuite_unit_tests_ringpmd.py
@@ -33,7 +33,7 @@ class TestUnitTestsRingPmd(TestCase):
         """
         self.cores = self.dut.get_core_list("all")
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
diff --git a/tests/TestSuite_unit_tests_timer.py b/tests/TestSuite_unit_tests_timer.py
index 7767dd89..c79a0983 100644
--- a/tests/TestSuite_unit_tests_timer.py
+++ b/tests/TestSuite_unit_tests_timer.py
@@ -39,7 +39,7 @@ class TestUnitTestsTimer(TestCase):
         if len(self.cores) > 16:
             self.this_timeout = self.this_timeout * len(self.cores) / 16
         self.logger.warning(
-            f"Test Suite {self.__name__} is deprecated and will be removed in the next release"
+            f"Test Suite {self.suite_name} is deprecated and will be removed in the next release"
         )
 
     def set_up(self):
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-29  1:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22  2:24 [PATCH] tests/unit_tests: fix self.__name__ error Daxue Gao
2022-06-29  1:24 ` lijuan.tu
2022-06-29  1:27 ` lijuan.tu

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).