aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2019-05-20 15:18:35 +0530
committermwasilew <milosz.wasilewski@linaro.org>2019-05-23 12:12:49 +0100
commit9b665e83b0b24a356fbc0c2900ef3a85246db830 (patch)
tree249a29b0d97fd69af66f67965337252fb81c6e5d
parent3f6b7c989dc09a96935d961b32f9c1829fab28d7 (diff)
network-basic: skip set interface down on NFS mounted fs2019.05
x86 running network basic test failed to make clean exit because test case set network interface down and NFS lost connection. so NFS parameter introduced to skip "set interface down" command when NFS is true. + echo 'ip-link-interface-down pass' [ 241.270557] nfs: server 10.66.16.116 not responding, still trying [ 241.270569] nfs: server 10.66.16.116 not responding, still trying ref: https://lkft.validation.linaro.org/scheduler/job/735083#L1575 Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
-rwxr-xr-xautomated/linux/network-basic/network-basic.sh16
-rw-r--r--automated/linux/network-basic/network-basic.yaml3
2 files changed, 15 insertions, 4 deletions
diff --git a/automated/linux/network-basic/network-basic.sh b/automated/linux/network-basic/network-basic.sh
index 3e33f288..ff56c156 100755
--- a/automated/linux/network-basic/network-basic.sh
+++ b/automated/linux/network-basic/network-basic.sh
@@ -5,16 +5,18 @@
OUTPUT="$(pwd)/output"
RESULT_FILE="${OUTPUT}/result.txt"
export RESULT_FILE
+NFS="false"
usage() {
- echo "Usage: $0 [-s <true|false>] [-i <interface>]" 1>&2
+ echo "Usage: $0 [-s <true|false>] [-i <interface>] [-n <true|false>]" 1>&2
exit 1
}
-while getopts "s:i:" o; do
+while getopts "s:i:n:" o; do
case "$o" in
s) SKIP_INSTALL="${OPTARG}" ;;
i) INTERFACE="${OPTARG}" ;;
+ n) NFS="${OPTARG}" ;;
*) usage ;;
esac
done
@@ -50,7 +52,15 @@ run "route" "print-routing-tables"
run "ip link set lo up" "ip-link-loopback-up"
run "route" "route-dump-after-ip-link-loopback-up"
run "ip link set ${INTERFACE} up" "ip-link-interface-up"
-run "ip link set ${INTERFACE} down" "ip-link-interface-down"
+# NFS mounted filesystem hangs when interface set down
+# so skip "ip link set <interface> down" when NFS is not false
+
+if [ "${NFS}" = "false" ] || [ "${NFS}" = "False" ]; then
+ run "ip link set ${INTERFACE} down" "ip-link-interface-down"
+else
+ info_msg "Skipping ip link set ${INTERFACE} down on NFS mounted file systems"
+ report_skip "ip-link-interface-down"
+fi
dist_name
# shellcheck disable=SC2154
diff --git a/automated/linux/network-basic/network-basic.yaml b/automated/linux/network-basic/network-basic.yaml
index 5f2da7d4..75efec90 100644
--- a/automated/linux/network-basic/network-basic.yaml
+++ b/automated/linux/network-basic/network-basic.yaml
@@ -28,10 +28,11 @@ metadata:
params:
INTERFACE: ""
+ NFS: "false"
SKIP_INSTALL: "False"
run:
steps:
- cd ./automated/linux/network-basic/
- - ./network-basic.sh -s "${SKIP_INSTALL}" -i "${INTERFACE}"
+ - ./network-basic.sh -s "${SKIP_INSTALL}" -i "${INTERFACE}" -n "${NFS}"
- ../../utils/send-to-lava.sh ./output/result.txt