From patchwork Wed Jan 14 23:21:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 5635781 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DCEF89F357 for ; Wed, 14 Jan 2015 23:22:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 02294201B9 for ; Wed, 14 Jan 2015 23:22:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CD1D22017E for ; Wed, 14 Jan 2015 23:21:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751410AbbANXV6 (ORCPT ); Wed, 14 Jan 2015 18:21:58 -0500 Received: from victor.provo.novell.com ([137.65.250.26]:42850 "EHLO prv3-mh.provo.novell.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751221AbbANXV6 (ORCPT ); Wed, 14 Jan 2015 18:21:58 -0500 Received: from debian3.lan (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (NOT encrypted); Wed, 14 Jan 2015 16:21:50 -0700 From: Filipe Manana To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH] fstests: fix test btrfs/017 (qgroup shared extent accounting test) Date: Wed, 14 Jan 2015 23:21:43 +0000 Message-Id: <1421277703-32154-1-git-send-email-fdmanana@suse.com> X-Mailer: git-send-email 2.1.3 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: David Sterba --- 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