]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs/287: make the test work when compression is enabled
authorFilipe Manana <fdmanana@suse.com>
Tue, 29 Oct 2024 17:21:28 +0000 (17:21 +0000)
committerZorro Lang <zlang@kernel.org>
Wed, 30 Oct 2024 08:21:26 +0000 (16:21 +0800)
commitd9228b41b30fa00973153d688638a336081b2627
tree00be6456debd1f5171f929a06d0d63b5d4816a95
parent7838e3082b15354323f29efbcf6380dddb11a751
btrfs/287: make the test work when compression is enabled

When running btrfs/287 with compression enabled (mount options), the test
fails because it expects to find 4M extents, however compression limits
the maximum size of extents to 128K, breaking the tests' expectations.

Example:

  $ MOUNT_OPTIONS="-o compress" ./check btrfs/287
  FSTYP         -- btrfs
  PLATFORM      -- Linux/x86_64 debian0 6.12.0-rc4-btrfs-next-177+ #1 SMP PREEMPT_DYNAMIC Thu Oct 24 17:14:37 WEST 2024
  MKFS_OPTIONS  -- /dev/sdc
  MOUNT_OPTIONS -- -o compress /dev/sdc /home/fdmanana/btrfs-tests/scratch_1

  btrfs/287 2s ... - output mismatch (see /home/fdmanana/git/hub/xfstests/results//btrfs/287.out.bad)
      --- tests/btrfs/287.out 2024-10-19 18:21:30.451644840 +0100
      +++ /home/fdmanana/git/hub/xfstests/results//btrfs/287.out.bad 2024-10-29 16:31:20.926612583 +0000
      @@ -25,22 +25,14 @@
       resolve first extent with ignore offset option:
       inode 257 offset 16777216 root 5
       inode 257 offset 8388608 root 5
      -inode 257 offset 2097152 root 5
       resolve first extent +1M offset:
      -inode 257 offset 17825792 root 5
      -inode 257 offset 9437184 root 5
      ...
      (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/btrfs/287.out /home/fdmanana/git/hub/xfstests/results//btrfs/287.out.bad'  to see the entire diff)

  HINT: You _MAY_ be missing kernel fix:
        0cad8f14d70c btrfs: fix backref walking not returning all inode refs

  Ran: btrfs/287
  Failures: btrfs/287
  Failed 1 of 1 tests

Fix this by creating the two 4M extents with fallocate, so that the test
works regardless of compression being enabled or not.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/287
tests/btrfs/287.out