]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
fstests: btrfs: Use compressible data
authorAnand Jain <anand.jain@oracle.com>
Mon, 6 Feb 2017 07:55:39 +0000 (15:55 +0800)
committerEryu Guan <eguan@redhat.com>
Tue, 7 Feb 2017 04:15:33 +0000 (12:15 +0800)
commit96459fb68785a9f4931dd9887fd5f1f2bf831856
treee0fa928cd9696984384b2ed3222aeac53dcb1cf0
parentc7320b4cacf6c2446f8bba84b88cb4d3b9097c58
fstests: btrfs: Use compressible data

/dev/urandom is incompressible and, /dev/zero is highly compressible,
so both are less effective in testing the compress code logic in btrfs.

This patch introduces a text data generator
 cat /dev/urandom | od
to populate the files where /dev/urandom is currently being used in the
btrfs test cases.

And updates the _populate_fs() with a new option -c, so to instruct
to use the compressible data to populate the file(s).

[eguan: add comments, fix indention]

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/rc
tests/btrfs/002
tests/btrfs/003
tests/btrfs/008
tests/btrfs/011
tests/btrfs/016
tests/btrfs/022
tests/btrfs/027