diff options
22 files changed, 142 insertions, 121 deletions
diff --git a/apps/hiperf/src/common.h b/apps/hiperf/src/common.h index 3a17e0c40..1565e63f7 100644 --- a/apps/hiperf/src/common.h +++ b/apps/hiperf/src/common.h @@ -174,20 +174,6 @@ class PayloadSize { transport_size - fec_size; } - static Packet::Format getFormatFromPrefix(const Prefix &prefix, - bool ah = false) { - switch (prefix.getAddressFamily()) { - case AF_INET: - return ah ? HICN_PACKET_FORMAT_IPV4_TCP_AH - : HICN_PACKET_FORMAT_IPV4_TCP; - case AF_INET6: - return ah ? HICN_PACKET_FORMAT_IPV6_TCP_AH - : HICN_PACKET_FORMAT_IPV6_TCP; - default: - return HICN_PACKET_FORMAT_NONE; - } - } - private: std::size_t mtu_; Packet::Format format_; diff --git a/apps/hiperf/src/main.cc b/apps/hiperf/src/main.cc index ac0f64d1d..d655b1fe3 100644 --- a/apps/hiperf/src/main.cc +++ b/apps/hiperf/src/main.cc @@ -19,6 +19,15 @@ namespace hiperf { +static std::unordered_map<std::string, hicn_packet_format_t> const + packet_format_map = {{"ipv4_tcp", HICN_PACKET_FORMAT_IPV4_TCP}, + {"ipv6_tcp", HICN_PACKET_FORMAT_IPV6_TCP}, + {"new", HICN_PACKET_FORMAT_NEW}}; + +#define TO_LOWER(s) \ + std::transform(s.begin(), s.end(), s.begin(), \ + [](unsigned char c) { return std::tolower(c); }); + void usage() { LoggerInfo() << "HIPERF - Instrumentation tool for performing active network" "measurements with hICN"; @@ -174,6 +183,8 @@ void usage() { << "Print the stats report <nb_iterations> times and exit.\n" << "\t\t\t\t\tThis option limits the duration of the run to " "<nb_iterations> * <stats_interval> milliseconds."; + LoggerInfo() << "-w <packet_format> Packet format (without signature, " + "defaults to IPV6_TCP)"; } int main(int argc, char *argv[]) { @@ -208,7 +219,7 @@ int main(int argc, char *argv[]) { while ( (opt = getopt(argc, argv, "A:B:CDE:F:G:HIJ:K:L:M:NP:RST:U:W:X:ab:c:d:e:f:g:hi:j:k:lm:" - "n:op:qrs:tu:vwxy:z:")) != -1) { + "n:op:qrs:tu:vw:xy:z:")) != -1) { switch (opt) { // Common case 'D': { @@ -270,8 +281,13 @@ int main(int argc, char *argv[]) { break; } case 'w': { - client_configuration.packet_format_ = HICN_PACKET_FORMAT_IPV6_UDP; - server_configuration.packet_format_ = HICN_PACKET_FORMAT_IPV6_UDP; + std::string packet_format_s = std::string(optarg); + TO_LOWER(packet_format_s); + auto it = packet_format_map.find(std::string(optarg)); + if (it == packet_format_map.end()) + throw std::runtime_error("Bad packet format"); + client_configuration.packet_format_ = it->second; + server_configuration.packet_format_ = it->second; break; } case 'k': { diff --git a/apps/hiperf/src/server.cc b/apps/hiperf/src/server.cc index ee236f358..b338c69df 100644 --- a/apps/hiperf/src/server.cc +++ b/apps/hiperf/src/server.cc @@ -143,8 +143,9 @@ class HIperfServer::Impl { signer); // Compute maximum payload size - Packet::Format format = PayloadSize::getFormatFromPrefix( - configuration_.name_, !configuration_.manifest_max_capacity_); + Packet::Format format = configuration_.packet_format_; + if (!configuration_.manifest_max_capacity_) + format = Packet::toAHFormat(format); payload_size_max_ = PayloadSize(format).getPayloadSizeMax( configuration_.rtc_ ? RTC_HEADER_SIZE : 0, configuration_.fec_type_.empty() ? 0 : FEC_HEADER_MAX_SIZE, diff --git a/apps/ping/src/ping_client.cc b/apps/ping/src/ping_client.cc index 116d228d4..b3495ed20 100644 --- a/apps/ping/src/ping_client.cc +++ b/apps/ping/src/ping_client.cc @@ -58,7 +58,7 @@ class Configuration { bool jump_ = false; uint32_t jump_freq_ = 0; uint32_t jump_size_ = 0; - hicn_packet_format_t packet_format_ = HICN_PACKET_FORMAT_IPV6_TCP; + hicn_packet_format_t packet_format_ = HICN_PACKET_FORMAT_DEFAULT; Configuration() = default; }; diff --git a/ctrl/libhicnctrl/src/module.h b/ctrl/libhicnctrl/src/module.h index 44ba5ddbb..c06f3ce86 100644 --- a/ctrl/libhicnctrl/src/module.h +++ b/ctrl/libhicnctrl/src/module.h @@ -53,11 +53,13 @@ typedef struct { [ACTION_CREATE] = NULL, \ [ACTION_DELETE] = NULL, \ [ACTION_LIST] = NULL, \ + [ACTION_SET] = NULL, \ }, \ .serialize = { \ [ACTION_CREATE] = PREFIX##_##NAME##_serialize_create, \ [ACTION_DELETE] = PREFIX##_##NAME##_serialize_delete, \ [ACTION_LIST] = PREFIX##_##NAME##_serialize_list, \ + [ACTION_SET] = PREFIX##_##NAME##_serialize_set, \ } \ } @@ -70,11 +72,13 @@ typedef struct { [ACTION_CREATE] = NULL, \ [ACTION_DELETE] = NULL, \ [ACTION_LIST] = NULL, \ + [ACTION_SET] = NULL, \ }, \ .serialize = { \ [ACTION_CREATE] = PREFIX##_##NAME##_serialize_create, \ [ACTION_DELETE] = PREFIX##_##NAME##_serialize_delete, \ [ACTION_LIST] = PREFIX##_##NAME##_serialize_list, \ + [ACTION_SET] = PREFIX##_##NAME##_serialize_set, \ }}; #define DECLARE_VPP_MODULE_OBJECT_OPS(PREFIX, NAME) \ @@ -84,12 +88,14 @@ typedef struct { [ACTION_CREATE] = PREFIX##_##NAME##_create, \ [ACTION_DELETE] = PREFIX##_##NAME##_delete, \ [ACTION_LIST] = PREFIX##_##NAME##_list, \ + [ACTION_SET] = PREFIX##_##NAME##_set, \ }, \ .serialize = \ { \ [ACTION_CREATE] = NULL, \ [ACTION_DELETE] = NULL, \ [ACTION_LIST] = NULL, \ + [ACTION_SET] = NULL, \ }, \ }; diff --git a/ctrl/libhicnctrl/src/modules/hicn_light/connection.c b/ctrl/libhicnctrl/src/modules/hicn_light/connection.c index 2b3644939..d5648d794 100644 --- a/ctrl/libhicnctrl/src/modules/hicn_light/connection.c +++ b/ctrl/libhicnctrl/src/modules/hicn_light/connection.c @@ -495,4 +495,9 @@ int hicnlight_connection_serialize_list(const hc_object_t *object, return sizeof(msg_header_t); // Do not use msg_connection_list_t } +int hicnlight_connection_serialize_set(const hc_object_t *object, + uint8_t *packet) { + return -1; +} + DECLARE_MODULE_OBJECT_OPS(hicnlight, connection); diff --git a/ctrl/libhicnctrl/src/modules/hicn_light/listener.c b/ctrl/libhicnctrl/src/modules/hicn_light/listener.c index 68d4b8fcd..46fded2ca 100644 --- a/ctrl/libhicnctrl/src/modules/hicn_light/listener.c +++ b/ctrl/libhicnctrl/src/modules/hicn_light/listener.c @@ -173,4 +173,9 @@ int hicnlight_listener_serialize_list(const hc_object_t *object, return sizeof(msg_header_t); // Do not use msg_listener_list_t } +int hicnlight_listener_serialize_set(const hc_object_t *object, + uint8_t *packet) { + return -1; +} + DECLARE_MODULE_OBJECT_OPS(hicnlight, listener); diff --git a/ctrl/libhicnctrl/src/modules/hicn_light/route.c b/ctrl/libhicnctrl/src/modules/hicn_light/route.c index 22cf6fbc5..38510704c 100644 --- a/ctrl/libhicnctrl/src/modules/hicn_light/route.c +++ b/ctrl/libhicnctrl/src/modules/hicn_light/route.c @@ -170,4 +170,8 @@ int hicnlight_route_serialize_list(const hc_object_t *object, uint8_t *packet) { return sizeof(msg_header_t); // Do not use msg_route_list_t } +int hicnlight_route_serialize_set(const hc_object_t *object, uint8_t *packet) { + return -1; +} + DECLARE_MODULE_OBJECT_OPS(hicnlight, route); diff --git a/ctrl/libhicnctrl/src/modules/hicn_light/stats.c b/ctrl/libhicnctrl/src/modules/hicn_light/stats.c index 81c506770..a60190a13 100644 --- a/ctrl/libhicnctrl/src/modules/hicn_light/stats.c +++ b/ctrl/libhicnctrl/src/modules/hicn_light/stats.c @@ -60,6 +60,10 @@ int hicnlight_stats_serialize_list(const hc_object_t *object, uint8_t *packet) { return sizeof(msg_header_t); // Do not use msg_stats_list_t } +int hicnlight_stats_serialize_set(const hc_object_t *object, uint8_t *packet) { + return -1; +} + DECLARE_MODULE_OBJECT_OPS(hicnlight, stats); /* PER-FACE STATS */ @@ -101,4 +105,9 @@ int hicnlight_face_stats_serialize_list(const hc_object_t *object, return sizeof(msg_header_t); // Do not use msg_stats_list_t } +int hicnlight_face_stats_serialize_set(const hc_object_t *object, + uint8_t *packet) { + return -1; +} + DECLARE_MODULE_OBJECT_OPS(hicnlight, face_stats); diff --git a/ctrl/libhicnctrl/src/modules/hicn_light/strategy.c b/ctrl/libhicnctrl/src/modules/hicn_light/strategy.c index 35e241f3e..16ce2d047 100644 --- a/ctrl/libhicnctrl/src/modules/hicn_light/strategy.c +++ b/ctrl/libhicnctrl/src/modules/hicn_light/strategy.c @@ -28,62 +28,28 @@ int hicnlight_strategy_serialize_list(const hc_object_t *object, assert(!object); return -1; } -#if 0 -// per prefix -static hc_result_t *_strategy_set_serialize(hc_sock_t *socket, - hc_strategy_t *strategy) { - return -1; - hc_result_t *res = malloc(sizeof(*res)); - char strategy_s[MAXSZ_HC_STRATEGY]; - strncpy(strategy->name, strategy_str(strategy->type), - MAXSZ_STRATEGY_NAME - 1); - - int rc = hc_strategy_snprintf(strategy_s, MAXSZ_HC_STRATEGY, strategy); - if (rc >= MAXSZ_HC_STRATEGY) - WARN("[hicnlight_strategy_create] Unexpected truncation of strategy string"); - DEBUG("[hicnlight_strategy_create] strategy=%s", strategy_s); - - if (!IS_VALID_FAMILY(strategy->family) || - !IS_VALID_STRATEGY_TYPE(strategy->type)) { - res->success = false; - return res; - } - - msg_strategy_set_t msg = {.header = - { - .message_type = REQUEST_LIGHT, - .command_id = COMMAND_TYPE_STRATEGY_SET, - .length = 1, - .seq_num = 0, - }, - .payload = { - .address = strategy->address, - .family = strategy->family, - .len = strategy->len, - .type = strategy->type, - }}; - - hc_command_params_t params = { - .cmd = ACTION_SET, - .cmd_id = COMMAND_TYPE_STRATEGY_SET, - .size_in = sizeof(cmd_strategy_set_t), - .size_out = 0, - .parse = NULL, - }; - *res = (hc_result_t){ - .msg = - (hc_msg_t){ - .header = msg.header, - .payload.strategy_set = msg.payload, - }, - .params = params, - .async = false, - .success = true, - }; - return res; +int hicnlight_strategy_serialize_set(const hc_object_t *object, + uint8_t *packet) { + const hc_strategy_t *strategy = &object->strategy; + + msg_strategy_set_t *msg = (msg_strategy_set_t *)packet; + *msg = (msg_strategy_set_t){.header = + { + .message_type = REQUEST_LIGHT, + .command_id = COMMAND_TYPE_STRATEGY_SET, + .length = 1, + .seq_num = 0, + }, + .payload = { + .address = strategy->address, + .family = strategy->family, + .len = strategy->len, + .type = strategy->type, + }}; + + return sizeof(msg_strategy_set_t); } -#endif #if 0 static hc_result_t *_strategy_add_local_prefix_serialize( @@ -143,39 +109,6 @@ static hc_result_t *_strategy_add_local_prefix_serialize( }; return res; } -#endif - -#if 0 -static int hicnlight_strategy_set(hc_sock_t *socket, hc_strategy_t *strategy) { - hc_result_t *result = _strategy_set_serialize(socket, strategy); - - int ret = INPUT_ERROR; - if (result->success) { - ret = hicnlight_execute_command(socket, (hc_msg_t *)&result->msg, - sizeof(result->msg), &result->params, NULL, - result->async); - } - - hc_result_free(result); - return ret; - return -1; // XXX added -} - -static int hicnlight_strategy_add_local_prefix(hc_sock_t *socket, - hc_strategy_t *strategy) { - hc_result_t *result = _strategy_add_local_prefix_serialize(socket, strategy); - - int ret = INPUT_ERROR; - if (result->success) { - ret = hicnlight_execute_command(socket, (hc_msg_t *)&result->msg, - sizeof(result->msg), &result->params, NULL, - result->async); - } - - hc_result_free(result); - return ret; - return -1; // XXX added -} /* How to retrieve that from the forwarder ? */ static const char *strategies[] = { diff --git a/ctrl/libhicnctrl/src/modules/hicn_light/subscription.c b/ctrl/libhicnctrl/src/modules/hicn_light/subscription.c index d00055e89..e2de09bf5 100644 --- a/ctrl/libhicnctrl/src/modules/hicn_light/subscription.c +++ b/ctrl/libhicnctrl/src/modules/hicn_light/subscription.c @@ -63,4 +63,9 @@ int hicnlight_subscription_serialize_list(const hc_object_t *object, return -1; } +int hicnlight_subscription_serialize_set(const hc_object_t *object, + uint8_t *packet) { + return -1; +} + DECLARE_MODULE_OBJECT_OPS(hicnlight, subscription); diff --git a/ctrl/libhicnctrl/src/modules/hicn_plugin/listener.c b/ctrl/libhicnctrl/src/modules/hicn_plugin/listener.c index f0aa4e884..0e9c5406d 100644 --- a/ctrl/libhicnctrl/src/modules/hicn_plugin/listener.c +++ b/ctrl/libhicnctrl/src/modules/hicn_plugin/listener.c @@ -181,4 +181,9 @@ static int vpp_listener_list(hc_sock_t *sock, hc_object_t *object, return _vpp_listener_list(sock, data); } +static int vpp_listener_set(hc_sock_t *sock, hc_object_t *object, + hc_data_t *data) { + return -1; +} + DECLARE_VPP_MODULE_OBJECT_OPS(vpp, listener); diff --git a/ctrl/libhicnctrl/src/modules/hicn_plugin/route.c b/ctrl/libhicnctrl/src/modules/hicn_plugin/route.c index 45aced9cb..e066862e2 100644 --- a/ctrl/libhicnctrl/src/modules/hicn_plugin/route.c +++ b/ctrl/libhicnctrl/src/modules/hicn_plugin/route.c @@ -538,4 +538,9 @@ static int vpp_route_list(hc_sock_t *sock, hc_object_t *object, return _vpp_route_list(sock, data); } +static int vpp_route_set(hc_sock_t *sock, hc_object_t *object, + hc_data_t *data) { + return -1; +} + DECLARE_VPP_MODULE_OBJECT_OPS(vpp, route); diff --git a/ctrl/libhicnctrl/src/objects/listener.c b/ctrl/libhicnctrl/src/objects/listener.c index 660a4931d..f7da6bd9c 100644 --- a/ctrl/libhicnctrl/src/objects/listener.c +++ b/ctrl/libhicnctrl/src/objects/listener.c @@ -135,8 +135,10 @@ int hc_listener_cmp(const hc_listener_t *l1, const hc_listener_t *l2) { rc = INT_CMP(l1->family, l2->family); if (rc != 0) return rc; - rc = strncmp(l1->interface_name, l2->interface_name, INTERFACE_LEN); - if (rc != 0) return rc; + if (!isempty(l1->interface_name) && !isempty(l2->interface_name)) { + rc = strncmp(l1->interface_name, l2->interface_name, INTERFACE_LEN); + if (rc != 0) return rc; + } rc = hicn_ip_address_cmp(&l1->local_addr, &l2->local_addr); if (rc != 0) return rc; diff --git a/lib/includes/hicn/base.h b/lib/includes/hicn/base.h index 2c80d42e6..dcbe47877 100644 --- a/lib/includes/hicn/base.h +++ b/lib/includes/hicn/base.h @@ -137,6 +137,10 @@ int hicn_packet_format_snprintf (char *s, size_t size, #define HICN_PACKET_FORMAT_NONE \ HICN_PACKET_FORMAT (IPPROTO_NONE, IPPROTO_NONE, IPPROTO_NONE, IPPROTO_NONE) +/* Default packet format */ + +#define HICN_PACKET_FORMAT_DEFAULT HICN_PACKET_FORMAT_IPV6_TCP + /** * @brief Return the hICN format with an additional AH header * @param [in] format - hICN packet format diff --git a/lib/src/base.c b/lib/src/base.c index 8c689da50..1852666a6 100644 --- a/lib/src/base.c +++ b/lib/src/base.c @@ -34,9 +34,9 @@ hicn_packet_format_snprintf (char *s, size_t size, hicn_packet_format_t format) int rc; HICN_PACKET_FORMAT_ENUMERATE (format, i, protocol, { - if (i > 1) + if (i > 0) { - rc = snprintf (cur, size - (cur - s), " %s ", "/"); + rc = snprintf (cur, size - (cur - s), "%s", "/"); if (rc < 0 || rc >= size - (cur - s)) return rc; cur += rc; diff --git a/libtransport/includes/hicn/transport/interfaces/socket_options_default_values.h b/libtransport/includes/hicn/transport/interfaces/socket_options_default_values.h index 11edae193..5558197f8 100644 --- a/libtransport/includes/hicn/transport/interfaces/socket_options_default_values.h +++ b/libtransport/includes/hicn/transport/interfaces/socket_options_default_values.h @@ -34,13 +34,8 @@ namespace interface { namespace default_values { // Packet format -// #define NEW_PACKET_FORMAT static constexpr hicn_packet_format_t packet_format = -#ifdef NEW_PACKET_FORMAT - HICN_PACKET_FORMAT_NEW; -#else - HICN_PACKET_FORMAT_IPV6_TCP; -#endif + HICN_PACKET_FORMAT_DEFAULT; // Parameters static const uint32_t interest_lifetime = 1001; // milliseconds diff --git a/tests/.env b/tests/.env index f36c66785..bda915201 100644 --- a/tests/.env +++ b/tests/.env @@ -12,3 +12,4 @@ TEST_VPP_MEMIF_REPLICATION=vpp-memif-replication RTC_PRODUCER=b002:0:0:0:abcd::/80 RAAQM_PRODUCER=b002::2 PING_PRODUCER=b002::3 +RAAQM_PRODUCER_NEW=b002::4 diff --git a/tests/2-nodes-hicn-light.yml b/tests/2-nodes-hicn-light.yml index e86bbc7ee..5e97c1069 100644 --- a/tests/2-nodes-hicn-light.yml +++ b/tests/2-nodes-hicn-light.yml @@ -60,6 +60,7 @@ services: hiperf -q -z hicnlight_module -S -R -B 4000kbps ${RTC_PRODUCER} -P 2 & hiperf -q -z hicnlight_module -S ${RAAQM_PRODUCER}/128 & + hiperf -q -z hicnlight_module -S ${RAAQM_PRODUCER_NEW}/128 & hicn-ping-server -z hicnlight_module -s 0 -n ${PING_PRODUCER}/128 & tail -f /dev/null diff --git a/tests/config.sh b/tests/config.sh index 8d36382d9..bf3cd668c 100755 --- a/tests/config.sh +++ b/tests/config.sh @@ -34,7 +34,9 @@ POSTPROCESS_COMMAND_RAAQM_RTC='tail -n +3 | \ }"' HIPERF_CMD_RAAQM="ENABLE_LOG_PREFIX=OFF /usr/bin/hiperf -q -n 50 -i 200 -C -H ${RAAQM_PRODUCER}" +HIPERF_CMD_RAAQM_NEW="ENABLE_LOG_PREFIX=OFF /usr/bin/hiperf -q -n 50 -i 200 -C -H ${RAAQM_PRODUCER} -w new" HIPERF_CMD_CBR="${HIPERF_CMD_RAAQM} -W 350 -M 0" +HIPERF_CMD_CBR_NEW="${HIPERF_CMD_RAAQM_NEW} -W 350 -M 0" HIPERF_CMD_MEMIF_RAAQM="${HIPERF_CMD_RAAQM} -z memif_module" HIPERF_CMD_MEMIF_CBR="${HIPERF_CMD_CBR} -z memif_module" @@ -76,11 +78,13 @@ declare -A tests=( ["vpp-memif-replication-rtc"]="${HIPERF_CMD_MEMIF_RTC} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_RAAQM_RTC}" ["hicn-light-requin"]="${HIPERF_CMD_RAAQM} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_RAAQM_RTC}" + ["hicn-light-requin-new"]="${HIPERF_CMD_RAAQM_NEW} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_RAAQM_RTC}" ["vpp-bridge-requin"]="${HIPERF_CMD_MEMIF_RAAQM} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_RAAQM_RTC}" ["vpp-memif-requin"]="${HIPERF_CMD_MEMIF_RAAQM} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_RAAQM_RTC}" ["vpp-memif-replication-requin"]="${HIPERF_CMD_MEMIF_RAAQM} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_RAAQM_RTC}" ["hicn-light-cbr"]="${HIPERF_CMD_CBR} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_RAAQM_RTC}" + ["hicn-light-cbr-new"]="${HIPERF_CMD_CBR_NEW} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_RAAQM_RTC}" ["vpp-bridge-cbr"]="${HIPERF_CMD_MEMIF_CBR} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_RAAQM_RTC}" ["vpp-memif-cbr"]="${HIPERF_CMD_MEMIF_CBR} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_RAAQM_RTC}" ["vpp-memif-replication-cbr"]="${HIPERF_CMD_MEMIF_CBR} 2>&1 | tee >(>&2 cat) | ${POSTPROCESS_COMMAND_RAAQM_RTC}" diff --git a/tests/functional-tests/2-nodes-hicn-light.robot b/tests/functional-tests/2-nodes-hicn-light.robot index e23c35e6a..fedcc9797 100644 --- a/tests/functional-tests/2-nodes-hicn-light.robot +++ b/tests/functional-tests/2-nodes-hicn-light.robot @@ -13,9 +13,15 @@ Resource resources/libraries/robot/runtest.robot Throughput Testing Raaqm Mobile Run Throughput Test Raaqm hicn-light 200 500 400 +Throughput Testing Raaqm Mobile New + Run Throughput Test Raaqm New hicn-light 200 500 400 + Throughput Testing CBR Mobile Run Throughput Test CBR hicn-light 200 500 400 +Throughput Testing CBR Mobile New + Run Throughput Test CBR New hicn-light 200 500 400 + RTC Testing Mobile Run RTC Test hicn-light 4 4 4 diff --git a/tests/resources/libraries/robot/runtest.robot b/tests/resources/libraries/robot/runtest.robot index 379b4d307..9a3da8647 100644 --- a/tests/resources/libraries/robot/runtest.robot +++ b/tests/resources/libraries/robot/runtest.robot @@ -24,18 +24,26 @@ 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}' == 'requin-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 IF '${TESTID}' == 'latency' 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}' == 'cbr' - 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 IF '${TESTID}' == 'cbr' + 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}' == 'cbr-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 @@ -75,6 +83,16 @@ Run Throughput Test Raaqm [Arguments] ${TEST_SETUP}=${NONE} ${EXPECTED_MIN}=${NONE} ${EXPECTED_MAX}=${NONE} ${EXPECTED_AVG}=${NONE} Run Test ${TEST_SETUP} requin ${EXPECTED_MIN} ${EXPECTED_MAX} ${EXPECTED_AVG} +Run Throughput Test Raaqm New + [Documentation] Run hiperf on the ${TEST_SETUP} topology and measure throughput. + ... Arguments: + ... ${TEST_SETUP} The setup of the test. + ... ${EXPECTED_MIN} The expected min throughput + ... ${EXPECTED_MAX} The expected max throughput + ... ${EXPECTED_AVG} The expected avg throughput + [Arguments] ${TEST_SETUP}=${NONE} ${EXPECTED_MIN}=${NONE} ${EXPECTED_MAX}=${NONE} ${EXPECTED_AVG}=${NONE} + Run Test ${TEST_SETUP} requin ${EXPECTED_MIN} ${EXPECTED_MAX} ${EXPECTED_AVG} + Run Throughput Test CBR [Documentation] Run hiperf on the ${TEST_SETUP} topology and measure throughput. ... Arguments: @@ -85,6 +103,16 @@ Run Throughput Test CBR [Arguments] ${TEST_SETUP}=${NONE} ${EXPECTED_MIN}=${NONE} ${EXPECTED_MAX}=${NONE} ${EXPECTED_AVG}=${NONE} Run Test ${TEST_SETUP} cbr ${EXPECTED_MIN} ${EXPECTED_MAX} ${EXPECTED_AVG} +Run Throughput Test CBR New + [Documentation] Run hiperf on the ${TEST_SETUP} topology and measure throughput. + ... Arguments: + ... ${TEST_SETUP} The setup of the test. + ... ${EXPECTED_MIN} The expected min throughput + ... ${EXPECTED_MAX} The expected max throughput + ... ${EXPECTED_AVG} The expected avg throughput + [Arguments] ${TEST_SETUP}=${NONE} ${EXPECTED_MIN}=${NONE} ${EXPECTED_MAX}=${NONE} ${EXPECTED_AVG}=${NONE} + Run Test ${TEST_SETUP} cbr ${EXPECTED_MIN} ${EXPECTED_MAX} ${EXPECTED_AVG} + Run RTC Test [Documentation] Run hiperf RTC on the ${TEST_SETUP} topology and check consumer syncs to producer bitrate. ... Arguments: |