Whamcloud - gitweb
LU-13709 tests: test lfs mkdir -c without -i
[fs/lustre-release.git] / lustre / tests / sanity-lnet.sh
index c97dd3d..1c09c20 100755 (executable)
@@ -12,10 +12,10 @@ ONLY=${ONLY:-"$*"}
 ALWAYS_EXCEPT="$SANITY_LNET_EXCEPT "
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
-# skip test ARM testing until they are fixed
+# skip the grant tests for ARM until they are fixed
 if [[ $(uname -m) = aarch64 ]]; then
-       # bug number for skipped test: LU-13704 LU-13701 LU-13701 LU-13701
-       ALWAYS_EXCEPT+="               204      205      206      207 "
+       # bug number:    LU-14067
+       ALWAYS_EXCEPT+=" 300"
 fi
 
 [ "$SLOW" = "no" ] && EXCEPT_SLOW=""
@@ -951,10 +951,14 @@ test_99a() {
        do_lnetctl peer del --prim_nid 1.1.1.1@o2ib &&
                error "Command should have failed"
 
-       echo "Don't provide mandatory arguments peer del"
+       echo "Don't provide mandatory argument for peer del"
        do_lnetctl peer del --nid 1.1.1.1@tcp &&
                error "Command should have failed"
 
+       echo "Don't provide mandatory argument for peer add"
+       do_lnetctl peer add --nid 1.1.1.1@tcp &&
+               error "Command should have failed"
+
        echo "Don't provide mandatory arguments peer add"
        do_lnetctl peer add &&
                error "Command should have failed"
@@ -988,7 +992,7 @@ test_99a() {
        local nidstr
        for nidstr in ${invalid_strs}; do
                echo "Check invalid nidstring - '$nidstr'"
-               do_lnetctl peer add --nid $nidstr &&
+               do_lnetctl peer add --prim_nid 1.1.1.1@tcp --nid $nidstr &&
                        error "Command should have failed"
        done
 
@@ -1174,6 +1178,63 @@ test_103() {
 }
 run_test 103 "Delete route with multiple gw (tcp)"
 
+test_104() {
+       local tyaml="$TMP/sanity-lnet-$testnum-expected.yaml"
+
+       reinit_dlc || return $?
+
+       # Default value is '3'
+       local val=$($LNETCTL global show | awk '/response_tracking/{print $NF}')
+       [[ $val -ne 3 ]] &&
+               error "Expect 3 found $val"
+
+       echo "Set < 0;  Should fail"
+       do_lnetctl set response_tracking -1 &&
+                error "should have failed $?"
+
+       reinit_dlc || return $?
+       cat <<EOF > $tyaml
+global:
+    response_tracking: -10
+EOF
+       do_lnetctl import < $tyaml &&
+               error "should have failed $?"
+
+       echo "Check valid values; Should succeed"
+       local i
+       for ((i = 0; i < 4; i++)); do
+               reinit_dlc || return $?
+               do_lnetctl set response_tracking $i ||
+                        error "should have succeeded $?"
+               $LNETCTL global show | grep -q "response_tracking: $i" ||
+                       error "Failed to set response_tracking to $i"
+               reinit_dlc || return $?
+               cat <<EOF > $tyaml
+global:
+    response_tracking: $i
+EOF
+               do_lnetctl import < $tyaml ||
+                       error "should have succeeded $?"
+               $LNETCTL global show | grep -q "response_tracking: $i" ||
+                       error "Failed to set response_tracking to $i"
+       done
+
+       reinit_dlc || return $?
+       echo "Set > 3; Should fail"
+       do_lnetctl set response_tracking 4 &&
+                error "should have failed $?"
+
+       reinit_dlc || return $?
+       cat <<EOF > $tyaml
+global:
+    response_tracking: 10
+EOF
+       do_lnetctl import < $tyaml &&
+               error "should have failed $?"
+       return 0
+}
+run_test 104 "Set/check response_tracking param"
+
 ### load lnet in default namespace, configure in target namespace
 
 test_200() {