Whamcloud - gitweb
LU-11586 tests: test_10() fix for FILESET set
[fs/lustre-release.git] / lustre / tests / sanity-pfl.sh
index e27c39e..9524b9b 100644 (file)
@@ -27,11 +27,6 @@ if [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.9.51) ]]; then
        skip_env "Need MDS version at least 2.9.51"
 fi
 
-if [ $MDSCOUNT -eq 1 ]; then
-       # Bug number:    LU-10686
-       ALWAYS_EXCEPT+=" 9"
-fi
-
 [ "$ALWAYS_EXCEPT$EXCEPT" ] &&
        echo "Skipping tests: $ALWAYS_EXCEPT $EXCEPT"
 
@@ -350,7 +345,7 @@ test_9() {
        test_mkdir $DIR/$tdir
        rm -f $comp_file
 
-       $LFS setstripe -E 1M -S 1M -E 2M -c 1 $comp_file ||
+       $LFS setstripe -E 1M -S 1M -E -1 -c 1 $comp_file ||
                error "Create $comp_file failed"
 
        local comp_cnt=$($LFS getstripe --component-count $comp_file)
@@ -382,17 +377,31 @@ component_dump() {
 
 test_10() {
        local parent=$DIR/$tdir
+       local root=$MOUNT
 
        save_layout_restore_at_exit $MOUNT
 
        rm -rf $parent
-       $LFS setstripe -d $MOUNT || error "clear root layout"
+
+       # mount root on $MOUNT2 if FILESET is set
+       if [ -n "$FILESET" ]; then
+               FILESET="" mount_client $MOUNT2 ||
+                       error "mount $MOUNT2 fail"
+               root=$MOUNT2
+       fi
+
+       $LFS setstripe -d $root || error "clear root layout"
 
        # set root composite layout
        $LFS setstripe -E 2M -c 1 -S 1M -E 16M -c2 -S 2M \
-               -E -1 -c 4 -S 4M $MOUNT ||
+               -E -1 -c 4 -S 4M $root ||
                error "Set root layout failed"
 
+       if [ "$root" == "$MOUNT2" ]; then
+               umount_client $MOUNT2 ||
+                       error "umount $MOUNT2 fail"
+       fi
+
        test_mkdir $parent
        # set a different layout for parent
        $LFS setstripe -E -1 -c 1 -S 1M $parent ||