test_56a() { # was test_56
rm -rf $DIR/$tdir
$SETSTRIPE -d $DIR
- test_mkdir $DIR/$tdir
- test_mkdir $DIR/$tdir/dir
+ test_mkdir -p $DIR/$tdir/dir
NUMFILES=3
NUMFILESx2=$(($NUMFILES * 2))
for i in `seq 1 $NUMFILES` ; do
}
run_test 56x "lfs migration support"
+test_56y() {
+ local res=""
+
+ local dir0=$DIR/$tdir/$testnum
+ mkdir -p $dir0 || error "creating dir $dir0"
+ local f1=$dir0/file1
+ local f2=$dir0/file2
+
+ touch $f1 || error "creating std file $f1"
+ $MULTIOP $f2 H2c || error "creating released file $f2"
+
+ # a directory can be raid0, so ask only for files
+ res=$($LFIND $dir0 -L raid0 -type f | wc -l)
+ [[ $res == 2 ]] || error "search raid0: found $res files != 2"
+
+ res=$($LFIND $dir0 \! -L raid0 -type f | wc -l)
+ [[ $res == 0 ]] || error "search !raid0: found $res files != 0"
+
+ # only files can be released, so no need to force file search
+ res=$($LFIND $dir0 -L released)
+ [[ $res == $f2 ]] || error "search released: found $res != $f2"
+
+ res=$($LFIND $dir0 \! -L released)
+ [[ $res == $f1 ]] || error "search !released: found $res != $f1"
+
+}
+run_test 56y "lfs find -L raid0|released"
+
test_57a() {
[ $PARALLEL == "yes" ] && skip "skip parallel run" && return
# note test will not do anything if MDS is not local
}
run_test 162 "path lookup sanity"
-test_163() {
- [ $PARALLEL == "yes" ] && skip "skip parallel run" && return
- remote_mds_nodsh && skip "remote MDS with nodsh" && return
- copytool --test $FSNAME || { skip "copytool not runnable: $?" && return; }
- copytool $FSNAME &
- sleep 1
- local uuid=$($LCTL get_param -n mdc.${FSNAME}-MDT0000-mdc-*.uuid)
- # this proc file is temporary and linux-only
- do_facet $SINGLEMDS lctl set_param mdt.${FSNAME}-MDT0000.mdccomm=$uuid ||\
- error "kernel->userspace send failed"
- kill -INT $!
-}
-run_test 163 "kernel <-> userspace comms"
-
test_169() {
# do directio so as not to populate the page cache
log "creating a 10 Mb file"
# /proc/sys/lnet/routes should look like this:
# Routing disabled/enabled
- # net hops state router
- # where net is a string like tcp0, hops >= 0, state is up/down,
+ # net hops priority state router
+ # where net is a string like tcp0, hops > 0, priority >= 0,
+ # state is up/down,
# router is a string like 192.168.1.1@tcp2
L1="^Routing (disabled|enabled)$"
- L2="^net +hops +state +router$"
- BR="^$NET +$N +(up|down) +$NID$"
+ L2="^net +hops +priority +state +router$"
+ BR="^$NET +$N +(0|1) +(up|down) +$NID$"
create_lnet_proc_files "routes"
check_lnet_proc_entry "routes.out" "/proc/sys/lnet/routes" "$BR" "$L1" "$L2"
check_lnet_proc_entry "routes.sys" "lnet.routes" "$BR" "$L1" "$L2"
$GETSTRIPE -v $DIR/$tfile
- local pattern=$($GETSTRIPE -v $DIR/$tfile |
- grep lmm_stripe_pattern | awk '{print $2}')
+ local pattern=$($GETSTRIPE -L $DIR/$tfile)
[ X"$pattern" = X"80000001" ] || error "pattern error ($pattern)"
local stripe_count=$($GETSTRIPE -c $DIR/$tfile) || error "getstripe"
}
run_test 234 "xattr cache should not crash on ENOMEM"
+test_235() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.4.52) ] &&
+ skip "Need MDS version at least 2.4.52" && return
+ flock_deadlock $DIR/$tfile
+ local RC=$?
+ case $RC in
+ 0)
+ ;;
+ 124) error "process hangs on a deadlock"
+ ;;
+ *) error "error executing flock_deadlock $DIR/$tfile"
+ ;;
+ esac
+}
+run_test 235 "LU-1715: flock deadlock detection does not work properly"
+
#
# tests that do cleanup/setup should be run at the end
#