mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Make the SCRATCH_DEV optional
Tests will fail gracefully if there is no SCRATCH_DEV defined, so change the check script to allow it, and update README to reflect this. This just makes it simpler to set up the tests, at the expense of coverage. Long term it might be nice to allow either SCRATCH_DEV xor TEST_DEV to be missing, but for now this is simple. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -160,26 +160,28 @@ MOUNT_OPTIONS -- $FULL_MOUNT_OPTIONS
|
||||
|
||||
EOF
|
||||
|
||||
umount $SCRATCH_DEV 2>/dev/null
|
||||
# call the overridden mkfs - make sure the FS is built
|
||||
# the same as we'll create it later.
|
||||
if [ ! -z "$SCRATCH_DEV"]; then
|
||||
umount $SCRATCH_DEV 2>/dev/null
|
||||
# call the overridden mkfs - make sure the FS is built
|
||||
# the same as we'll create it later.
|
||||
|
||||
if ! _scratch_mkfs $flag >$tmp.err 2>&1
|
||||
then
|
||||
echo "our local _scratch_mkfs routine ..."
|
||||
cat $tmp.err
|
||||
echo "check: failed to mkfs \$SCRATCH_DEV using specified options"
|
||||
exit 1
|
||||
fi
|
||||
if ! _scratch_mkfs $flag >$tmp.err 2>&1
|
||||
then
|
||||
echo "our local _scratch_mkfs routine ..."
|
||||
cat $tmp.err
|
||||
echo "check: failed to mkfs \$SCRATCH_DEV using specified options"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# call the overridden mount - make sure the FS mounts with
|
||||
# the same options that we'll mount with later.
|
||||
if ! _scratch_mount >$tmp.err 2>&1
|
||||
then
|
||||
echo "our local mount routine ..."
|
||||
cat $tmp.err
|
||||
echo "check: failed to mount \$SCRATCH_DEV using specified options"
|
||||
exit 1
|
||||
# call the overridden mount - make sure the FS mounts with
|
||||
# the same options that we'll mount with later.
|
||||
if ! _scratch_mount >$tmp.err 2>&1
|
||||
then
|
||||
echo "our local mount routine ..."
|
||||
cat $tmp.err
|
||||
echo "check: failed to mount \$SCRATCH_DEV using specified options"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
seq="check"
|
||||
|
||||
Reference in New Issue
Block a user