Whamcloud - gitweb
LU-11797 tests: improve sanity test 272a checking 89/33889/3
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 18 Dec 2018 18:57:46 +0000 (11:57 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 18 Feb 2019 06:38:14 +0000 (06:38 +0000)
Improve sanity.sh test_272a() to check data integrity before it
checks the stripe count.  Also, print out the stripe count if it
does not match our expectations.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I75397f251f10ed00c3dea9f80243d7ba9eacab07
Reviewed-on: https://review.whamcloud.com/33889
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index 4ae7a1d..0e40777 100755 (executable)
@@ -17506,14 +17506,13 @@ test_272a() {
        $LFS migrate -E 256K -L mdt -E -1 -c2 $dom ||
                error "failed to migrate to the same DoM component"
 
-       [ $($LFS getstripe -c $dom) -eq 2 ] ||
-               error "layout was not changed silently"
-
        local new_md5=$(md5sum $dom)
 
-       [ "$old_md5" != "$new_md5" ] &&
+       [ "$old_md5" == "$new_md5" ] ||
                error "md5sum differ: $old_md5, $new_md5"
-       return 0
+
+       [ $($LFS getstripe -c $dom) -eq 2 ] ||
+               error "migrate stripe count bad: $(LFS getstripe -c $dom) != 2"
 }
 run_test 272a "DoM migration: new layout with the same DOM component"