Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] fstests: fix test btrfs/017 (qgroup shared extent accounting test)
@ 2015-01-14 23:21 Filipe Manana
  2015-01-15 11:28 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Filipe Manana @ 2015-01-14 23:21 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs, Filipe Manana

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>
---
 tests/btrfs/017     | 6 +++++-
 tests/btrfs/017.out | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tests/btrfs/017 b/tests/btrfs/017
index 7937607..d00d7c8 100755
--- a/tests/btrfs/017
+++ b/tests/btrfs/017
@@ -56,7 +56,11 @@ _require_cloner
 
 rm -f $seqres.full
 
-_scratch_mkfs "--nodesize 4096"
+# Currently in btrfs the node/leaf size can not be smaller than the page
+# size (but it can be greater than the page size). So use the largest
+# supported node/leaf size (64Kb) so that the test can run on any platform
+# that Linux supports.
+_scratch_mkfs "--nodesize 65536" >>$seqres.full 2>&1
 _scratch_mount
 
 $XFS_IO_PROG -f -d -c "pwrite 0 8K" $SCRATCH_MNT/foo | _filter_xfs_io
diff --git a/tests/btrfs/017.out b/tests/btrfs/017.out
index 7658e2e..f940f3a 100644
--- a/tests/btrfs/017.out
+++ b/tests/btrfs/017.out
@@ -1,5 +1,5 @@
 QA output created by 017
 wrote 8192/8192 bytes at offset 0
 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-4096 4096
-4096 4096
+65536 65536
+65536 65536
-- 
2.1.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fstests: fix test btrfs/017 (qgroup shared extent accounting test)
  2015-01-14 23:21 [PATCH] fstests: fix test btrfs/017 (qgroup shared extent accounting test) Filipe Manana
@ 2015-01-15 11:28 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2015-01-15 11:28 UTC (permalink / raw)
  To: Filipe Manana; +Cc: fstests, linux-btrfs

On Wed, Jan 14, 2015 at 11:21:43PM +0000, Filipe Manana wrote:
> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-15 11:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-14 23:21 [PATCH] fstests: fix test btrfs/017 (qgroup shared extent accounting test) Filipe Manana
2015-01-15 11:28 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox