# 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
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"
run_test 56ab "lfs find --blocks"
test_56ba() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.50) ] &&
+ skip "Need MDS version at least 2.10.50"
+
# Create composite files with one component
local dir=$DIR/$tdir
else
print from_begin
}")
- [[ $LLOG_COUNT -gt 100 ]] &&
+
+ [[ $LLOG_COUNT -gt 120 ]] &&
error "CDEBUG_LIMIT not limiting messages ($LLOG_COUNT)" || true
}
-run_test 60b "limit repeated messages from CERROR/CWARN ========"
+run_test 60b "limit repeated messages from CERROR/CWARN"
test_60c() {
[ $PARALLEL == "yes" ] && skip "skip parallel run"
;;
*) 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
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"
# 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 =================================="
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 \
}
run_test 184e "Recreate layout after stripeless layout swaps"
+test_184f() {
+ # Create a file with name longer than sizeof(struct stat) ==
+ # 144 to see if we can get chars from the file name to appear
+ # in the returned striping. Note that 'f' == 0x66.
+ local file=$(for ((i = 0; i < 200; i++)); do echo -n f; done)
+
+ mkdir -p $DIR/$tdir
+ mcreate $DIR/$tdir/$file
+ if lfs find --stripe-count 0x6666 $DIR/$tdir | grep $file; then
+ error "IOC_MDC_GETFILEINFO returned garbage striping"
+ fi
+}
+run_test 184f "IOC_MDC_GETFILEINFO for files with long names but no striping"
+
test_185() { # LU-2441
# LU-3553 - no volatile file support in old servers
[[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.3.60) ]] ||
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
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 \
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
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
}
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)
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
}
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) ]] &&
}
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
#