From: Elena Gryaznova Date: Mon, 9 Apr 2018 18:39:05 +0000 (+0300) Subject: LU-10834 tests: fix cleanup_77c() defect X-Git-Tag: 2.11.51~16 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=5fc3c6a4fadcadb4838eedc39695b41984c7c0fa;p=fs%2Flustre-release.git LU-10834 tests: fix cleanup_77c() defect Check the length of string is non-zero properly. Without this fix cleanup_77c() calls: "rm -f *" in case of empty $osc_file_prefix, and "do_facet ost1 rm -f *" in case of empty $ost_file_prefix Signed-off-by: Elena Gryaznova Cray-bug-id: LUS-5817 Test-Parameters: trivial testlist=sanity envdefinitions="ONLY=77c" Reviewed-by: Vladimir Saveliev Reviewed-by: Andrew Perepechko Change-Id: Id3f3ec52c965b15900f7a649120b89267daa9810 Reviewed-on: https://review.whamcloud.com/31918 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 50e7abd..c537772 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -7003,8 +7003,8 @@ cleanup_77c() { $LCTL set_param osc.*osc-[^mM]*.checksum_dump=0 $check_ost && do_facet ost1 $LCTL set_param obdfilter.*-OST*.checksum_dump=0 - [ -n $osc_file_prefix ] && rm -f ${osc_file_prefix}* - $check_ost && [ -n $ost_file_prefix ] && + [ -n "$osc_file_prefix" ] && rm -f ${osc_file_prefix}* + $check_ost && [ -n "$ost_file_prefix" ] && do_facet ost1 rm -f ${ost_file_prefix}\* }