Whamcloud - gitweb
LU-11586 tests: test_10() fix for FILESET set 14/33514/6
authorElena Gryaznova <c17455@cray.com>
Tue, 30 Oct 2018 13:43:17 +0000 (16:43 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 6 Feb 2019 06:34:52 +0000 (06:34 +0000)
Patch fixes sanity-pfl test_10() to set root layout
properly: subdirectory could be mounted on $MOUNT if FILESET
is set, test now mounts root on $MOUNT2 for this case and
sets the root layout via $MOUNT2.

Test-Parameters: trivial testlist=sanity-pfl envdefinitions=ONLY=10
Signed-off-by: Elena Gryaznova <c17455@cray.com>
Cray-bug-id: 6557
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Change-Id: If94474d92686a37518c1dd51793e742967fdfbc1
Reviewed-on: https://review.whamcloud.com/33514
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-pfl.sh

index f78bc3f..9524b9b 100644 (file)
@@ -377,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 ||