From bf19f7a4fa6970f57bfe922461cfae7a3e80f89c Mon Sep 17 00:00:00 2001 From: James Nunez Date: Tue, 26 Jun 2018 10:46:14 -0600 Subject: [PATCH] LU-11010 tests: remove calls to return after skip() 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 Change-Id: I4b9aeaeddd673dcba371b8340dd635ddeed2b6be Reviewed-on: https://review.whamcloud.com/32731 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Wei Liu Reviewed-by: Emoly Liu Reviewed-by: Oleg Drokin --- lustre/tests/dne_sanity.sh | 2 +- lustre/tests/insanity.sh | 15 +++++++-------- lustre/tests/obdfilter-survey.sh | 4 ++-- lustre/tests/sgpdd-survey.sh | 16 ++++++++-------- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/lustre/tests/dne_sanity.sh b/lustre/tests/dne_sanity.sh index feaeea2..0c1d640 100644 --- a/lustre/tests/dne_sanity.sh +++ b/lustre/tests/dne_sanity.sh @@ -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 diff --git a/lustre/tests/insanity.sh b/lustre/tests/insanity.sh index 29cfab4..37f2f66 100755 --- a/lustre/tests/insanity.sh +++ b/lustre/tests/insanity.sh @@ -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" diff --git a/lustre/tests/obdfilter-survey.sh b/lustre/tests/obdfilter-survey.sh index 9a96e56..0c1b6bf 100644 --- a/lustre/tests/obdfilter-survey.sh +++ b/lustre/tests/obdfilter-survey.sh @@ -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 diff --git a/lustre/tests/sgpdd-survey.sh b/lustre/tests/sgpdd-survey.sh index a83dbf0..d0df788 100644 --- a/lustre/tests/sgpdd-survey.sh +++ b/lustre/tests/sgpdd-survey.sh @@ -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" -- 1.8.3.1