nobody=4 # define this uid/gid as a number
do_quota_check=true # do quota check if quotas enabled
-# install our cleaner
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
# start inventory from a known base - move it aside for test
for dir in /var/xfsdump/inventory /var/lib/xfsdump/inventory; do
if [ -d $dir ]; then
# Cleanup created dirs and files
# Called by trap
#
-_cleanup()
+_cleanup_dump()
{
# Some tests include this before checking _supported_fs xfs
# and the sleeps & checks here get annoying
fi
cd $here
- rm -f $tmp.*
if [ -n "$DEBUGDUMP" ]; then
# save it for inspection
mv $dir.$seq $dir
done
- if [ $status -ne $NOTRUNSTS ]; then
+ if [ -f ${RESULT_DIR}/require_scratch ] && [ $status -ne $NOTRUNSTS ]; then
# Sleep added to stop _check_scratch_fs from complaining that the
# scratch_dev is still busy
sleep 10
if $FSSTRESS_PROG | grep -q copyrange; then
FSSTRESS_AVOID="-f copyrange=0 $FSSTRESS_AVOID"
fi
+ if $FSSTRESS_PROG | grep -q splice; then
+ FSSTRESS_AVOID="-f splice=0 $FSSTRESS_AVOID"
+ fi
echo ""
echo "-----------------------------------------------"
-e 's/id:[[:space:]]*[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/ID: ID/' \
-e 's/\[y\/n\][- ]----------------------*/\[y\/n\]/' \
-e '/skip attribute set/d' \
+ -e '/xfsrestore: NOTE: attempt to reserve [0-9]* bytes for.*Operation not supported/d' \
| perl -ne '
# filter out all the output between the lines "Dump Summary:"
# and "Dump Status:"
_check_quota 'xfsdump_quotas' 'xfsdump_quotas_group' 'xfsdump_quotas_proj'
}
+_count_dir_files()
+{
+ local dir=$1
+
+ local ndirs=$(find $dir -type d | wc -l)
+ local nents=$(find $dir | wc -l)
+
+ echo "$ndirs directories and $nents entries"
+}
+
+_count_dumpdir_files()
+{
+ _count_dir_files $dump_dir
+}
+
+_count_restoredir_files()
+{
+ _count_dir_files $restore_dir/$dump_sdir
+}
+
# make sure this script returns success
/bin/true