From 4cf34cbf68eed1fd201f0eb4bd9f3155e805cef9 Mon Sep 17 00:00:00 2001 From: James Nunez Date: Thu, 5 Dec 2019 09:32:46 -0700 Subject: [PATCH] LU-11673 tests: replace obsolete '-o' to '||' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Since use of -o and -a are marked as obsolete in shell test ([), we need to switch from using [ expr1 –o expr2 ] to [ expr1] || [ expr2 ]. Make this change for sanity tests. This is a partial back port of: Lustre-change: https://review.whamcloud.com/33670 Lustre-commit: 6d277f126df7605d402255333180b0ca03991613 Test-Parameters: trivial Signed-off-by: James Nunez Change-Id: Id87580d0280a716a6939a1203ae5b370e762d6ec Reviewed-by: Emoly Liu Reviewed-by: Minh Diep Reviewed-on: https://review.whamcloud.com/36929 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 3e3fb57..1ce758a 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -9036,9 +9036,9 @@ test_103a() { echo "performing permissions..." run_acl_subtest permissions || error "permissions failed" # LU-1482 mdd: Setting xattr are properly checked with and without ACLs - if [ $MDS1_VERSION -gt $(version_code 2.8.55) -o \ - \( $MDS1_VERSION -lt $(version_code 2.6) -a \ - $MDS1_VERSION -ge $(version_code 2.5.29) \) ] + if [ $MDS1_VERSION -gt $(version_code 2.8.55) ] || + { [ $MDS1_VERSION -lt $(version_code 2.6) ] && + [ $MDS1_VERSION -ge $(version_code 2.5.29) ]; } then echo "performing permissions xattr..." run_acl_subtest permissions_xattr || @@ -19743,9 +19743,10 @@ test_404() { # LU-6601 run_test 404 "validate manual {de}activated works properly for OSPs" test_405() { - [ $MDS1_VERSION -lt $(version_code 2.6.92) -o \ - [ $CLIENT_VERSION -lt $(version_code 2.6.99) ] && - skip "Layout swap lock is not supported" + [ $MDS1_VERSION -lt $(version_code 2.6.92) ] || + [ $CLIENT_VERSION -lt $(version_code 2.6.99) ] && + skip "Layout swap lock is not supported" + check_swap_layouts_support test_mkdir $DIR/$tdir -- 1.8.3.1