From 35531ce8bd1bfd79808723ee843f5ca8e10e105d Mon Sep 17 00:00:00 2001 From: Nikolay Borisov Date: Fri, 17 Nov 2017 16:23:04 +0200 Subject: [PATCH] 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 --- lustre/tests/sanity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- 1.8.3.1