This was originally reported by shellcheck as
unused variable. However, on closer inspection
it appears that the restore on "EXIT" was
hard-coded to 0 (mostly this should be correct)
instead of using the original value of $old
This patch resets 'enable_chprojid_gid' value
to original value captured in $old instead of
hard-coded value of 0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In ./lustre/tests/sanity-quota.sh line 4150:
local old=$(do_facet mds1 $LCTL get_param -n \
^-- SC2034: old appears unused. Verify it or export it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Test-Parameters: trivial testlist=sanity-quota
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I31e7a8a931d53a1fcb9d77ecf1759fce572bd52c
Reviewed-on: https://review.whamcloud.com/45821
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
local testdir=$DIR/$tdir/foo
do_facet mds1 $LCTL set_param mdt.*.enable_chprojid_gid=0
- stack_trap "do_facet mds1 $LCTL set_param mdt.*.enable_chprojid_gid=0" \
- EXIT
+ stack_trap "do_facet mds1 $LCTL \
+ set_param mdt.*.enable_chprojid_gid=$old" EXIT
mkdir_on_mdt0 $testdir || error "failed to mkdir"
chown -R $TSTID:$TSTID $testdir