From: Elena Gryaznova Date: Tue, 30 Oct 2018 13:43:17 +0000 (+0300) Subject: LU-11586 tests: test_10() fix for FILESET set X-Git-Tag: 2.12.52~103 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=18d84484c776e0eff531ee35fd7f3aaab4fb7266 LU-11586 tests: test_10() fix for FILESET set 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 Cray-bug-id: 6557 Reviewed-by: Andriy Skulysh Reviewed-by: Alexander Boyko Change-Id: If94474d92686a37518c1dd51793e742967fdfbc1 Reviewed-on: https://review.whamcloud.com/33514 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity-pfl.sh b/lustre/tests/sanity-pfl.sh index f78bc3fc..9524b9b 100644 --- a/lustre/tests/sanity-pfl.sh +++ b/lustre/tests/sanity-pfl.sh @@ -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 ||