stop mds${mds_index}
do_facet mds${mds_index} $cmd || rc=$?
- start mds${mds_index} $devname $MDS_MOUNT_OPTS
+ start mds${mds_index} $devname $MDS_MOUNT_OPTS || error "start failed"
df $MOUNT > /dev/null 2>&1
[ $rc -ne 0 ] && error "e2fsck should not report error upon "\
"short/long symlink MDT: rc=$rc"
stop mds${mdt_index}
do_facet mds${mdt_index} $cmd || rc=$?
- start mds${mdt_index} $devname $MDS_MOUNT_OPTS
+ start mds${mdt_index} $devname $MDS_MOUNT_OPTS ||
+ error "mount mds${mdt_index} failed"
df $MOUNT > /dev/null 2>&1
[ $rc -ne 0 ] && break
done
touch $WDIR/$tfile
stop mds${mdt_index}
- start mds${mdt_index} $mdtdevname $MDS_MOUNT_OPTS
+ start mds${mdt_index} $mdtdevname $MDS_MOUNT_OPTS ||
+ error "mount mds${mdt_index} failed"
#define OBD_FAIL_OSD_LMA_INCOMPAT 0x194
do_facet mds${mdt_index} lctl set_param fail_loc=0x194
rm -fr $DIR/d33
test_mkdir -p $DIR/d33
chown $RUNAS_ID $DIR/d33
- $RUNAS $OPENFILE -f 1286739555 $DIR/d33/f33 && error "create" || true
+ $RUNAS $OPENFILE -f 1286739555 $DIR/d33/f33
}
-run_test 33b "test open file with malformed flags (No panic and return error)"
+run_test 33b "test open file with malformed flags (No panic)"
test_33c() {
[ $PARALLEL == "yes" ] && skip "skip parallel run" && return
}
run_test 51d "check object distribution ===================="
+test_51e() {
+ if [ "$(facet_fstype $SINGLEMDS)" != ldiskfs ]; then
+ skip "Only applicable to ldiskfs-based MDTs"
+ return
+ fi
+
+ test_mkdir -c1 $DIR/$tdir || error "create $tdir failed"
+ test_mkdir -c1 $DIR/$tdir/d0 || error "create d0 failed"
+
+ touch $DIR/$tdir/d0/foo
+ createmany -l $DIR/$tdir/d0/foo $DIR/$tdir/d0/f- 65001 &&
+ error "file exceed 65000 nlink limit!"
+ unlinkmany $DIR/$tdir/d0/f- 65001
+ return 0
+}
+run_test 51e "check file nlink limit"
+
test_52a() {
[ -f $DIR/$tdir/foo ] && chattr -a $DIR/$tdir/foo
test_mkdir -p $DIR/$tdir
}
run_test 56y "lfs find -L raid0|released"
+test_56z() { # LU-4824
+ # This checks to make sure 'lfs find' continues after errors
+ # There are two classes of errors that should be caught:
+ # - If multiple paths are provided, all should be searched even if one
+ # errors out
+ # - If errors are encountered during the search, it should not terminate
+ # early
+ local i
+ test_mkdir $DIR/$tdir
+ for i in d{0..9}; do
+ test_mkdir $DIR/$tdir/$i
+ done
+ touch $DIR/$tdir/d{0..9}/$tfile
+ $LFS find $DIR/non_existent_dir $DIR/$tdir &&
+ error "$LFS find did not return an error"
+ # Make a directory unsearchable. This should NOT be the last entry in
+ # directory order. Arbitrarily pick the 6th entry
+ chmod 700 $(lfs find $DIR/$tdir -type d | sed '6!d')
+ local count=$($RUNAS $LFS find $DIR/non_existent $DIR/$tdir | wc -l)
+ # The user should be able to see 10 directories and 9 files
+ [ $count == 19 ] || error "$LFS find did not continue after error"
+}
+run_test 56z "lfs find should continue after an error"
+
test_57a() {
[ $PARALLEL == "yes" ] && skip "skip parallel run" && return
# note test will not do anything if MDS is not local
dd if=/dev/urandom of=$file bs=4k count=4 2>&1 > /dev/null
idx=$(printf %04x $i)
BEFORE=$(get_osd_param $list *OST*$idx stats |
- awk '$1 == "cache_access" {sum += $2}
+ awk '$1 == "cache_access" {sum += $7}
END { printf("%0.0f", sum) }')
cancel_lru_locks osc
cat $file >/dev/null
AFTER=$(get_osd_param $list *OST*$idx stats |
- awk '$1 == "cache_access" {sum += $2}
+ awk '$1 == "cache_access" {sum += $7}
END { printf("%0.0f", sum) }')
echo BEFORE:$BEFORE AFTER:$AFTER
function roc_hit() {
local list=$(comma_list $(osts_nodes))
echo $(get_osd_param $list '' stats |
- awk '$1 == "cache_hit" {sum += $2}
+ awk '$1 == "cache_hit" {sum += $7}
END { printf("%0.0f", sum) }')
}
}
run_test 171 "test libcfs_debug_dumplog_thread stuck in do_exit() ======"
-# it would be good to share it with obdfilter-survey/libecho code
+# it would be good to share it with obdfilter-survey/iokit-libecho code
setup_obdecho_osc () {
local rc=0
local ost_nid=$1
# The new system calls are supported in glibc >= 2.14.
test_237() {
- echo "Test file_handle syscalls" > $DIR/$tfile
+ echo "Test file_handle syscalls" > $DIR/$tfile ||
+ error "write failed"
check_fhandle_syscalls $DIR/$tfile ||
error "check_fhandle_syscalls failed"
}