Whamcloud - gitweb
LU-15574 tests: Skip test sanity/77o in interop
[fs/lustre-release.git] / lustre / tests / sanity-pfl.sh
index 05ce531..81d25da 100644 (file)
@@ -129,6 +129,9 @@ test_0c() {
 run_test 0c "Verify SEL comp stripe count limits"
 
 test_0d() {
+       (( $MDS1_VERSION > $(version_code 2.14.50.115) )) ||
+               skip_env "Need MDS version at least 2.14.50.115"
+
        local td=$DIR/$tdir
        local tf=$td/$tfile
        local comp_end
@@ -496,7 +499,7 @@ test_6() {
        [ "$old_chksum" != "$chksum" ] &&
                error "(composite -> v1) $old_chksum != $chksum"
 
-       rm -f $comp_file || "Delete $comp_file failed"
+       rm -f $comp_file || error "Delete $comp_file failed"
 }
 run_test 6 "Migrate composite file"
 
@@ -517,7 +520,7 @@ test_7() {
        $RUNAS $LFS setstripe --component-add -E -1 -c 5 $comp_file ||
                error "Add last component to $comp_file failed"
 
-       rm $comp_file || "Delete composite failed"
+       rm $comp_file || error "Delete composite failed"
 }
 run_test 7 "Add/Delete/Create composite file by non-privileged user"
 
@@ -525,13 +528,13 @@ test_8() {
        local parent=$DIR/$tdir
 
        rm -fr $parent
-       test_mkdir $parent
+       mkdir_on_mdt0 $parent
 
        $LFS setstripe -E 2M -c 1 -S 1M -E 16M -c 2 -S 2M \
                -E -1 -c 4 -S 4M $parent ||
                error "Set default layout to $parent failed"
 
-       sh rundbench -C -D $parent 2 || error "dbench failed"
+       bash rundbench -C -D $parent 2 || error "dbench failed"
 
        rm -fr $parent || error "Delete dir $parent failed"
 }
@@ -984,6 +987,9 @@ test_16b() {
 run_test 16b "Verify setstripe/getstripe with YAML config file + overstriping"
 
 test_16c() {
+       (( $MDS1_VERSION >= $(version_code 2.13.53.205) )) ||
+               skip "need MDS version at least 2.13.53.205"
+
        [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs"
 
        local file=$DIR/$tdir/$tfile
@@ -1014,6 +1020,37 @@ test_16c() {
 }
 run_test 16c "Verify setstripe/getstripe for SEL layout with YAML config file"
 
+test_16d() {
+       [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs"
+
+       local file=$DIR/$tdir/$tfile
+       local dir=$DIR/$tdir/dir
+       local temp=$DIR/$tdir/template
+       rm -rf $DIR/$tdir
+       test_mkdir $DIR/$tdir
+
+       #####################################################################
+       #                           1. DOM file
+       # set stripe for source file
+       $LFS setstripe -E1m -L mdt -E-1 -o1,0 $file ||
+               error "Create $file failed"
+
+       echo "1. DOM file"
+       verify_yaml_layout $file $file.copy $temp "1. DOM file"
+
+       #####################################################################
+       #                           2. DOM dir
+       # set stripe for source dir
+       test_mkdir $dir
+       $LFS setstripe -E1m -L mdt -E-1 -o1,0 $dir || error "Create $dir failed"
+
+       test_mkdir $dir.copy
+       echo "2. DOM dir"
+       verify_yaml_layout $dir $dir.copy $temp.dir "2. DOM dir"
+}
+run_test 16d "Verify setstripe/getstripe for DOM layout with YAML config file"
+
+
 test_17() {
        [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs"
        local file=$DIR/$tdir/$tfile