Whamcloud - gitweb
LU-8387 test: fix check in sanity test_129 56/21256/6
authorWang Shilong <wshilong@ddn.com>
Tue, 12 Jul 2016 07:56:03 +0000 (15:56 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 11 Aug 2016 05:51:32 +0000 (05:51 +0000)
[ $has_warning ] always return 0 which makes this check
useless, fix it.

Test-Parameters: trivial

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I74f920a0940516230c7d25f13b75ad354c3f8348
Reviewed-on: http://review.whamcloud.com/21256
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
lustre/tests/sanity.sh

index dab737d..50b3bfa 100755 (executable)
@@ -8888,9 +8888,9 @@ test_129() {
                return
        fi
        remote_mds_nodsh && skip "remote MDS with nodsh" && return
-       ENOSPC=28
-       EFBIG=27
-       has_warning=0
+       local ENOSPC=28
+       local EFBIG=27
+       local has_warning=0
 
        rm -rf $DIR/$tdir
        mkdir -p $DIR/$tdir
@@ -8922,7 +8922,7 @@ test_129() {
                        check_mds_dmesg '"has reached"' ||
                                error_exit "has reached message should be output"
 
-                       [ $has_warning ] ||
+                       [ $has_warning -eq 0 ] &&
                                error_exit "warning message should be output"
 
                        I=$(stat -c%s "$DIR/$tdir")