Whamcloud - gitweb
LU-1896 tests: check Lustre version in sanity test 154
authorYu Jian <yujian@whamcloud.com>
Tue, 18 Sep 2012 04:05:31 +0000 (12:05 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 21 Sep 2012 12:25:03 +0000 (08:25 -0400)
We need to check Lustre version to make sure the test for
new fixup/feature does not run on unsupported Lustre version.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I63f9c2de6f76fda4758d0c92ee924d9b22570ff6
Reviewed-on: http://review.whamcloud.com/4019
Tested-by: Hudson
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index 6d8d4d0..cec2c8c 100644 (file)
@@ -7805,6 +7805,9 @@ test_153() {
 run_test 153 "test if fdatasync does not crash ======================="
 
 test_154() {
 run_test 153 "test if fdatasync does not crash ======================="
 
 test_154() {
+       [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.2.51) ]] ||
+               { skip "Need MDS version at least 2.2.51"; return 0; }
+
        cp /etc/hosts $DIR/$tfile
 
        fid=$($LFS path2fid $DIR/$tfile)
        cp /etc/hosts $DIR/$tfile
 
        fid=$($LFS path2fid $DIR/$tfile)