X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanity.sh;h=4e192ece680db6e574836b068046a32e07bcb8de;hp=1b0dfab3d439fd2ee8617c92a9c1d2365dc0774e;hb=27c51b5623123ba3208569ecdef343f61646c7e4;hpb=fab95b4345db3c9e4108e06a76c14bcda575e24e diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 1b0dfab..4e192ec 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -15,9 +15,13 @@ ALWAYS_EXCEPT="$SANITY_EXCEPT 42a 42b 42c 77k" # skipped tests: LU-8411 LU-9096 LU-9054 .. ALWAYS_EXCEPT=" 407 253 312 $ALWAYS_EXCEPT" +if $SHARED_KEY; then +# bug number for skipped tests: LU-9795 (all below) + ALWAYS_EXCEPT="$ALWAYS_EXCEPT 17n 60a 133g 300f" +fi + # Check Grants after these tests GRANT_CHECK_LIST="$GRANT_CHECK_LIST 42a 42b 42c 42d 42e 63a 63b 64a 64b 64c" - SRCDIR=$(cd $(dirname $0); echo $PWD) export PATH=$PATH:/sbin @@ -5515,7 +5519,7 @@ test_56wb() { run_test 56wb "check lfs_migrate pool support" test_56wc() { - local file1="$DIR/$tdir/file 1" + local file1="$DIR/$tdir/file1" echo -n "Creating test dir..." test_mkdir $DIR/$tdir &> /dev/null || error "cannot create dir" @@ -10680,7 +10684,6 @@ check_stats() { ;; *) error "Wrong facet '$facet'" ;; esac - echo $res [ "$res" ] || error "The counter for $op on $facet was not incremented" # if the argument $3 is zero, it means any stat increment is ok. if [[ $want -gt 0 ]]; then @@ -10739,6 +10742,8 @@ test_133a() { run_test 133a "Verifying MDT stats ========================================" test_133b() { + local res + [ $PARALLEL == "yes" ] && skip "skip parallel run" remote_ost_nodsh && skip "remote OST with nodsh" remote_mds_nodsh && skip "remote MDS with nodsh" @@ -10771,9 +10776,25 @@ test_133b() { # Sleep to avoid a cached response. #define OBD_STATFS_CACHE_SECONDS 1 sleep 2 + do_facet $SINGLEMDS $LCTL set_param mdt.*.md_stats=clear + do_facet ost1 $LCTL set_param obdfilter.*.stats=clear $LFS df || error "lfs failed" check_stats $SINGLEMDS "statfs" 1 + # check aggregated statfs (LU-10018) + [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.11.54) ] && + return 0 + [ $(lustre_version_code client) -lt $(version_code 2.11.54) ] && + return 0 + sleep 2 + do_facet $SINGLEMDS $LCTL set_param mdt.*.md_stats=clear + do_facet ost1 $LCTL set_param obdfilter.*.stats=clear + df $DIR + check_stats $SINGLEMDS "statfs" 1 + res=$(do_facet ost1 \ + $LCTL get_param obdfilter.$FSNAME-OST0000.stats | grep "statfs") + [ "$res" ] && error "OST got STATFS" + return 0 } run_test 133b "Verifying extra MDT stats ==================================" @@ -11015,7 +11036,7 @@ test_133f() { find $proc_dirs -exec cat '{}' \; &> /dev/null # Second verifying readability. - $LCTL get_param -R '*' &> /dev/null || error "proc file read failed" + $LCTL get_param -R '*' &> /dev/null # Verifing writability with badarea_io. find $proc_dirs \ @@ -13908,8 +13929,8 @@ verify_jobstats() { jobstats_set() { local new_jobenv=$1 - do_facet mgs $LCTL conf_param $FSNAME.sys.jobid_var=$new_jobenv - wait_update $HOSTNAME "$LCTL get_param -n jobid_var" $new_jobenv + set_persistent_param_and_check client "jobid_var" \ + "$FSNAME.sys.jobid_var" $new_jobenv } test_205() { # Job stats @@ -13925,9 +13946,13 @@ test_205() { # Job stats local old_jobenv=$($LCTL get_param -n jobid_var) [ $old_jobenv != $JOBENV ] && jobstats_set $JOBENV - stack_trap "do_facet mgs \ - $LCTL conf_param $FSNAME.sys.jobid_var=$old_jobenv" EXIT + if [[ $PERM_CMD = *"set_param -P"* ]]; then + stack_trap "do_facet mgs $PERM_CMD jobid_var=$old_jobenv" EXIT + else + stack_trap "do_facet mgs $PERM_CMD \ + $FSNAME.sys.jobid_var=$old_jobenv" EXIT + fi changelog_register local old_interval=$(do_facet $SINGLEMDS lctl get_param -n \ @@ -14559,17 +14584,15 @@ test_224c() { # LU-6441 osc.*.max_pages_per_rpc) local at_max=$($LCTL get_param -n at_max) local timeout=$($LCTL get_param -n timeout) - local test_at="$LCTL get_param -n at_max" + local test_at="at_max" local param_at="$FSNAME.sys.at_max" - local test_timeout="$LCTL get_param -n timeout" + local test_timeout="timeout" local param_timeout="$FSNAME.sys.timeout" $LCTL set_param -n osc.*.max_pages_per_rpc=1024 - set_conf_param_and_check client "$test_at" "$param_at" 0 || - error "conf_param at_max=0 failed" - set_conf_param_and_check client "$test_timeout" "$param_timeout" 5 || - error "conf_param timeout=5 failed" + set_persistent_param_and_check client "$test_at" "$param_at" 0 + set_persistent_param_and_check client "$test_timeout" "$param_timeout" 5 #define OBD_FAIL_PTLRPC_CLIENT_BULK_CB3 0x520 do_facet ost1 $LCTL set_param fail_loc=0x520 @@ -14578,10 +14601,9 @@ test_224c() { # LU-6441 sync do_facet ost1 $LCTL set_param fail_loc=0 - set_conf_param_and_check client "$test_at" "$param_at" $at_max || - error "conf_param at_max=$at_max failed" - set_conf_param_and_check client "$test_timeout" "$param_timeout" \ - $timeout || error "conf_param timeout=$timeout failed" + set_persistent_param_and_check client "$test_at" "$param_at" $at_max + set_persistent_param_and_check client "$test_timeout" "$param_timeout" \ + $timeout $LCTL set_param -n $pages_per_rpc restore_lustre_params < $p @@ -15580,18 +15602,6 @@ test_236() { } run_test 236 "Layout swap on open unlinked file" -# test to verify file handle related system calls -# (name_to_handle_at/open_by_handle_at) -# The new system calls are supported in glibc >= 2.14. - -test_237() { - echo "Test file_handle syscalls" > $DIR/$tfile || - error "write failed" - check_fhandle_syscalls $DIR/$tfile || - error "check_fhandle_syscalls failed" -} -run_test 237 "Verify name_to_handle_at/open_by_handle_at syscalls" - # LU-4659 linkea consistency test_238() { local server_version=$(lustre_version_code $SINGLEMDS) @@ -19038,9 +19048,9 @@ test_411() { echo 1M > $cgdir/memory.limit_in_bytes # Should not LBUG, just be killed by oom-killer - sh -c "echo \$$ > $cgdir/tasks && dd if=$DIR/$tfile of=/dev/null" && - error "fail to trigger a memory allocation error" - + # dd will return 0 even allocation failure in some environment. + # So don't check return value + sh -c "echo \$$ > $cgdir/tasks && dd if=$DIR/$tfile of=/dev/null" cleanup_test411_cgroup $cgdir return 0 @@ -19152,6 +19162,20 @@ test_415() { } run_test 415 "lock revoke is not missing" + +test_416() { + [ $(lustre_version_code mds1) -lt $(version_code 2.11.55) ] && + skip "Need server version at least 2.11.55" + + # define OBD_FAIL_OSD_TXN_START 0x19a + do_facet mds1 lctl set_param fail_loc=0x19a + + lfs mkdir -c $MDSCOUNT $DIR/$tdir + + true +} +run_test 416 "transaction start failure won't cause system hung" + prep_801() { [[ $(lustre_version_code mds1) -lt $(version_code 2.9.55) ]] || [[ $(lustre_version_code ost1) -lt $(version_code 2.9.55) ]] && @@ -19776,6 +19800,38 @@ test_807() { } run_test 807 "verify LSOM syncing tool" +check_som_nologged() +{ + local lines=$($LFS changelog $FSNAME-MDT0000 | + grep 'x=trusted.som' | wc -l) + [ $lines -ne 0 ] && error "trusted.som xattr is logged in Changelogs" +} + +test_808() { + [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.11.55) ] && + skip "Need MDS version at least 2.11.55" && return + + # Registration step + changelog_register || error "changelog_register failed" + + touch $DIR/$tfile || error "touch $tfile failed" + check_som_nologged + + dd if=/dev/zero of=$DIR/$tfile bs=1048576 count=1 || + error "write $tfile failed" + check_som_nologged + + $TRUNCATE $DIR/$tfile 1234 + check_som_nologged + + $TRUNCATE $DIR/$tfile 1048576 + check_som_nologged + + # Deregistration step + changelog_deregister || error "changelog_deregister failed" +} +run_test 808 "Check trusted.som xattr not logged in Changelogs" + # # tests that do cleanup/setup should be run at the end #