mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seq.full 2>&1 \
|| _fail "mount failed"
-if src/feature -U $SCRATCH_DEV
-then
- if src/feature -G $SCRATCH_DEV
- then
- ln $seq.ugquota $seq.out
- else
- ln $seq.usrquota $seq.out
- fi
-elif src/feature -G $SCRATCH_DEV
-then
- ln $seq.grpquota $seq.out
-else
- ln $seq.noquota $seq.out
-fi
+_setup_seq_out
# generate some log traffic - but not too much - life gets a little
# more complicated if the log wraps around. This traffic is
if [ ! -z "$MOUNT_OPTIONS" ]
then
- echo "check: \$MOUNT_OPTIONS specifed - \"$MOUNT_OPTIONS\""
+ echo "check: \$MOUNT_OPTIONS specified - \"$MOUNT_OPTIONS\""
umount $TEST_DEV
# call the overridden mount - make sure the FS starts as
# the same as we'll set it later.
_create_dumpdir_fill()
{
_wipe_fs
+ _setup_seq_out
_mk_fillconfig1
_do_create_dumpdir_fill
_stable_fs
_create_dumpdir_fill2()
{
_wipe_fs
+ _setup_seq_out
_mk_fillconfig2
_do_create_dumpdir_fill
_stable_fs
_create_dumpdir_fill_perm()
{
_wipe_fs
+ _setup_seq_out
_mk_fillconfig_perm
_do_create_dumpdir_fill
_stable_fs
-e 's/date:[ ].*/date: DATE/' \
-e 's/dump begun .*/dump begun DATE/' \
-e 's/[0-9][0-9]* seconds/SECS seconds/' \
+ -e 's/restore.[0-9][0-9]*/restore.PID/' \
-e '/: dump size/s/[1-9][0-9]*/NUM/' \
-e '/dump size:/s/[1-9][0-9]*/NUM/' \
-e '/media file size/s/[1-9][0-9]*/NUM/' \
fi
}
+
+# setup the .out file link, depending on which form of quota is
+# enabled as this often influences how the test output appears.
+# [NB: SCRATCH_DEV must be mounted for this to work]
+#
+_setup_seq_out()
+{
+ # this lets us phase use of this into the dump/restore tests easier...
+ [ -f $seq.ugquota -a -f $seq.noquota -a $seq.usrquota -a $seq.grpquota ] \
+ || return
+
+ rm -f $seq.out
+ if src/feature -U $SCRATCH_DEV
+ then
+ if src/feature -G $SCRATCH_DEV
+ then
+ ln $seq.ugquota $seq.out
+ else
+ ln $seq.usrquota $seq.out
+ fi
+ elif src/feature -G $SCRATCH_DEV
+ then
+ ln $seq.grpquota $seq.out
+ else
+ ln $seq.noquota $seq.out
+ fi
+}
+
+
# remount a FS to a new mode (ro or rw)
#
-
_remount()
{
if [ $# -ne 2 ]