[dts] [PATCH] tests/unit_tests_eal: add more hash relative unit tests.

Tu, Lijuan lijuan.tu at intel.com
Mon Dec 3 04:26:29 CET 2018


Hi xueqin,

Did you forget test plan?

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Xueqin Lin
> Sent: Friday, November 30, 2018 9:13 AM
> To: dts at dpdk.org
> Cc: Lin, Xueqin <xueqin.lin at intel.com>
> Subject: [dts] [PATCH] tests/unit_tests_eal: add more hash relative unit
> tests.
> 
> From: "xueqin.lin" <xueqin.lin at intel.com>
> 
> test_hash_functions
> test_hash_multiwriter
> test_hash_readwrite
> test_hash_readwrite_lf
> 
> Signed-off-by: Xueqin Lin <xueqin.lin at intel.com>
> 
> ---
>  tests/TestSuite_unit_tests_eal.py | 55
> +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 55 insertions(+)
> 
> diff --git a/tests/TestSuite_unit_tests_eal.py
> b/tests/TestSuite_unit_tests_eal.py
> index 68a4cbe..c7de5b7 100644
> --- a/tests/TestSuite_unit_tests_eal.py
> +++ b/tests/TestSuite_unit_tests_eal.py
> @@ -115,6 +115,13 @@ class TestUnitTestsEal(TestCase):
>          self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>",
> self.start_test_time)
>          out = self.dut.send_expect("hash_autotest", "RTE>>",
> self.run_cmd_time)
>          self.dut.send_expect("quit", "# ")
> +
> +        # Extendable Bucket Table enhances and guarantees insertion of
> 100% of
> +        # the keys for a given hash table size. Add the check that average
> +        # table utilization is 100% when extendable table is enabled.
> +
> +        self.verify("Average table utilization = 100.00%" in out,
> +                    "Test failed for extenable bucket table")
>          self.verify("Test OK" in out, "Test failed")
> 
>      def test_hash_perf(self):
> @@ -128,6 +135,54 @@ class TestUnitTestsEal(TestCase):
>          self.dut.send_expect("quit", "# ")
>          self.verify("Test OK" in out, "Test failed")
> 
> +    def test_hash_functions(self):
> +        """
> +        Run hash functions autotest.
> +        """
> +
> +        self.dut.send_expect(self.test_app_cmdline,
> +                             "R.*T.*E.*>.*>", self.start_test_time)
> +        out = self.dut.send_expect("hash_functions_autotest",
> +                                   "RTE>>", self.run_cmd_time)
> +        self.dut.send_expect("quit", "# ")
> +        self.verify("Test OK" in out, "Test failed")
> +
> +    def test_hash_multiwriter(self):
> +        """
> +        Run hash multiwriter autotest.
> +        """
> +
> +        self.dut.send_expect(self.test_app_cmdline,
> +                             "R.*T.*E.*>.*>", self.start_test_time)
> +        out = self.dut.send_expect("hash_multiwriter_autotest",
> +                                   "RTE>>", self.run_cmd_time)
> +        self.dut.send_expect("quit", "# ")
> +        self.verify("Test OK" in out, "Test failed")
> +
> +    def test_hash_readwrite(self):
> +        """
> +        Run hash readwrite autotest.
> +        """
> +
> +        self.dut.send_expect(self.test_app_cmdline,
> +                             "R.*T.*E.*>.*>", self.start_test_time)
> +        out = self.dut.send_expect("hash_readwrite_autotest",
> +                                   "RTE>>", self.run_cmd_time)
> +        self.dut.send_expect("quit", "# ")
> +        self.verify("Test OK" in out, "Test failed")
> +
> +    def test_hash_readwrite_lf(self):
> +        """
> +        Run hash readwrite_lf autotest.
> +        """
> +
> +        self.dut.send_expect("./%s/app/test" % self.target,
> +                             "R.*T.*E.*>.*>", self.start_test_time)
> +        out = self.dut.send_expect("hash_readwrite_lf_autotest",
> +                                   "RTE>>", self.run_cmd_time)
> +        self.dut.send_expect("quit", "# ")
> +        self.verify("Test OK" in out, "Test failed")
> +
>      def test_func_reentrancy(self):
>          """
>          Run function reentrancy autotest.
> --
> 2.7.5



More information about the dts mailing list