From 6c84bbe3047f82ae429c574ba9502fff0517c65c Mon Sep 17 00:00:00 2001 From: Bob Glossman Date: Wed, 3 Jul 2013 08:42:13 -0700 Subject: [PATCH] LU-3547 tests: skip unsupported subtest on old servers chmod of .lustre/fid is unsupported on servers older than v2.4. Add a version check to skip the unsupported op in sanity test 154a on old servers for interop testing of 2.4+ clients on 2.3 servers. Signed-off-by: Bob Glossman Change-Id: I353c93e8d1501944cad8f638de69a0432539249f Reviewed-on: http://review.whamcloud.com/6879 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Keith Mannthey Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index c3a8d1a..25d6eb8 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -8814,20 +8814,23 @@ dot_lustre_fid_permission_check() { mrename $test_dir/$tdir $MOUNT/.lustre/fid && error "rename to $MOUNT/.lustre/fid should fail." - local old_obf_mode=$(stat --format="%a" $DIR/.lustre/fid) - local new_obf_mode=777 - - echo "change mode of $DIR/.lustre/fid to $new_obf_mode" - chmod $new_obf_mode $DIR/.lustre/fid || - error "chmod $new_obf_mode $DIR/.lustre/fid failed" - - local obf_mode=$(stat --format=%a $DIR/.lustre/fid) - [ $obf_mode -eq $new_obf_mode ] || - error "stat $DIR/.lustre/fid returned wrong mode $obf_mode" - - echo "restore mode of $DIR/.lustre/fid to $old_obf_mode" - chmod $old_obf_mode $DIR/.lustre/fid || - error "chmod $old_obf_mode $DIR/.lustre/fid failed" + if [ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.3.51) ] + then # LU-3547 + local old_obf_mode=$(stat --format="%a" $DIR/.lustre/fid) + local new_obf_mode=777 + + echo "change mode of $DIR/.lustre/fid to $new_obf_mode" + chmod $new_obf_mode $DIR/.lustre/fid || + error "chmod $new_obf_mode $DIR/.lustre/fid failed" + + local obf_mode=$(stat --format=%a $DIR/.lustre/fid) + [ $obf_mode -eq $new_obf_mode ] || + error "stat $DIR/.lustre/fid returned wrong mode $obf_mode" + + echo "restore mode of $DIR/.lustre/fid to $old_obf_mode" + chmod $old_obf_mode $DIR/.lustre/fid || + error "chmod $old_obf_mode $DIR/.lustre/fid failed" + fi $OPENFILE -f O_LOV_DELAY_CREATE:O_CREAT $test_dir/$tfile-2 fid=$($LFS path2fid $test_dir/$tfile-2) -- 1.8.3.1