perf: Fix broken hoststack tests
[csit.git] / resources / libraries / robot / hoststack / hoststack.robot
index ed1e7b7..075cc2b 100644 (file)
@@ -35,8 +35,8 @@
 | ... | api_seg_api_size=1G
 | ... | tcp_cc_algo=cubic
 | ... | sess_evt_q_seg_size=64M
-| ... | sess_evt_q_length=2048
-| ... | sess_prealloc_sess=128
+| ... | sess_evt_q_length=16384
+| ... | sess_prealloc_sess=1024
 | ... | sess_v4_tbl_buckets=20000
 | ... | sess_v4_tbl_mem=64M
 | ... | sess_v4_hopen_buckets=20000
@@ -53,6 +53,8 @@
 | ... | uri_protocol=quic
 | ... | uri_ip4_addr=${EMPTY}
 | ... | uri_port=1234
+| ... | nthreads=1
+| ... | mq_size=${vpp_hoststack_attr}[sess_evt_q_length]
 | ... | nclients=1
 | ... | quic_streams=1
 | ... | time=sconnect:lastbyte
@@ -71,6 +73,8 @@
 | ... | uri_protocol=quic
 | ... | uri_ip4_addr=${EMPTY}
 | ... | uri_port=1234
+| ... | nthreads=1
+| ... | mq_size=${vpp_hoststack_attr}[sess_evt_q_length]
 | ... | nclients=1
 | ... | quic_streams=1
 | ... | time=sconnect:lastbyte
@@ -87,7 +91,7 @@
 | ... | vcl_config=vcl_iperf3.conf
 | ... | ld_preload=${True}
 | ... | transparent_tls=${False}
-| ... | json=${False}
+| ... | json=${True}
 | ... | ip_version=${4}
 | &{iperf3_client_attr}=
 | ... | role=client
 | ... | vcl_config=vcl_iperf3.conf
 | ... | ld_preload=${True}
 | ... | transparent_tls=${False}
-| ... | json=${False}
+| ... | json=${True}
 | ... | ip_version=${4}
 | ... | ip_address=${EMPTY}
 | ... | parallel=${1}
 | | ... | *Arguments:*
 | | ... | - ${cfg_vpp_feature} - VPP Feature requiring config Type: string
 | | ... | - ${namespace} - Namespace Type: string
+| | ... | - ${nthreads} - Number of threads Type: string
+| | ... | - ${mq_size} - Number of threads Type: string
 | | ... | - ${nclients} - Number of clients Type: string
 | | ... | - ${quic_streams} - Number of quic streams Type: string
 | | ... | - ${fifo_size} - Session Fifo Size Type: integer
 | | [Arguments]
 | | ... | ${cfg_vpp_feature}=${vpp_echo_server_attr}[cfg_vpp_feature]
 | | ... | ${namespace}=${vpp_echo_server_attr}[namespace]
+| | ... | ${nthreads}=${vpp_echo_server_attr}[nthreads]
+| | ... | ${mq_size}=${vpp_echo_server_attr}[mq_size]
 | | ... | ${nclients}=${vpp_echo_server_attr}[nclients]
 | | ... | ${quic_streams}=${vpp_echo_server_attr}[quic_streams]
 | | ... | ${time}=${vpp_echo_server_attr}[time]
 | | Set To Dictionary | ${vpp_echo_server_attr} | cfg_vpp_feature
 | | ... | ${cfg_vpp_feature}
 | | Set To Dictionary | ${vpp_echo_server_attr} | namespace | ${namespace}
+| | Set To Dictionary | ${vpp_echo_server_attr} | nthreads | ${nthreads}
+| | Set To Dictionary | ${vpp_echo_server_attr} | mq_size | ${mq_size}
 | | Set To Dictionary | ${vpp_echo_server_attr} | nclients | ${nclients}
 | | Set To Dictionary | ${vpp_echo_server_attr} | quic_streams | ${quic_streams}
 | | Set To Dictionary | ${vpp_echo_server_attr} | time | ${time}
 | | ... | *Arguments:*
 | | ... | - ${cfg_vpp_feature} - VPP Feature requiring config Type: string
 | | ... | - ${namespace} - Namespace Type: string
+| | ... | - ${nthreads} - Number of threads Type: string
+| | ... | - ${mq_size} - Number of threads Type: string
 | | ... | - ${nclients} - Number of clients Type: string
+| | ... | - ${quic_streams} - Number of quic streams Type: string
 | | ... | - ${fifo_size} - Session Fifo Size Type: integer
 | | ... | - ${time} - Timing events (start:end) Type: string
 | | ... | - ${rx_bytes} - Number of Bytes to receive Type: string
 | | [Arguments]
 | | ... | ${cfg_vpp_feature}=${vpp_echo_client_attr}[cfg_vpp_feature]
 | | ... | ${namespace}=${vpp_echo_client_attr}[namespace]
+| | ... | ${nthreads}=${vpp_echo_client_attr}[nthreads]
+| | ... | ${mq_size}=${vpp_echo_client_attr}[mq_size]
 | | ... | ${nclients}=${vpp_echo_client_attr}[nclients]
-| | ... | ${quic_streams}=${vpp_echo_server_attr}[quic_streams]
+| | ... | ${quic_streams}=${vpp_echo_client_attr}[quic_streams]
 | | ... | ${time}=${vpp_echo_client_attr}[time]
 | | ... | ${fifo_size}=${vpp_echo_client_attr}[fifo_size]
 | | ... | ${rx_bytes}=${vpp_echo_client_attr}[rx_bytes]
 | | Set To Dictionary | ${vpp_echo_client_attr} | cfg_vpp_feature
 | | ... | ${cfg_vpp_feature}
 | | Set To Dictionary | ${vpp_echo_client_attr} | namespace | ${namespace}
+| | Set To Dictionary | ${vpp_echo_client_attr} | nthreads | ${nthreads}
+| | Set To Dictionary | ${vpp_echo_client_attr} | mq_size | ${mq_size}
 | | Set To Dictionary | ${vpp_echo_client_attr} | nclients | ${nclients}
 | | Set To Dictionary | ${vpp_echo_client_attr} | quic_streams | ${quic_streams}
 | | Set To Dictionary | ${vpp_echo_client_attr} | time | ${time}
 | | | ... | ${namespace} | ${core_list} | ${cfg_vpp_feature}
 | | | ... | ${test_program}
 | |
-| | Run Keyword If | ${vpp_nsim_attr}[output_feature_enable]
+| | ${is_dut1}= | Run Keyword And Return Status
+| | ... | Dictionaries should be equal | ${node} | ${dut1}
+| | Run Keyword If
+| | ... | ${is_dut1} and ${vpp_nsim_attr}[output_nsim_enable]
 | | ... | Configure VPP NSIM | ${node} | ${vpp_nsim_attr} | ${intf}
 | | Run Keyword If | '${cfg_vpp_feature}' != ''
 | | ... | Additional VPP Config for Feature ${cfg_vpp_feature} | ${node}
 | | | ... | ${vpp_hoststack_attr}[api_seg_global_size]
 | | | Run keyword | ${dut}.Add api segment api size
 | | | ... | ${vpp_hoststack_attr}[api_seg_api_size]
+| | | Run Keyword If
+| | | ... | '${dut}' == 'DUT1' and ${vpp_nsim_attr}[output_nsim_enable]
+| | | ... | ${dut}.Add Nsim poll main thread
 | | | Run keyword | ${dut}.Add api segment gid | testuser
 | | | Run keyword | ${dut}.Add tcp congestion control algorithm
 | | | ... | ${vpp_hoststack_attr}[tcp_cc_algo]
 | | [Documentation]
 | | ... | Configure IP address on the port, set it up and start the specified
 | | ... | HostStack test programs on the DUTs. Gather test program
-| | ... | output and append test results in message.
-| | ... | Return boolean indicating when no results were available from
-| | ... | both the server and client test programs.
+| | ... | output and append JSON formatted test data in message.
+| | ... | Return boolean indicating there was a defered failure of either the
+| | ... | server and/or client test programs.
 | |
 | | Set To Dictionary | ${vpp_echo_server_attr} | uri_ip4_addr
 | | ... | ${dut2_if1_ip4_addr}
 | | ... | ${vpp_echo_client_attr}[namespace] | ${core_list}
 | | ... | ${vpp_echo_client_attr}[cfg_vpp_feature] | ${vpp_echo_client}
 | | When Hoststack Test Program Finished | ${dut1} | ${client_pid}
-| | ${client_no_results} | ${client_output}=
+| | ${client_defer_fail} | ${client_output}=
 | | ... | Analyze hoststack test program output | ${dut1} | Client
 | | ... | ${vpp_nsim_attr} | ${vpp_echo_client}
 | | Then Set test message | ${client_output}
 | | And Hoststack Test Program Finished | ${dut2} | ${server_pid}
-| | ${server_no_results} | ${server_output}=
+| | ${server_defer_fail} | ${server_output}=
 | | ... | Analyze hoststack test program output | ${dut2} | Server
 | | ... | ${vpp_nsim_attr} | ${vpp_echo_server}
 | | Set test message | ${server_output} | append=True
-| | Run Keyword And Return | No Hoststack Test Program Results
-| | ... | ${server_no_results} | ${client_no_results}
+| | Run Keyword And Return | Hoststack Test Program Defer Fail
+| | ... | ${server_defer_fail} | ${client_defer_fail}
 
 | Get Test Results From Hoststack Iperf3 Test
 | | [Documentation]
 | | ... | Configure IP address on the port, set it up and start the specified
 | | ... | HostStack test programs on the DUTs. Gather test program
-| | ... | output and append test results in message.
-| | ... | Return boolean indicating when no results were available from
-| | ... | both the server and client test programs.
+| | ... | output and append JSON formatted test data in message.
+| | ... | Return boolean indicating there was a defered failure of either the
+| | ... | server and/or client test programs.
 | |
 | | Set To Dictionary | ${iperf3_client_attr} | ip_address
 | | ... | ${dut2_if1_ip4_addr}
 | | ... | ${iperf3_client_attr}[namespace] | ${core_list}
 | | ... | ${iperf3_client_attr}[cfg_vpp_feature] | ${iperf3_client}
 | | When Hoststack Test Program Finished | ${dut1} | ${client_pid}
-| | ${client_no_results} | ${client_output}=
+| | ${client_defer_fail} | ${client_output}=
 | | ... | Analyze hoststack test program output | ${dut1} | Client
 | | ... | ${vpp_nsim_attr} | ${iperf3_client}
 | | Then Set test message | ${client_output}
-| | Return From Keyword | ${client_no_results}
+| | Return From Keyword | ${client_defer_fail}