tests: run iperf tcpbase test without strace by default 43/42643/2
authorIvan Ivanets <[email protected]>
Wed, 2 Apr 2025 18:47:29 +0000 (21:47 +0300)
committerDave Wallace <[email protected]>
Fri, 4 Apr 2025 16:20:23 +0000 (16:20 +0000)
Type: test

Add sleep command instead of strace during iperf test to
improve performace result

Change-Id: I35e3a3838ca5aff2086feed03f7ed114e90caf50
Signed-off-by: Ivan Ivanets <[email protected]>
resources/libraries/python/HoststackUtil.py
resources/libraries/robot/hoststack/hoststack.robot

index c5ab092..cb3970f 100644 (file)
@@ -321,6 +321,15 @@ class HoststackUtil():
 
         exec_cmd_no_error(node, cmd, message=errmsg, sudo=True)
 
+    @staticmethod
+    def sleep_for_hoststack_test_duration(sleep_time):
+        """Wait for the HostStack test program process to complete.
+
+        :param sleep_time: waiting stecific time.
+        """
+        logger.info(f"Sleeping for {sleep_time} seconds")
+        sleep(sleep_time + 1)
+
     @staticmethod
     def hoststack_test_program_finished(node, program_pid, program,
                                         other_node, other_program):
index 643a67c..6d1f49a 100644 (file)
@@ -44,6 +44,7 @@
 | ... | sess_v4_hopen_mem=64M
 | ... | sess_lendpt_buckets=250000
 | ... | sess_lendpt_mem=512M
+| ... | strace=${False}
 | &{vpp_echo_server_attr}=
 | ... | role=server
 | ... | cpu_cnt=${1}
 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip4_addr} | ${dut1_if1_ip4_prefix}
 | | ... | ${iperf3_client_attr}[namespace] | ${core_list}
 | | ... | ${iperf3_client_attr}[cfg_vpp_feature] | ${iperf3_client}
-| | When Hoststack Test Program Finished | ${dut1} | ${client_pid}
+| | Run Keyword If | ${vpp_hoststack_attr}[strace]
+| | ... | When Hoststack Test Program Finished | ${dut1} | ${client_pid}
 | | ... | ${iperf3_client} | ${dut2} | ${iperf3_server}
+| | ... | ELSE
+| | ... | Sleep For Hoststack Test Duration | ${iperf3_client_attr}[time]
 | | FOR | ${action} | IN | @{stat_post_trial}
 | | | Run Keyword | Additional Statistics Action For ${action}
 | | END