Whamcloud - gitweb
LU-11010 tests: remove calls to return after skip() 46/32346/2
authorJames Nunez <james.a.nunez@intel.com>
Wed, 9 May 2018 22:11:19 +0000 (16:11 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 29 May 2018 04:54:52 +0000 (04:54 +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.

A problem with the skip message not being printed is corrected.

Test-Parameters: trivial testlist=sanity-pfl
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I1a52e9bd79a71de4ab4c0cea9c569f379115a603
Reviewed-on: https://review.whamcloud.com/32346
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-pfl.sh
lustre/tests/test-framework.sh

index b652210..d72d00f 100644 (file)
@@ -27,7 +27,7 @@ init_logging
 check_and_setup_lustre
 
 if [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.9.51) ]]; then
-       skip_env "Need MDS version at least 2.9.51" && exit
+       skip_env "Need MDS version at least 2.9.51"
 fi
 
 build_test_filter
@@ -40,7 +40,7 @@ assert_DIR
 rm -rf $DIR/[Rdfs][0-9]*
 
 test_0() {
-       [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return
+       [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs"
 
        local comp_file=$DIR/$tdir/$tfile
        local rw_len=$((3 * 1024 * 1024))       # 3M
@@ -187,7 +187,7 @@ test_3() {
 run_test 3 "Delete component from existing file"
 
 test_4() {
-       skip "Not supported in PFL" && return
+       skip "Not supported in PFL"
        # In PFL project, only LCME_FL_INIT is supported, and it can't
        # be altered by application.
 }
@@ -474,7 +474,7 @@ test_11() {
 run_test 11 "Verify component instantiation with write/truncate"
 
 test_12() {
-       [ $OSTCOUNT -lt 3 ] && skip "needs >= 3 OSTs" && return
+       [ $OSTCOUNT -lt 3 ] && skip "needs >= 3 OSTs"
 
        local file=$DIR/$tdir/$tfile
        test_mkdir $DIR/$tdir
@@ -515,7 +515,7 @@ test_12() {
 run_test 12 "Verify ost list specification"
 
 test_13() { # LU-9311
-       [ $OSTCOUNT -lt 8 ] && skip "needs >= 8 OSTs" && return
+       [ $OSTCOUNT -lt 8 ] && skip "needs >= 8 OSTs"
 
        local file=$DIR/$tfile
        local dd_count=4
@@ -535,7 +535,7 @@ test_13() { # LU-9311
 run_test 13 "shouldn't reprocess granted resent request"
 
 test_14() {
-       [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return
+       [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs"
        local file=$DIR/$tdir/$tfile
        test_mkdir -p $DIR/$tdir
        rm -f $file
@@ -659,7 +659,7 @@ verify_16() {
 }
 
 test_16() {
-       [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return
+       [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs"
 
        local file=$DIR/$tdir/$tfile
        local dir=$DIR/$tdir/dir
@@ -708,7 +708,7 @@ test_16() {
 run_test 16 "Verify setstripe/getstripe with YAML config file"
 
 test_17() {
-       [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return
+       [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs"
        local file=$DIR/$tdir/$tfile
        test_mkdir -p $DIR/$tdir
        rm -f $file
index edac2a1..d9f8aa3 100755 (executable)
@@ -5792,7 +5792,7 @@ skip_noexit() {
 }
 
 skip() {
-       skip_noexit
+       skip_noexit $@
        exit 0
 }