test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V2]tests/nic_single_core: fix tests failed without saving result
@ 2020-03-05  8:26 hanyingya
  2020-03-12  8:51 ` Han, YingyaX
  2020-03-13  6:29 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: hanyingya @ 2020-03-05  8:26 UTC (permalink / raw)
  To: dts; +Cc: hanyingya

Signed-off-by: hanyingya <yingyax.han@intel.com>
---
 tests/TestSuite_nic_single_core_perf.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py
index 5fafe5f..48a0d8a 100644
--- a/tests/TestSuite_nic_single_core_perf.py
+++ b/tests/TestSuite_nic_single_core_perf.py
@@ -196,8 +196,8 @@ class TestNicSingleCorePerf(TestCase):
         self.nb_ports = len(self.dut_ports)
         self.verify(self.nb_ports >= 1, "At least 1 port is required to test")
         self.perf_test(self.nb_ports)
-        self.handle_results()
         self.handle_expected()
+        self.handle_results()
 
     def handle_expected(self):
         """
@@ -252,7 +252,7 @@ class TestNicSingleCorePerf(TestCase):
                 # run packet generator
                 streams = self.pktgen_helper.prepare_stream_from_tginput(tgenInput, 100, vm_config, self.tester.pktgen)
                 # set traffic option
-                traffic_opt = {'delay': 30}
+                traffic_opt = {'duration': self.test_duration}
                 # _, pps = self.tester.traffic_generator_throughput(tgenInput, rate_percent=100, delay=30)
                 _, packets_received = self.tester.pktgen.measure_throughput(stream_ids=streams, options=traffic_opt)
                 self.verify(packets_received > 0, "No traffic detected")
@@ -348,11 +348,11 @@ class TestNicSingleCorePerf(TestCase):
                 row_dict0['parameters'].append(row_dict3)
                 json_obj[case_name].append(row_dict0)
                 status_result.append(row_dict0['status'])
-        self.verify("FAIL" not in status_result, "Excessive gap between test results and expectations")
         with open(os.path.join(rst.path2Result,
                                '{0:s}_single_core_perf.json'.format(
                                    self.nic)), 'w') as fp:
             json.dump(json_obj, fp)
+        self.verify("FAIL" not in status_result, "Excessive gap between test results and expectations")
 
     def set_fields(self):
         """
-- 
2.17.2


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

* Re: [dts] [PATCH V2]tests/nic_single_core: fix tests failed without saving result
  2020-03-05  8:26 [dts] [PATCH V2]tests/nic_single_core: fix tests failed without saving result hanyingya
@ 2020-03-12  8:51 ` Han, YingyaX
  2020-03-13  6:29 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Han, YingyaX @ 2020-03-12  8:51 UTC (permalink / raw)
  To: dts; +Cc: Tu, Lijuan

[-- Attachment #1: Type: text/plain, Size: 2476 bytes --]

Tested_by  Han, YingyaX <yingyax.han@intel.com>

Best regards,
Yingya

-----Original Message-----
From: Han, YingyaX 
Sent: Thursday, March 5, 2020 4:26 PM
To: dts@dpdk.org
Cc: Han, YingyaX <yingyax.han@intel.com>
Subject: [dts][PATCH V2]tests/nic_single_core: fix tests failed without saving result

Signed-off-by: hanyingya <yingyax.han@intel.com>
---
 tests/TestSuite_nic_single_core_perf.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py
index 5fafe5f..48a0d8a 100644
--- a/tests/TestSuite_nic_single_core_perf.py
+++ b/tests/TestSuite_nic_single_core_perf.py
@@ -196,8 +196,8 @@ class TestNicSingleCorePerf(TestCase):
         self.nb_ports = len(self.dut_ports)
         self.verify(self.nb_ports >= 1, "At least 1 port is required to test")
         self.perf_test(self.nb_ports)
-        self.handle_results()
         self.handle_expected()
+        self.handle_results()
 
     def handle_expected(self):
         """
@@ -252,7 +252,7 @@ class TestNicSingleCorePerf(TestCase):
                 # run packet generator
                 streams = self.pktgen_helper.prepare_stream_from_tginput(tgenInput, 100, vm_config, self.tester.pktgen)
                 # set traffic option
-                traffic_opt = {'delay': 30}
+                traffic_opt = {'duration': self.test_duration}
                 # _, pps = self.tester.traffic_generator_throughput(tgenInput, rate_percent=100, delay=30)
                 _, packets_received = self.tester.pktgen.measure_throughput(stream_ids=streams, options=traffic_opt)
                 self.verify(packets_received > 0, "No traffic detected") @@ -348,11 +348,11 @@ class TestNicSingleCorePerf(TestCase):
                 row_dict0['parameters'].append(row_dict3)
                 json_obj[case_name].append(row_dict0)
                 status_result.append(row_dict0['status'])
-        self.verify("FAIL" not in status_result, "Excessive gap between test results and expectations")
         with open(os.path.join(rst.path2Result,
                                '{0:s}_single_core_perf.json'.format(
                                    self.nic)), 'w') as fp:
             json.dump(json_obj, fp)
+        self.verify("FAIL" not in status_result, "Excessive gap between 
+ test results and expectations")
 
     def set_fields(self):
         """
--
2.17.2


[-- Attachment #2: TestNicSingleCorePerf.log --]
[-- Type: application/octet-stream, Size: 92866 bytes --]

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

* Re: [dts] [PATCH V2]tests/nic_single_core: fix tests failed without saving result
  2020-03-05  8:26 [dts] [PATCH V2]tests/nic_single_core: fix tests failed without saving result hanyingya
  2020-03-12  8:51 ` Han, YingyaX
@ 2020-03-13  6:29 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-03-13  6:29 UTC (permalink / raw)
  To: Han, YingyaX, dts; +Cc: Han, YingyaX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of hanyingya
> Sent: Thursday, March 5, 2020 4:26 PM
> To: dts@dpdk.org
> Cc: Han, YingyaX <yingyax.han@intel.com>
> Subject: [dts] [PATCH V2]tests/nic_single_core: fix tests failed without saving
> result
> 
> Signed-off-by: hanyingya <yingyax.han@intel.com>
> ---
>  tests/TestSuite_nic_single_core_perf.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/TestSuite_nic_single_core_perf.py
> b/tests/TestSuite_nic_single_core_perf.py
> index 5fafe5f..48a0d8a 100644
> --- a/tests/TestSuite_nic_single_core_perf.py
> +++ b/tests/TestSuite_nic_single_core_perf.py
> @@ -196,8 +196,8 @@ class TestNicSingleCorePerf(TestCase):
>          self.nb_ports = len(self.dut_ports)
>          self.verify(self.nb_ports >= 1, "At least 1 port is required to test")
>          self.perf_test(self.nb_ports)
> -        self.handle_results()
>          self.handle_expected()
> +        self.handle_results()
> 
>      def handle_expected(self):
>          """
> @@ -252,7 +252,7 @@ class TestNicSingleCorePerf(TestCase):
>                  # run packet generator
>                  streams =
> self.pktgen_helper.prepare_stream_from_tginput(tgenInput, 100, vm_config,
> self.tester.pktgen)
>                  # set traffic option
> -                traffic_opt = {'delay': 30}
> +                traffic_opt = {'duration': self.test_duration}
>                  # _, pps = self.tester.traffic_generator_throughput(tgenInput,
> rate_percent=100, delay=30)
>                  _, packets_received =
> self.tester.pktgen.measure_throughput(stream_ids=streams,
> options=traffic_opt)
>                  self.verify(packets_received > 0, "No traffic detected") @@ -348,11
> +348,11 @@ class TestNicSingleCorePerf(TestCase):
>                  row_dict0['parameters'].append(row_dict3)
>                  json_obj[case_name].append(row_dict0)
>                  status_result.append(row_dict0['status'])
> -        self.verify("FAIL" not in status_result, "Excessive gap between test
> results and expectations")
>          with open(os.path.join(rst.path2Result,
>                                 '{0:s}_single_core_perf.json'.format(
>                                     self.nic)), 'w') as fp:
>              json.dump(json_obj, fp)
> +        self.verify("FAIL" not in status_result, "Excessive gap between
> + test results and expectations")
> 
>      def set_fields(self):
>          """
> --
> 2.17.2


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

end of thread, other threads:[~2020-03-13  6:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-05  8:26 [dts] [PATCH V2]tests/nic_single_core: fix tests failed without saving result hanyingya
2020-03-12  8:51 ` Han, YingyaX
2020-03-13  6:29 ` Tu, Lijuan

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