Whamcloud - gitweb
LU-1491 tests: check Lustre version in conf-sanity test 62
authorYu Jian <yujian@whamcloud.com>
Tue, 18 Sep 2012 03:36:27 +0000 (11:36 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 21 Sep 2012 12:26:13 +0000 (08:26 -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: I57f76444c13433c972067d41735e52f3d8e9e440
Reviewed-on: http://review.whamcloud.com/4018
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/conf-sanity.sh

index bc3a286..27e3e62 100644 (file)
@@ -2897,18 +2897,21 @@ test_61() { # LU-80
 run_test 61 "large xattr"
 
 test_62() {
 run_test 61 "large xattr"
 
 test_62() {
-    # MRP-118
-    local mdsdev=$(mdsdevname 1)
-    local ostdev=$(ostdevname 1)
-
-    echo "disable journal for mds"
-    do_facet mds tune2fs -O ^has_journal $mdsdev || error "tune2fs failed"
-    start_mds && error "MDT start should fail"
-    echo "disable journal for ost"
-    do_facet ost1 tune2fs -O ^has_journal $ostdev || error "tune2fs failed"
-    start_ost && error "OST start should fail"
-    cleanup || return $?
-    reformat_and_config
+       # MRP-118
+       local mdsdev=$(mdsdevname 1)
+       local ostdev=$(ostdevname 1)
+
+       [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.2.51) ]] ||
+               { skip "Need MDS version at least 2.2.51"; return 0; }
+
+       echo "disable journal for mds"
+       do_facet mds tune2fs -O ^has_journal $mdsdev || error "tune2fs failed"
+       start_mds && error "MDT start should fail"
+       echo "disable journal for ost"
+       do_facet ost1 tune2fs -O ^has_journal $ostdev || error "tune2fs failed"
+       start_ost && error "OST start should fail"
+       cleanup || return $?
+       reformat_and_config
 }
 run_test 62 "start with disabled journal"
 
 }
 run_test 62 "start with disabled journal"