}
+_require_btrfs_no_compress()
+{
+ if _normalize_mount_options | grep -q "compress"; then
+ _notrun "This test requires no compression enabled"
+ fi
+}
+
_check_btrfs_filesystem()
{
device=$1
[ $? -eq 0 ] && _notrun "test requires a non-lvm scratch device"
}
+_require_no_compress()
+{
+ case "$FSTYP" in
+ btrfs)
+ _require_btrfs_no_compress
+ ;;
+ *)
+ ;;
+ esac
+}
+
# we need the scratch device and it should be checked post test.
_require_scratch()
{
_require_scratch
_require_btrfs_qgroup_report
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
_scratch_mkfs >/dev/null
# Use enospc_debug mount option to trigger restrict space info check
_scratch_mount "-o enospc_debug"
# We at least need 2GB of free space on $SCRATCH_DEV
_require_scratch_size $((2 * 1024 * 1024))
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
_supported_fs btrfs
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
# Need at least 2GiB
_require_scratch_size $((2 * 1024 * 1024))
_scratch_mkfs > /dev/null 2>&1
_supported_fs btrfs
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
_require_scratch_size $((2 * 1024 * 1024))
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
_require_command "$BLKZONE_PROG" blkzone
_require_zoned_device "$SCRATCH_DEV"
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
get_data_bg()
{
$BTRFS_UTIL_PROG inspect-internal dump-tree -t CHUNK $SCRATCH_DEV |\
_supported_fs generic
_require_scratch
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
echo "------------------------------"
echo "write until ENOSPC test"
echo "------------------------------"
_require_test_program "feature"
_require_aiodio aio-dio-eof-race
+# This test requires specific data space usage, skip if we have compression
+# enabled.
+_require_no_compress
+
# limit the filesystem size, to save the time of filling filesystem
_scratch_mkfs_sized $((256 * 1024 * 1024)) >>$seqres.full 2>&1
_scratch_mount