Whamcloud - gitweb
LU-10759 test: sanity tests need check for 2 or more OSTs 95/31495/3
authorBobi Jam <bobijam.xu@intel.com>
Fri, 2 Mar 2018 18:31:06 +0000 (11:31 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 15 Mar 2018 13:55:17 +0000 (13:55 +0000)
sanity test 27F, 311, and 314 need two or more OSTs. Add a check
on the number of OSTs in these test cases.

Test-Parameters: trivial osscount=1 ostcount=1

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ie802429bfeb44ee19d8867614b420de7bceebfa2
Reviewed-on: https://review.whamcloud.com/31495
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/tests/sanity.sh

index ffb8a0d..4bae41a 100755 (executable)
@@ -2184,6 +2184,7 @@ test_27E() {
 run_test 27E "check that default extended attribute size properly increases"
 
 test_27F() { # LU-5346/LU-7975
+       [[ $OSTCOUNT -lt 2 ]] && skip "needs >= 2 OSTs" && return
        [ $PARALLEL == "yes" ] && skip "skip parallel run" && return
        [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.8.51) ]] &&
                skip "Need MDS version at least 2.8.51" && return
@@ -17082,6 +17083,7 @@ run_test 310c "open-unlink remote file with multiple links"
 
 #LU-4825
 test_311() {
+       [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return
        [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.8.54) ] &&
                skip "lustre < 2.8.54 does not contain LU-4825 fix" && return
        [ $PARALLEL == "yes" ] && skip "skip parallel run" && return
@@ -17252,6 +17254,8 @@ test_313() {
 run_test 313 "io should fail after last_rcvd update fail"
 
 test_314() {
+       [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return
+
        $SETSTRIPE -c 2 -i 0 $DIR/$tfile || error "setstripe failed"
        do_facet ost1 "$LCTL set_param fail_loc=0x720"
        rm -f $DIR/$tfile