Whamcloud - gitweb
LU-9771 tests: make racer work for flr 74/30074/9
authorJinshan Xiong <jinshan.xiong@intel.com>
Fri, 17 Nov 2017 07:11:10 +0000 (23:11 -0800)
committerJinshan Xiong <jinshan.xiong@intel.com>
Sun, 26 Nov 2017 00:24:51 +0000 (00:24 +0000)
Creating flr file in racer tests.

Test-parameters: trivial testlist=racer,racer,racer mdscount=1 mdtcount=1

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I56cef133263a05050ebdb0e3b16ccd0c737fe27f
Reviewed-on: https://review.whamcloud.com/30074
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/tests/racer/file_create.sh

index c07c813..3721e31 100755 (executable)
@@ -21,6 +21,9 @@ if $RACER_ENABLE_DOM ; then
                layout+=(dom dom dom)
 fi
 
+[[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.10.55) ]] &&
+       layout+=(flr flr flr)
+
 echo "layout: ${layout[*]}"
 
 while /bin/true; do
@@ -34,12 +37,13 @@ while /bin/true; do
                pattern=${layout[$RANDOM % ${#layout[*]}]}
 
                case $pattern in
-               dom) opt="-E $stripesize -L mdt -E eof -c $stripecount -S 1M" ;;
-               pfl) opt="-E 1M -S $stripesize -E eof -c $stripecount -S 2M" ;;
-               raid0) opt="-S $stripesize -c $stripecount" ;;
+               dom) opt="setstripe -E $stripesize -L mdt -E eof -c $stripecount -S 1M" ;;
+               pfl) opt="setstripe -E 1M -S $stripesize -E eof -c $stripecount -S 2M" ;;
+               flr) opt="mirror create -N2 -E 1M -S $stripesize -E eof -c $stripecount -S 2M" ;;
+               raid0) opt="setstripe -S $stripesize -c $stripecount" ;;
                esac
 
-               $LFS setstripe $opt $DIR/$file 2> /dev/null || true
+               $LFS $opt $DIR/$file 2> /dev/null || true
        }
 
        # offset between 0 and 16MB (256 64k chunks), with 1/2 at offset 0