mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests shared/298: various fixes
fix shared/298:
* don't include common/config, not needed and breaks
stuff when $SCRATCH_DEV_POOL is defined:
Error: $SCRATCH_DEV should be unset when $SCRATCH_DEV_POOL is set
* make sure xfs_io has fiemap, we'll need it
* add -F to the xfs_io invocation, again, for use on
old xfsprogs on non-xfs filesystems
* ignore ENOSPC errors from "garbage" loop; the only goal
is to fill it, ENOSPC doesn't matter.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
committed by
Rich Johnston
parent
05aab5cf04
commit
ecd7386cc9
+6
-5
@@ -28,12 +28,12 @@ echo "QA output created by $seq"
|
|||||||
status=1 # failure is the default!
|
status=1 # failure is the default!
|
||||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||||
|
|
||||||
. common/config
|
. ./common/rc
|
||||||
. common/rc
|
|
||||||
|
|
||||||
_supported_fs ext4 xfs
|
_supported_fs ext4 xfs
|
||||||
_supported_os Linux
|
_supported_os Linux
|
||||||
_require_fstrim
|
_require_fstrim
|
||||||
|
_require_xfs_io_fiemap
|
||||||
_require_fs_space $TEST_DIR 307200
|
_require_fs_space $TEST_DIR 307200
|
||||||
[ "$FSTYP" = "ext4" ] && _require_dumpe2fs
|
[ "$FSTYP" = "ext4" ] && _require_dumpe2fs
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ _cleanup()
|
|||||||
|
|
||||||
get_holes()
|
get_holes()
|
||||||
{
|
{
|
||||||
$XFS_IO_PROG -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
|
$XFS_IO_PROG -F -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
|
||||||
}
|
}
|
||||||
|
|
||||||
get_free_sectors()
|
get_free_sectors()
|
||||||
@@ -136,9 +136,10 @@ $MKFS_PROG -t $FSTYP $MKFS_OPTIONS $loop_dev &> /dev/null
|
|||||||
$MOUNT_PROG $loop_dev $loop_mnt
|
$MOUNT_PROG $loop_dev $loop_mnt
|
||||||
|
|
||||||
echo -n "Generating garbage on loop..."
|
echo -n "Generating garbage on loop..."
|
||||||
|
# Goal is to fill it up, ignore any errors.
|
||||||
for i in `seq 1 10`; do
|
for i in `seq 1 10`; do
|
||||||
mkdir $loop_mnt/$i
|
mkdir $loop_mnt/$i &> /dev/null
|
||||||
cp -r $here/* $loop_mnt/$i
|
cp -r $here/* $loop_mnt/$i &> /dev/null || break
|
||||||
done
|
done
|
||||||
|
|
||||||
# Get reference fiemap, this can contain i.e. uninitialized inode table
|
# Get reference fiemap, this can contain i.e. uninitialized inode table
|
||||||
|
|||||||
Reference in New Issue
Block a user