btrfs/017: support all possible page sizes
authorFilipe Manana <fdmanana@suse.com>
Wed, 21 Jan 2015 05:19:21 +0000 (16:19 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 21 Jan 2015 05:19:21 +0000 (16:19 +1100)
commitafadb6e5958c5acf2425d6a8a9372b63afcb4f2a
tree563529a19bb1b59132387a41db5a7458324b82f9
parentb89defa9d8f095ea207e4e262d7ca9be66eb4ee8
btrfs/017: support all possible page sizes

Currently this test fails on 2 situations:

1) The scratch device supports trim/discard. In this case any modern
   version of mkfs.btrfs outputs a message (to stderr) informing that
   a trim is performed, which the golden output doesn't expect:

   btrfs/017  - output mismatch (see /git/xfstests/results//btrfs/017.out.bad)
       --- tests/btrfs/017.out 2015-01-06 11:14:22.730143144 +0000
       +++ /git/xfstests/results//btrfs/017.out.bad 2015-01-14 22:33:01.582195719 +0000
       @@ -1,4 +1,5 @@
        QA output created by 017
       +Performing full device TRIM (100.00GiB) ...
        wrote 8192/8192 bytes at offset 0
          XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
        4096 4096
        ...
        (Run 'diff -u tests/btrfs/017.out /git/xfstests/results//btrfs/017.out.bad'  to see the entire diff)

    So like others tests do, just redirect mkfs' standard error.

2) On platforms with a page size greater than 4Kb. At the moment btrfs
   doesn't support a node/leaf size smaller than the page size, but it
   supports a larger one. So use the max supported node size (64Kb) so
   that the test runs on any platform currently supported by Linux.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/btrfs/017
tests/btrfs/017.out