From: Nathan Scott Date: Tue, 22 May 2001 06:07:23 +0000 (+0000) Subject: abstract out multiple quota .seq files into a shared common routine. X-Git-Tag: v1.1.0~1247 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=54392f47c404c135372adf6d03f3bfa3e41c5c15;p=users%2Fhch%2Fxfstests-dev.git abstract out multiple quota .seq files into a shared common routine. --- diff --git a/018 b/018 index 8b7fa10ea..ad7763e2e 100755 --- a/018 +++ b/018 @@ -128,20 +128,7 @@ _full " mount" 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 diff --git a/check b/check index 033128cf3..515c41263 100755 --- a/check +++ b/check @@ -159,7 +159,7 @@ timestamp=false 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. diff --git a/common.dump b/common.dump index 6f8349083..76de90618 100644 --- a/common.dump +++ b/common.dump @@ -473,6 +473,7 @@ _do_create_dumpdir_fill() _create_dumpdir_fill() { _wipe_fs + _setup_seq_out _mk_fillconfig1 _do_create_dumpdir_fill _stable_fs @@ -481,6 +482,7 @@ _create_dumpdir_fill() _create_dumpdir_fill2() { _wipe_fs + _setup_seq_out _mk_fillconfig2 _do_create_dumpdir_fill _stable_fs @@ -489,6 +491,7 @@ _create_dumpdir_fill2() _create_dumpdir_fill_perm() { _wipe_fs + _setup_seq_out _mk_fillconfig_perm _do_create_dumpdir_fill _stable_fs @@ -635,6 +638,7 @@ _dump_filter() -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/' \ diff --git a/common.rc b/common.rc index 5e3f0b5ea..b7d0e563b 100644 --- a/common.rc +++ b/common.rc @@ -419,9 +419,37 @@ _xfs_mounted() 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 ]