From c67a7f39cabbe8ef6d7c5a340b501aedaa748be6 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Sat, 13 Feb 2016 03:11:50 -0700 Subject: [PATCH] LU-7746 tests: some fixes for sanity.sh with upstream kernel sanity.sh: - delete is_patchless() check, since this is always true today. - remove test for "lfs getstripe --raw" added in 2.5.57 - minor style cleanups Signed-off-by: Andreas Dilger Change-Id: I6c808febe078fdc7afd89b82a04be622879cab07 Reviewed-on: http://review.whamcloud.com/19663 Tested-by: Jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 17 ++++++----------- lustre/tests/test-framework.sh | 7 +------ 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 661be1a..56519f5 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -2040,6 +2040,8 @@ run_test 27D "validate llapi_layout API" # accessing a widely striped file. test_27E() { [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return + [ $(lustre_version_code client) -lt $(version_code 2.5.57) ] && + skip "client does not have LU-3338 fix" && return # 72 bytes is the minimum space required to store striping # information for a file striped across one OST: @@ -2074,7 +2076,7 @@ test_28() { # bug 2091 run_test 28 "create/mknod/mkdir with bad file types ============" test_29() { - [ $PARALLEL == "yes" ] && skip "skip parallel run" && return + [ $PARALLEL == "yes" ] && skip "skip parallel run" && return 0 cancel_lru_locks mdc test_mkdir $DIR/d29 touch $DIR/d29/foo @@ -2085,7 +2087,7 @@ test_29() { for lock_count in $(lctl get_param -n ldlm.namespaces.*mdc*.lock_count); do let LOCKCOUNTORIG=$LOCKCOUNTORIG+$lock_count done - [ $LOCKCOUNTORIG -eq 0 ] && echo "No mdc lock count" && return 1 + [ $LOCKCOUNTORIG -eq 0 ] && error "No mdc lock count" && return 1 declare -i LOCKUNUSEDCOUNTORIG=0 for unused_count in $(lctl get_param -n ldlm.namespaces.*mdc*.lock_unused_count); do @@ -3902,7 +3904,6 @@ test_48b() { # bug 2399 test_mkdir .foo && error "'mkdir .foo' worked after removing cwd" ls . > /dev/null && error "'ls .' worked after removing cwd" ls .. > /dev/null || error "'ls ..' failed after removing cwd" - is_patchless || ( cd . && error "'cd .' worked after removing cwd" ) test_mkdir . && error "'mkdir .' worked after removing cwd" rmdir . && error "'rmdir .' worked after removing cwd" ln -s . foo && error "'ln -s .' worked after removing cwd" @@ -3923,8 +3924,6 @@ test_48c() { # bug 2350 test_mkdir .foo && error "mkdir .foo worked after removing cwd" $TRACE ls . && error "'ls .' worked after removing cwd" $TRACE ls .. || error "'ls ..' failed after removing cwd" - is_patchless || ( $TRACE cd . && - error "'cd .' worked after removing cwd" ) $TRACE test_mkdir . && error "'mkdir .' worked after removing cwd" $TRACE rmdir . && error "'rmdir .' worked after removing cwd" $TRACE ln -s . foo && error "'ln -s .' worked after removing cwd" @@ -3946,13 +3945,10 @@ test_48d() { # bug 2350 test_mkdir .foo && error "mkdir .foo worked after removing parent" $TRACE ls . && error "'ls .' worked after removing parent" $TRACE ls .. && error "'ls ..' worked after removing parent" - is_patchless || ( $TRACE cd . && - error "'cd .' worked after recreate parent" ) $TRACE test_mkdir . && error "'mkdir .' worked after removing parent" $TRACE rmdir . && error "'rmdir .' worked after removing parent" $TRACE ln -s . foo && error "'ln -s .' worked after removing parent" - is_patchless || ( $TRACE cd .. && - error "'cd ..' worked after removing parent" || true ) + true } run_test 48d "Access removed parent subdir (should return errors)" @@ -10715,8 +10711,7 @@ run_test 161a "link ea sanity" test_161b() { [ $PARALLEL == "yes" ] && skip "skip parallel run" && return - [ $MDSCOUNT -lt 2 ] && - skip "skipping remote directory test" && return + [ $MDSCOUNT -lt 2 ] && skip "skipping remote directory test" && return local MDTIDX=1 local remote_dir=$DIR/$tdir/remote_dir diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index b7ef7f4..711d394 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -5438,12 +5438,7 @@ get_random_entry () { } client_only () { - [ "$CLIENTONLY" ] || [ "$CLIENTMODSONLY" = yes ] -} - -is_patchless () -{ - lctl get_param version | grep -q patchless + [ "$CLIENTONLY" ] || [ "$CLIENTMODSONLY" = yes ] } check_versions () { -- 1.8.3.1