diff options
author | Ryan Harkin <ryan.harkin@linaro.org> | 2021-01-22 02:21:56 +0000 |
---|---|---|
committer | Ryan Harkin <ryan.harkin@linaro.org> | 2021-01-22 02:21:56 +0000 |
commit | 077a87429ab77a03712ed2244c1b6b2281ea3951 (patch) | |
tree | 1cceb3f3440c73253613b7b12f5ebe794cd40b1e | |
parent | 58e5eb9569450aa1713b2dff65797fccb215740d (diff) |
network-test: more cleanupslinaro-20210122-001
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rwxr-xr-x | automated/linux/network-test/network-test.sh | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/automated/linux/network-test/network-test.sh b/automated/linux/network-test/network-test.sh index 6ed4421..55db60d 100755 --- a/automated/linux/network-test/network-test.sh +++ b/automated/linux/network-test/network-test.sh @@ -68,6 +68,7 @@ dump_msg_cache(){ wait_for_msg(){ local message="${1}" local msgseq="${2}" + local ipaddress while [ true ]; do # Wait for the daemon to respond @@ -81,13 +82,10 @@ wait_for_msg(){ if [ "${rx_msgseq}" -lt "${msgseq}" ]; then echo "Client: ignoring duplicate message (${rx_msgseq} < ${msgseq})" rm -f /tmp/lava_multi_node_cache.txt - - echo -n "Sleeping for at $(date) ... " sleep 10 - echo " until $(date)" # While we're waiting for a message, do a sanity check on our IP address - local ipaddress=$(get_ipaddr ${ETH}) + ipaddress=$(get_ipaddr ${ETH}) if [ "${ipaddress}" != "${IPADDR}" ]; then echo "ERROR: our IP address changes from ${IPADDR} to ${ipaddress} while we were waiting" fi @@ -626,36 +624,20 @@ else esac fi -command_exists "lava-echo-ipv4" command_exists "lava-send" command_exists "lava-wait" command_exists "ping" -dump_msg_cache -rm -f /tmp/lava_multi_node_cache.txt - -echo "################################################################################" -ip addr show -echo "################################################################################" - -IPADDR=$(get_ipaddr $ETH) -is_valid_ip "${IPADDR}" -if [ $? != 0 ]; then - echo "WARNING: ipaddr '${IPADDR}' is invalid" -else - echo "My IP address is ${IPADDR}" -fi - # TODO - some commands *need* an IP address configured for the interface, eg. ping # others don't, eg. configure-interface # Exit early in these specific circumstances - ipaddr_mandatory=true case "${CMD}" in "configure-interface" | "finished") ipaddr_mandatory=false ;; esac +IPADDR=$(get_ipaddr $ETH) if [ "${ipaddr_mandatory}" = "true" ]; then is_valid_ip "${IPADDR}" if [ $? != 0 ]; then @@ -729,9 +711,7 @@ case "$CMD" in if [ "${msgseq}" = "${previous_msgseq}" ]; then echo "Daemon: ignoring duplicate message ${msgseq}" - echo -n "Sleeping for at $(date) ... " sleep 10 - echo " until $(date)" continue fi |