From: Nikolay Borisov Date: Fri, 17 Nov 2017 14:23:04 +0000 (+0200) Subject: LU-10255 tests: Fix wrong comparison operator in sanity 129 X-Git-Tag: 2.10.56~24 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F30149%2F3;p=fs%2Flustre-release.git LU-10255 tests: Fix wrong comparison operator in sanity 129 Currently sanity 129 uses numerica (-eq) operator to check whether the has_warning variable is true or false depending on whether expected warnings have been detected. This is wrong since bash doesn't really have bolean types and true/false are not evaluated to 1/0. This results in the following bash error when the test is run: ./sanity.sh: line 9244: [: true: integer expression expected Fix it by using the correct string operator '=' to check for correct value. Test-Paramters: clientdistro=sles12sp2 testlist=sanity Test-Paramters: clientdistro=sles12sp3 testlist=sanity Signed-off-by: Nikolay Borisov Change-Id: I071dcb3001ea9b2e5806d346dcd48bfcaf3297e9 Reviewed-on: https://review.whamcloud.com/30149 Reviewed-by: James Nunez Tested-by: Jenkins Reviewed-by: Saurabh Tandan Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index bb2a49e..b2d4820 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -9332,7 +9332,7 @@ test_129() { check_mds_dmesg '"has reached"' || error_exit "reached message should be output" - [ $has_warning -eq 0 ] && + [ $has_warning = "false" ] && error_exit "warning message should be output" dirsize=$(stat -c%s "$DIR/$tdir")