fix VMXNET3 regreesion issue 70/5270/1
authorHanoh Haim <[email protected]>
Sun, 22 Jan 2017 15:53:39 +0000 (17:53 +0200)
committerHanoh Haim <[email protected]>
Sun, 22 Jan 2017 15:53:39 +0000 (17:53 +0200)
Signed-off-by: Hanoh Haim <[email protected]>
scripts/automation/regression/stateful_tests/trex_imix_test.py
scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py

index 5f52fab..dc7eea0 100755 (executable)
@@ -121,6 +121,11 @@ class CTRexIMIX_Test(CTRexGeneral_Test):
         mult  = self.get_benchmark_param('multiplier')
         core  = self.get_benchmark_param('cores')
 
+
+        # in case of VMXNET3 the number of bytes reported is 60 bytes for 64B 
+        if self.is_VM:
+            self.trex.result_obj.set_warmup (0.89)
+
 #       trex_res = self.trex.run(multiplier = mult, cores = core, duration = 30, l = 1000, p = True)
         ret = self.trex.start_trex(
             c = core,
@@ -141,6 +146,10 @@ class CTRexIMIX_Test(CTRexGeneral_Test):
         self.check_general_scenario_results(trex_res)
         self.check_CPU_benchmark(trex_res)
 
+        if self.is_VM:
+            self.trex.result_obj.set_warmup_default()
+
+
     # the name intentionally not matches nose default pattern, including the test should be specified explicitly
     def dummy(self):
         ret = self.trex.start_trex(
index 4e7deb9..490e3b7 100755 (executable)
@@ -1110,6 +1110,13 @@ class CTRexResult(object):
         self.clear_results()
         self.latency_checked = True
         self.filtered_latency_amount = filtered_latency_amount
+        self.set_warmup_default()
+
+    def set_warmup_default (self):
+        self.set_warmup(0.96)
+
+    def set_warmup (self,new_warmup_max):
+        self.warmup_max = new_warmup_max
 
     def __repr__(self):
         return ("Is valid history?       {arg}\n".format( arg = self.is_valid_hist() ) +
@@ -1414,7 +1421,7 @@ class CTRexResult(object):
             self._current_tx_rate = CTRexResult.__get_value_by_path(latest_dump, "trex-global.data", "m_tx_(?!expected_)\w+")
             if not self._done_warmup and self._expected_tx_rate is not None:
                 # check for up to 4% change between expected and actual
-                if (self._current_tx_rate['m_tx_bps'] > 0.96 * self._expected_tx_rate['m_tx_expected_bps']):
+                if (self._current_tx_rate['m_tx_bps'] > self.warmup_max * self._expected_tx_rate['m_tx_expected_bps']):
                     self._done_warmup = True
                     latest_dump['warmup_barrier'] = True