Whamcloud - gitweb
LU-11010 tests: remove calls to return after skip() 31/32731/3
authorJames Nunez <jnunez@whamcloud.com>
Tue, 26 Jun 2018 16:46:14 +0000 (10:46 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 30 Jul 2018 22:24:51 +0000 (22:24 +0000)
The skip() routine now contains a call to exit. All calls
to skip() and skip_env() should be reviewed and calls to
return that followed skip() should be removed.

This is the second patch in a series that removes calls
to return after skip() in the Lustre test suites.

Calls to return after skip() are removed for:
dne_sanity
insanity
obdfilter-survey
sgpdd-survey

Test-Parameters: trivial testlist=dne-sanity,insanity,obdfilter-survey,sgpdd-survey
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I4b9aeaeddd673dcba371b8340dd635ddeed2b6be
Reviewed-on: https://review.whamcloud.com/32731
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/dne_sanity.sh
lustre/tests/insanity.sh
lustre/tests/obdfilter-survey.sh
lustre/tests/sgpdd-survey.sh

index feaeea2..0c1d640 100644 (file)
@@ -67,7 +67,7 @@ cleanup_running_directories()
 
 test_sanity()
 {
-       [ ! -f sanity.sh ] && skip_env "No sanity.sh skipping" && return
+       [ ! -f sanity.sh ] && skip_env "No sanity.sh skipping"
 
        local index
        local pid
index 29cfab4..37f2f66 100755 (executable)
@@ -19,7 +19,6 @@ ALWAYS_EXCEPT="15  $INSANITY_EXCEPT"
 if [ "$FAILURE_MODE" = "HARD" ]; then
        skip_env "$TESTSUITE: is not functional with FAILURE_MODE = HARD, " \
                "please use recovery-double-scale, bz20407"
-       exit 0
 fi
 
 [ "$SLOW" = "no" ] && EXCEPT_SLOW=""
@@ -171,7 +170,7 @@ run_test 0 "Fail all nodes, independently"
 
 ############### First Failure Mode ###############
 test_1() {
-       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
+       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
 
        clients_up
 
@@ -328,7 +327,7 @@ run_test 4 "Fourth Failure Mode: OST/MDS `date`"
 
 ############### Fifth Failure Mode ###############
 test_5() {
-       [ $OSTCOUNT -lt 2 ] && skip_env "needs >= 2 OSTs" && return 0
+       [ $OSTCOUNT -lt 2 ] && skip_env "needs >= 2 OSTs"
 
        echo "Fifth Failure Mode: OST/OST `date`"
 
@@ -597,7 +596,7 @@ run_test 9 "Ninth Failure Mode: CLIENT/CLIENT `date`"
 
 ############### Tenth Failure Mode ###############
 test_10() {
-       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
+       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
 
        shutdown_facet mds1
        reboot_facet mds1
@@ -641,7 +640,7 @@ run_test 10 "Tenth Failure Mode: MDT0/OST/MDT1 `date`"
 
 ############### Seventh Failure Mode ###############
 test_11() {
-       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
+       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
        echo "Verify Lustre filesystem is up and running"
        [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
 
@@ -673,7 +672,7 @@ run_test 11 "Eleventh Failure Mode: MDS0/CLIENT/MDS1 `date`"
 ###################################################
 
 test_12() {
-       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
+       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
        echo "Verify Lustre filesystem is up and running"
        [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
 
@@ -704,7 +703,7 @@ run_test 12 "Twelve Failure Mode: MDS0,MDS1/OST0, OST1/CLIENTS `date`"
 ###################################################
 
 test_13() {
-       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
+       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
        echo "Verify Lustre filesystem is up and running"
        [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
 
@@ -735,7 +734,7 @@ run_test 13 "Thirteen Failure Mode: MDS0,MDS1/CLIENTS/OST0,OST1 `date`"
 ###################################################
 
 test_14() {
-       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
+       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
        echo "Verify Lustre filesystem is up and running"
        [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
 
index 9a96e56..0c1b6bf 100644 (file)
@@ -210,9 +210,9 @@ test_3a () {
        #    'lctl dl' output must be blank.
        # Skipping test for CLIENTONLY mode because of
        # cleanupall()->stopall() does not cleanup the servers on this mode.
-       [ "$CLIENTONLY" ] && skip "CLIENTONLY mode" && return
+       [ "$CLIENTONLY" ] && skip "CLIENTONLY mode"
 
-       remote_servers || { skip "Local servers" && return 0; }
+       remote_servers || skip "Local servers"
 
        cleanupall
 
index a83dbf0..d0df788 100644 (file)
@@ -60,22 +60,22 @@ run_sgpdd_facets () {
 }
 
 test_1 () {
-    local mdss=$(get_facets MDS)
+       local mdss=$(get_facets MDS)
 
-    check_progs_installed $(facets_hosts $mdss) $SGPDDSURVEY sg_map || \
-        { skip_env "SGPDDSURVEY=$SGPDDSURVEY or sg_map not found" && return 0; }
+       check_progs_installed $(facets_hosts $mdss) $SGPDDSURVEY sg_map ||
+               skip_env "SGPDDSURVEY=$SGPDDSURVEY or sg_map not found"
 
-    run_sgpdd_facets $mdss
+       run_sgpdd_facets $mdss
 }
 run_test 1 "sgpdd-survey, mds, scsidevs"
 
 test_2 () {
-    local osts=$(get_facets OST)
+       local osts=$(get_facets OST)
 
-    check_progs_installed $(facets_hosts $osts) $SGPDDSURVEY sg_map || \
-        { skip_env "SGPDDSURVEY=$SGPDDSURVEY or sg_map not found" && return 0; }
+       check_progs_installed $(facets_hosts $osts) $SGPDDSURVEY sg_map ||
+               skip_env "SGPDDSURVEY=$SGPDDSURVEY or sg_map not found"
 
-    run_sgpdd_facets $osts
+       run_sgpdd_facets $osts
 }
 run_test 2 "sgpdd-survey, osts, scsidevs"