Whamcloud - gitweb
LU-15358 tests: Variable incorrectly defined under sanityn 19/45819/2
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Fri, 10 Dec 2021 04:34:26 +0000 (10:04 +0530)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Dec 2021 07:21:26 +0000 (07:21 +0000)
Under sanityn.sh/print_jbd_stat() local variable
was incorrectly defined. This was exposed using
shellcheck.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In lustre/tests/sanityn.sh line 950:
local varcvs
      ^-- SC2034: varcvs appears unused. Verify it or export it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Test-Parameters: trivial testlist=sanityn
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I7b2f62c15e420a4c6f5d71445a2e940816e20098
Reviewed-on: https://review.whamcloud.com/45819
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
lustre/tests/sanityn.sh

index 70a6af7..2cbb21f 100755 (executable)
@@ -945,22 +945,23 @@ test_32b() { # bug 11270
 #run_test 32b "lockless i/o"
 
 print_jbd_stat () {
 #run_test 32b "lockless i/o"
 
 print_jbd_stat () {
-    local dev
-    local mdts=$(get_facets MDS)
-    local varcvs
-    local mds
-
-    local stat=0
-    for mds in ${mdts//,/ }; do
-        varsvc=${mds}_svc
-        dev=$(basename $(do_facet $mds "lctl get_param -n osd*.${!varsvc}.mntdev|\
-               xargs readlink -f" ))
-       val=$(do_facet $mds "cat /proc/fs/jbd*/${dev}{,:*,-*}/info 2>/dev/null |
-               head -n1")
-        val=${val%% *};
-        stat=$(( stat + val))
-    done
-    echo $stat
+       local mdts=$(get_facets MDS)
+       local stat=0
+       local varsvc
+       local dev
+       local mds
+
+       for mds in ${mdts//,/ }; do
+               varsvc=${mds}_svc
+
+               dev=$(basename $(do_facet $mds "lctl get_param -n \
+                       osd*.${!varsvc}.mntdev | xargs readlink -f"))
+               val=$(do_facet $mds "cat /proc/fs/jbd*/${dev}{,:*,-*}/info \
+                       2>/dev/null | head -n1")
+               val=${val%% *};
+               stat=$((stat + val))
+       done
+       echo $stat
 }
 
 # commit on sharing tests
 }
 
 # commit on sharing tests