summaryrefslogtreecommitdiff
path: root/automated/linux
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2016-12-06 23:55:40 +0530
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2016-12-07 10:04:04 +0000
commitfeeac78402a51cd2e61bc22f05efd5878ce0285d (patch)
treef0cc0dde10d070fc88c0f26661163473a382125b /automated/linux
parente467b0934892607820ce19276099946858566afb (diff)
linux: ethernet: fix ping and get default route
Change-Id: Ie3b4dbc0e09078da9e9de6805e3bf5511a606c3c Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Diffstat (limited to 'automated/linux')
-rwxr-xr-xautomated/linux/ethernet/ethernet.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/automated/linux/ethernet/ethernet.sh b/automated/linux/ethernet/ethernet.sh
index 12fbec6..67f7e28 100755
--- a/automated/linux/ethernet/ethernet.sh
+++ b/automated/linux/ethernet/ethernet.sh
@@ -44,7 +44,7 @@ IP_ADDR=$(ip addr show "${INTERFACE}" | grep -a2 "state UP" | tail -1 | awk '{pr
exit_on_fail "ethernet-ping-state-UP" "ethernet-ping-route"
# Get default Route IP address of a given interface
-ROUTE_ADDR=$(ip route list | grep default | awk '{print $3}')
+ROUTE_ADDR=$(ip route list | grep default | awk '{print $3}' | head -1)
# Run the test
-run_test_case "ping ${ROUTE_ADDR} -c 5" "ethernet-ping-route"
+run_test_case "ping -c 5 ${ROUTE_ADDR}" "ethernet-ping-route"