[dts] [PATCH V1] tests/perf_virtio_user: write throughput value to report when case is failed

Tu, Lijuan lijuan.tu at intel.com
Tue Mar 3 08:39:12 CET 2020


Applied, thanks


> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of lihong
> Sent: Tuesday, March 3, 2020 2:29 AM
> To: dts at dpdk.org
> Cc: Ma, LihongX <lihongx.ma at intel.com>
> Subject: [dts] [PATCH V1] tests/perf_virtio_user: write throughput value to
> report when case is failed
> 
> Signed-off-by: lihong <lihongx.ma at intel.com>
> ---
>  tests/TestSuite_perf_virtio_user_loopback.py | 5 +++--
>  tests/TestSuite_perf_virtio_user_pvp.py      | 3 +--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/TestSuite_perf_virtio_user_loopback.py
> b/tests/TestSuite_perf_virtio_user_loopback.py
> index 0fb97dd..822e6d9 100644
> --- a/tests/TestSuite_perf_virtio_user_loopback.py
> +++ b/tests/TestSuite_perf_virtio_user_loopback.py
> @@ -142,6 +142,8 @@ class TestPerfVirtioUserLoopback(TestCase):
>          """
>          results = 0.0
>          results_row = []
> +        out = self.vhost.send_expect("show port stats all", "testpmd>", 60)
> +        time.sleep(5)
>          for i in range(10):
>              out = self.vhost.send_expect("show port stats all", "testpmd>", 60)
>              time.sleep(5)
> @@ -261,7 +263,6 @@ class TestPerfVirtioUserLoopback(TestCase):
>                      row_dict0['status'] = 'PASS'
>                  else:
>                      row_dict0['status'] = 'FAIL'
> -                self.verify(row_dict0['status'] == 'PASS', 'The throughput is not in
> correct range')
>                  row_dict1 = dict(name="Throughput", value=result_throughput,
> unit="Mpps", delta=delta)
>                  row_dict2 = dict(name="Txd/Rxd", value=row_in["TXD/RXD"],
> unit="descriptor")
>                  row_dict3 = dict(name="frame_size", value=row_in["Frame Size"],
> unit="bytes") @@ -274,7 +275,7 @@ class
> TestPerfVirtioUserLoopback(TestCase):
>                                 '{0:s}_{1}.json'.format(
>                                     self.nic, self.suite_name)), 'w') as fp:
>              json.dump(self.json_obj, fp)
> -        self.verify("Fail" not in status_result, "Exceeded Gap")
> +        self.verify("FAIL" not in status_result, "Exceeded Gap")
> 
>      def test_perf_loopback_packed_ring_inorder_mergeable(self):
>          """
> diff --git a/tests/TestSuite_perf_virtio_user_pvp.py
> b/tests/TestSuite_perf_virtio_user_pvp.py
> index 2073426..344dba5 100644
> --- a/tests/TestSuite_perf_virtio_user_pvp.py
> +++ b/tests/TestSuite_perf_virtio_user_pvp.py
> @@ -358,7 +358,6 @@ class TestVirtioSingleCorePerf(TestCase):
>                      row_dict0['status'] = 'PASS'
>                  else:
>                      row_dict0['status'] = 'FAIL'
> -                self.verify(row_dict0['status'] == 'PASS', 'The throughput is not in
> correct range')
>                  row_dict1 = dict(name="Throughput", value=result_throughput,
> unit="Mpps", delta=delta)
>                  row_dict2 = dict(name="Txd/Rxd", value=row_in["TXD/RXD"],
> unit="descriptor")
>                  row_dict3 = dict(name="frame_size", value=row_in["Frame Size"],
> unit="bytes") @@ -371,7 +370,7 @@ class
> TestVirtioSingleCorePerf(TestCase):
>                                 '{0:s}_{1}.json'.format(
>                                     self.nic, self.suite_name)), 'w') as fp:
>              json.dump(self.json_obj, fp)
> -        self.verify("Fail" not in status_result, "Exceeded Gap")
> +        self.verify("FAIL" not in status_result, "Exceeded Gap")
> 
>      def tear_down(self):
>          """
> --
> 2.7.4



More information about the dts mailing list