From ea76de56fccfdc6f8bd0087adc36c19257e414d3 Mon Sep 17 00:00:00 2001 From: James Nunez Date: Wed, 9 May 2018 16:11:19 -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. A problem with the skip message not being printed is corrected. Test-Parameters: trivial testlist=sanity-pfl Signed-off-by: James Nunez Change-Id: I1a52e9bd79a71de4ab4c0cea9c569f379115a603 Reviewed-on: https://review.whamcloud.com/32346 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Wei Liu Reviewed-by: Saurabh Tandan Reviewed-by: Oleg Drokin --- lustre/tests/sanity-pfl.sh | 16 ++++++++-------- lustre/tests/test-framework.sh | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lustre/tests/sanity-pfl.sh b/lustre/tests/sanity-pfl.sh index b652210..d72d00f 100644 --- a/lustre/tests/sanity-pfl.sh +++ b/lustre/tests/sanity-pfl.sh @@ -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 diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index edac2a1..d9f8aa3 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -5792,7 +5792,7 @@ skip_noexit() { } skip() { - skip_noexit + skip_noexit $@ exit 0 } -- 1.8.3.1