summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2022-09-21 17:11:22 +0200
committerJordan Augé <jordan.auge+fdio@cisco.com>2022-09-30 09:17:13 +0200
commit3476dd9ddecc87d9212c3bf56a5be52079e27def (patch)
tree3c7ea2664e8f99fc4fd4588b9e4493f0dc9bbb93 /tests
parent29647f687c8dadc90e2ba4d3a772eee09a1a4f1b (diff)
feat: support for new packet format in hicn-light
Ref: HICN-792 Change-Id: I3204006bd2dd2be6504c33035c6578ec0292455a Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/config.sh2
-rw-r--r--tests/functional-tests/2-nodes-hicn-light.robot4
-rw-r--r--tests/resources/libraries/robot/runtest.robot14
3 files changed, 20 insertions, 0 deletions
diff --git a/tests/config.sh b/tests/config.sh
index b10d11204..8d36382d9 100755
--- a/tests/config.sh
+++ b/tests/config.sh
@@ -39,6 +39,7 @@ HIPERF_CMD_MEMIF_RAAQM="${HIPERF_CMD_RAAQM} -z memif_module"
HIPERF_CMD_MEMIF_CBR="${HIPERF_CMD_CBR} -z memif_module"
PING_CMD="ENABLE_LOG_PREFIX=OFF LOG_LEVEL=1 hicn-ping-client -m 50 -i 200000 -n ${PING_PRODUCER}"
+PING_CMD_NEW="ENABLE_LOG_PREFIX=OFF LOG_LEVEL=1 hicn-ping-client -m 50 -i 200000 -n ${PING_PRODUCER} -w new"
PING_CMD_MEMIF="${PING_CMD} -z memif_module"
POSTPROCESS_COMMAND_PING='grep trip | \
cut -f 4 -d " " | \
@@ -88,6 +89,7 @@ declare -A tests=(
["vpp-bridge-latency"]="${PING_CMD_MEMIF} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_PING}"
["vpp-memif-latency"]="${PING_CMD_MEMIF} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_PING}"
["vpp-memif-replication-latency"]="${PING_CMD_MEMIF} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_PING}"
+ ["hicn-light-latency-new"]="${PING_CMD_NEW} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_PING}"
)
declare -A link_model=(
diff --git a/tests/functional-tests/2-nodes-hicn-light.robot b/tests/functional-tests/2-nodes-hicn-light.robot
index 9aa5923a0..e23c35e6a 100644
--- a/tests/functional-tests/2-nodes-hicn-light.robot
+++ b/tests/functional-tests/2-nodes-hicn-light.robot
@@ -22,3 +22,7 @@ RTC Testing Mobile
Latency Testing Mobile
Set Link hicn-light 500 1 0 0
Run Latency Test hicn-light 3000 3000 3000
+
+Latency Testing Mobile New
+ Set Link hicn-light 500 1 0 0
+ Run Latency Test New hicn-light 3000 3000 3000
diff --git a/tests/resources/libraries/robot/runtest.robot b/tests/resources/libraries/robot/runtest.robot
index d5201d765..379b4d307 100644
--- a/tests/resources/libraries/robot/runtest.robot
+++ b/tests/resources/libraries/robot/runtest.robot
@@ -32,6 +32,10 @@ Run Test
Should Be True ${min_max_avg}[0] >= ${EXPECTED_MIN} msg="Min does not match (${min_max_avg}[0] < ${EXPECTED_MIN})"
Should Be True ${min_max_avg}[1] >= ${EXPECTED_MAX} msg="Max does not match (${min_max_avg}[1] < ${EXPECTED_MAX})"
Should Be True ${min_max_avg}[2] >= ${EXPECTED_AVG} msg="Avg does not match (${min_max_avg}[2] < ${EXPECTED_AVG})"
+ ELSE IF '${TESTID}' == 'latency-new'
+ Should Be True ${min_max_avg}[0] <= ${EXPECTED_MIN} msg="Min does not match (${min_max_avg}[0] > ${EXPECTED_MIN})"
+ Should Be True ${min_max_avg}[1] <= ${EXPECTED_MAX} msg="Max does not match (${min_max_avg}[1] > ${EXPECTED_MAX})"
+ Should Be True ${min_max_avg}[2] <= ${EXPECTED_AVG} msg="Avg does not match (${min_max_avg}[2] > ${EXPECTED_AVG})"
ELSE
Fail "Provided Test ID does not exist"
END
@@ -90,3 +94,13 @@ Run RTC Test
... ${EXPECTED_AVG} The expected avg bitrate
[Arguments] ${TEST_SETUP}=${NONE} ${EXPECTED_MIN}=${NONE} ${EXPECTED_MAX}=${NONE} ${EXPECTED_AVG}=${NONE}
Run Test ${TEST_SETUP} rtc ${EXPECTED_MIN} ${EXPECTED_MAX} ${EXPECTED_AVG}
+
+Run Latency Test New
+ [Documentation] Run hicn-ping on the ${TEST_SETUP} topology with the new packet format and measure latency.
+ ... Arguments:
+ ... ${TEST_SETUP} The setup of the test.
+ ... ${EXPECTED_MIN} The expected min latency
+ ... ${EXPECTED_MAX} The expected max latency
+ ... ${EXPECTED_AVG} The expected avg latency
+ [Arguments] ${TEST_SETUP}=${NONE} ${EXPECTED_MIN}=${NONE} ${EXPECTED_MAX}=${NONE} ${EXPECTED_AVG}=${NONE}
+ Run Test ${TEST_SETUP} latency-new ${EXPECTED_MIN} ${EXPECTED_MAX} ${EXPECTED_AVG}