This is meant to test ENOSPC, but we're dd'ing /dev/zero, which won't
fill up anything with compression on.
Additionally we're killing dd and then immediately trying to unmount.
With compression we could have references to the inode being held by the
async compression workers, so sometimes this will fail with EBUSY on the
unmount.
A better test would be to use slightly compressible data; use _ddt.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
[ changed to use _ddt ]
for ((i=0; i < num_iterations; i++))
do
# File will be opened with O_TRUNC each time
- dd if=/dev/zero of=$SCRATCH_MNT/SPACE_CONSUMER bs=1M \
+ _ddt of=$SCRATCH_MNT/SPACE_CONSUMER bs=1M \
>> $seqres.full 2>&1
sleep $enospc_time
done