X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fshared%2Fdefault.robot;h=113305bfd308002c652f168b3bbe150935ed7d25;hp=1364c16f7915af9a42e7ad5e87041dd004a6291d;hb=bf66d4dbf760614e819f7d50bf26defab3e537b5;hpb=ecfe59f83a49e0dda9cead06b81339e4ea545053 diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot index 1364c16f79..113305bfd3 100644 --- a/resources/libraries/robot/shared/default.robot +++ b/resources/libraries/robot/shared/default.robot @@ -94,6 +94,57 @@ | | # Parens are there to perform the call. | | Run Keyword If | $resetter | Evaluate | $resetter() +| Verify statistic commands +| | [Documentation] +| | ... | Execute several commands related to stats. +| | ... | To be used by "stats" device tests, +| | ... | as other device tests do not interact with stats. +| | +| | ... | The commands should also cover frequently used +| | ... | PAPI (non-stats) commands and CLI commands. +| | +| | ${results}= | Create List +| | ${status} | ${value}= | Run Keyword And Ignore Error +| | ... | VPP Show Runtime On All DUTs | ${nodes} +| | Append To List | ${results} | ${status} +| | ${status} | ${value}= | Run Keyword And Ignore Error +| | ... | Show Statistics On All DUTs | ${nodes} +| | Append To List | ${results} | ${status} +| | ${status} | ${value}= | Run Keyword And Ignore Error +| | ... | Show Event Logger On All DUTs | ${nodes} +| | Append To List | ${results} | ${status} +| | ${status} | ${value}= | Run Keyword And Ignore Error +| | ... | VPP Clear Runtime On All DUTs | ${nodes} +| | Append To List | ${results} | ${status} +| | ${status} | ${value}= | Run Keyword And Ignore Error +| | ... | Clear Statistics On All DUTs | ${nodes} +| | Append To List | ${results} | ${status} +| | Should Not Contain Match | ${results} | FAIL +| | ... | msg=At least one of statistic commands failed! + +| Workers From Physical Cores +| | [Documentation] +| | ... | Convert from core count to worker count. +| | +| | ... | This just calls CpuUtils.worker_count_from_cores_and_smt keyword +| | ... | with the global \${smt_used} value. +| | ... | See documentation there. +| | +| | ... | *Arguments:* +| | ... | - phy_cores - Number of physical cores to convert from. Type: integer. +| | +| | ... | *Return value:* +| | ... | - Number of workers active on the given number of cores. +| | +| | ... | *Example:* +| | +| | ... | \| \${dp_workers} = \| Workers from Physical Cores \| \${1} \| +| | +| | [Arguments] | ${phy_cores} +| | +| | Run Keyword And Return | Worker Count From Cores And Smt +| | ... | phy_cores=${phy_cores} | smt_used=${smt_used} + | Configure crypto device on all DUTs | | [Documentation] | Verify if Crypto QAT device virtual functions are | | ... | initialized on all DUTs. If parameter force_init is set to True, then @@ -225,7 +276,7 @@ | | | ${thr_count_int}= | Run Keyword If | ${smt_used} | | | ... | Evaluate | int(${cpu_count_int}*2) | | | ... | ELSE | Set variable | ${thr_count_int} -| | | ${rxq_ratio} = | Get Variable Value | \${rxq_ratio} | ${2} +| | | ${rxq_ratio} = | Get Variable Value | \${rxq_ratio} | ${1} | | | ${rxq_count_int}= | Run Keyword If | ${rx_queues} | | | ... | Set variable | ${rx_queues} | | | ... | ELSE | Evaluate | int(${thr_count_int}/${rxq_ratio}) @@ -294,7 +345,7 @@ | | | ${thr_count_int}= | Run Keyword If | ${smt_used} | | | ... | Evaluate | int(${cpu_count_int}*2) | | | ... | ELSE | Set variable | ${thr_count_int} -| | | ${rxq_ratio} = | Get Variable Value | \${rxq_ratio} | ${2} +| | | ${rxq_ratio} = | Get Variable Value | \${rxq_ratio} | ${1} | | | ${rxq_count_int}= | Run Keyword If | ${rx_queues} | | | ... | Set variable | ${rx_queues} | | | ... | ELSE | Evaluate | int(${thr_count_int}/${rxq_ratio})