diff options
author | Luca Muscariello <muscariello@ieee.org> | 2023-01-31 12:19:54 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2023-01-31 12:19:54 +0000 |
commit | f72846be51c7fd70310ea166cfc2ffbdc930f0e6 (patch) | |
tree | abab210c50eb6679b346d0c431d207d072630cd4 | |
parent | 0114da8f9cc492546c5dae21f4116997e073c397 (diff) | |
parent | 1db196beea9bbb9e78ad42abcdc0a1754ca19eed (diff) |
Merge "feat(tests): add HMAC to functional tests"
-rw-r--r-- | libtransport/includes/hicn/transport/auth/crypto_hash.h | 2 | ||||
-rw-r--r-- | libtransport/src/auth/crypto_hash.cc | 2 | ||||
-rw-r--r-- | tests/.env | 5 | ||||
-rw-r--r-- | tests/2-nodes-hicn-light.yml | 2 | ||||
-rw-r--r-- | tests/2-nodes-vpp-bridge.yml | 2 | ||||
-rw-r--r-- | tests/2-nodes-vpp-memif-replication.yml | 2 | ||||
-rw-r--r-- | tests/2-nodes-vpp-memif.yml | 2 | ||||
-rwxr-xr-x | tests/config.sh | 2 |
8 files changed, 11 insertions, 8 deletions
diff --git a/libtransport/includes/hicn/transport/auth/crypto_hash.h b/libtransport/includes/hicn/transport/auth/crypto_hash.h index fbe1d5160..9535e07c7 100644 --- a/libtransport/includes/hicn/transport/auth/crypto_hash.h +++ b/libtransport/includes/hicn/transport/auth/crypto_hash.h @@ -40,7 +40,7 @@ class CryptoHash { // Constructors CryptoHash(); CryptoHash(const CryptoHash &other); - CryptoHash(CryptoHash &&other); + CryptoHash(CryptoHash &&other) noexcept; CryptoHash(CryptoHashType hash_type); CryptoHash(const uint8_t *hash, std::size_t size, CryptoHashType hash_type); CryptoHash(const std::vector<uint8_t> &hash, CryptoHashType hash_type); diff --git a/libtransport/src/auth/crypto_hash.cc b/libtransport/src/auth/crypto_hash.cc index 0f6e9ab53..cf781d08e 100644 --- a/libtransport/src/auth/crypto_hash.cc +++ b/libtransport/src/auth/crypto_hash.cc @@ -27,7 +27,7 @@ CryptoHash::CryptoHash(const CryptoHash &other) digest_(other.digest_), digest_size_(other.digest_size_) {} -CryptoHash::CryptoHash(CryptoHash &&other) +CryptoHash::CryptoHash(CryptoHash &&other) noexcept : digest_type_(std::move(other.digest_type_)), digest_(std::move(other.digest_)), digest_size_(other.digest_size_) {} diff --git a/tests/.env b/tests/.env index 3eeee90c4..1e06ca0c8 100644 --- a/tests/.env +++ b/tests/.env @@ -9,12 +9,15 @@ TEST_VPP_MEMIF=vpp-memif TEST_VPP_MEMIF_REPLICATION=vpp-memif-replication TEST_VPP_MEMIF_LOCALREMOTE=vpp-memif-local-remote -# names +# Names RTC_PRODUCER=b002:0:0:0:abcd::/80 RAAQM_PRODUCER=b002::2 PING_PRODUCER=b002::3 RAAQM_PRODUCER_NEW=b002::4 +# Test keys +HMAC_KEY="hunter2" + # Log FORWARDER_LOG_PATH=/tmp/forwarder.log diff --git a/tests/2-nodes-hicn-light.yml b/tests/2-nodes-hicn-light.yml index 50b756f26..849432464 100644 --- a/tests/2-nodes-hicn-light.yml +++ b/tests/2-nodes-hicn-light.yml @@ -45,7 +45,7 @@ services: sleep 4 - hiperf -q -z hicnlight_module -S -R -B 4000kbps ${RTC_PRODUCER} -P 2 & + hiperf -q -z hicnlight_module -S -R -B 4000kbps ${RTC_PRODUCER} -P 2 -k ${HMAC_KEY} & 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 & diff --git a/tests/2-nodes-vpp-bridge.yml b/tests/2-nodes-vpp-bridge.yml index a64fe057a..e9d0cf809 100644 --- a/tests/2-nodes-vpp-bridge.yml +++ b/tests/2-nodes-vpp-bridge.yml @@ -105,7 +105,7 @@ services: sudo vpp -c /etc/vpp/startup.conf sleep 5 - sudo hiperf -q -S -R -B 4000kbps -z memif_module ${RTC_PRODUCER} -P 2 & + sudo hiperf -q -S -R -B 4000kbps -z memif_module ${RTC_PRODUCER} -P 2 -k ${HMAC_KEY} & sleep 1 sudo hiperf -q -S -z memif_module ${RAAQM_PRODUCER}/128 & sleep 1 diff --git a/tests/2-nodes-vpp-memif-replication.yml b/tests/2-nodes-vpp-memif-replication.yml index 68836902f..f74757aac 100644 --- a/tests/2-nodes-vpp-memif-replication.yml +++ b/tests/2-nodes-vpp-memif-replication.yml @@ -115,7 +115,7 @@ services: sudo vpp -c /etc/vpp/startup.conf sleep 10 - sudo hiperf -q -S -R -B 4000kbps -z memif_module ${RTC_PRODUCER} -P 2 & + sudo hiperf -q -S -R -B 4000kbps -z memif_module ${RTC_PRODUCER} -P 2 -k ${HMAC_KEY} & sleep 5 sudo hiperf -q -S -z memif_module ${RAAQM_PRODUCER}/128 & sleep 5 diff --git a/tests/2-nodes-vpp-memif.yml b/tests/2-nodes-vpp-memif.yml index 0472b8299..7240f8b2c 100644 --- a/tests/2-nodes-vpp-memif.yml +++ b/tests/2-nodes-vpp-memif.yml @@ -107,7 +107,7 @@ services: sudo vpp -c /etc/vpp/startup.conf sleep 10 - sudo hiperf -q -S -R -B 4000kbps -z memif_module ${RTC_PRODUCER} -P 2 & + sudo hiperf -q -S -R -B 4000kbps -z memif_module ${RTC_PRODUCER} -P 2 -k ${HMAC_KEY} & sleep 5 sudo hiperf -q -S -z memif_module ${RAAQM_PRODUCER}/128 & sleep 5 diff --git a/tests/config.sh b/tests/config.sh index 760de8b08..00d148e42 100755 --- a/tests/config.sh +++ b/tests/config.sh @@ -16,7 +16,7 @@ BUILD_SOFTWARE=${BUILD_SOFTWARE:-1} PRIVILEGED=${TEST_PRIVILEGED:-false} set +a -HIPERF_CMD_RTC="ENABLE_LOG_PREFIX=OFF /usr/bin/hiperf -q -n 50 -C -H -R ${RTC_PRODUCER} -P 2" +HIPERF_CMD_RTC="ENABLE_LOG_PREFIX=OFF /usr/bin/hiperf -q -n 50 -C -H -R ${RTC_PRODUCER} -P 2 -k ${HMAC_KEY}" HIPERF_CMD_MEMIF_RTC="${HIPERF_CMD_RTC} -z memif_module" POSTPROCESS_COMMAND_RAAQM_RTC='tail -n +3 | \ tr -s " " | \ |