From 7c27428ab6535c1fb569e9951678ff5ace938952 Mon Sep 17 00:00:00 2001 From: Yu Jian Date: Tue, 18 Sep 2012 11:36:27 +0800 Subject: [PATCH] LU-1491 tests: check Lustre version in conf-sanity test 62 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 Change-Id: I57f76444c13433c972067d41735e52f3d8e9e440 Reviewed-on: http://review.whamcloud.com/4018 Tested-by: Hudson Reviewed-by: Wei Liu Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/conf-sanity.sh | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index e5dbb41..b6605b9 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -2895,18 +2895,21 @@ test_61() { # LU-80 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" -- 1.8.3.1