From patchwork Tue Feb 9 01:11:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 8256731 Return-Path: X-Original-To: patchwork-linux-btrfs@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 8925F9F6DA for ; Tue, 9 Feb 2016 01:12:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 73EC82027D for ; Tue, 9 Feb 2016 01:12:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5823520272 for ; Tue, 9 Feb 2016 01:12:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932691AbcBIBML (ORCPT ); Mon, 8 Feb 2016 20:12:11 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:23232 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932359AbcBIBMJ (ORCPT ); Mon, 8 Feb 2016 20:12:09 -0500 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u191C0PW014237 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 9 Feb 2016 01:12:00 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u191Bx0t012069 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 9 Feb 2016 01:12:00 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u191BxHj027486; Tue, 9 Feb 2016 01:11:59 GMT Received: from localhost (/10.145.178.207) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 08 Feb 2016 17:11:59 -0800 Subject: [PATCH 02/23] xfstests: filter whitespace in 128 and 132 From: "Darrick J. Wong" To: david@fromorbit.com, darrick.wong@oracle.com Cc: linux-btrfs@vger.kernel.org, Christoph Hellwig , fstests@vger.kernel.org, xfs@oss.sgi.com Date: Mon, 08 Feb 2016 17:11:58 -0800 Message-ID: <20160209011158.23099.47980.stgit@birch.djwong.org> In-Reply-To: <20160209011145.23099.95354.stgit@birch.djwong.org> References: <20160209011145.23099.95354.stgit@birch.djwong.org> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Seems either I have a different lsattr version, or different mount points cause differences in the golden output. Send the lsattr output through the whitespaces filter so that it works everywhere. The lsattr output /does/ change depending on mountpoints. Ick. I'd actually changed it to the long format output because line length in the short format changes every time the flags change. Signed-off-by: Christoph Hellwig [darrick.wong@oracle.com: update changelog] Signed-off-by: Darrick J. Wong --- tests/xfs/128 | 2 +- tests/xfs/128.out | 8 ++++---- tests/xfs/132 | 10 +++++----- tests/xfs/132.out | 40 ++++++++++++++++++++-------------------- 4 files changed, 30 insertions(+), 30 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tests/xfs/128 b/tests/xfs/128 index a96291a..c9547fb 100755 --- a/tests/xfs/128 +++ b/tests/xfs/128 @@ -97,7 +97,7 @@ c13=$(_md5_checksum "$testdir/file3") c14=$(_md5_checksum "$testdir/file4") echo "Defragment" -lsattr -l "$testdir/" | _filter_scratch +lsattr -l "$testdir/" | _filter_scratch | _filter_spaces xfs_fsr -v -d "$testdir/file1" >> "$seqres.full" xfs_fsr -v -d "$testdir/file2" >> "$seqres.full" # fsr probably breaks the link xfs_fsr -v -d "$testdir/file3" >> "$seqres.full" # fsr probably breaks the link diff --git a/tests/xfs/128.out b/tests/xfs/128.out index 7e72dcd..0ac06db 100644 --- a/tests/xfs/128.out +++ b/tests/xfs/128.out @@ -11,10 +11,10 @@ c650f1cf6c9f07b22e3e21ec7d49ded5 SCRATCH_MNT/test-128/file2 56ed2f712c91e035adeeb26ed105a982 SCRATCH_MNT/test-128/file3 b81534f439aac5c34ce3ed60a03eba70 SCRATCH_MNT/test-128/file4 Defragment -SCRATCH_MNT/test-128/file1 --- -SCRATCH_MNT/test-128/file2 --- -SCRATCH_MNT/test-128/file3 --- -SCRATCH_MNT/test-128/file4 --- +SCRATCH_MNT/test-128/file1 --- +SCRATCH_MNT/test-128/file2 --- +SCRATCH_MNT/test-128/file3 --- +SCRATCH_MNT/test-128/file4 --- b81534f439aac5c34ce3ed60a03eba70 SCRATCH_MNT/test-128/file1 c650f1cf6c9f07b22e3e21ec7d49ded5 SCRATCH_MNT/test-128/file2 56ed2f712c91e035adeeb26ed105a982 SCRATCH_MNT/test-128/file3 diff --git a/tests/xfs/132 b/tests/xfs/132 index 79a6d57..9c57c3b 100755 --- a/tests/xfs/132 +++ b/tests/xfs/132 @@ -87,32 +87,32 @@ for i in `seq 2 $nr`; do done _test_remount free_blocks1=$(stat -f "$testdir" -c '%f') -lsattr -l $testdir/ | _filter_test_dir +lsattr -l $testdir/ | _filter_test_dir | _filter_spaces echo "funshare part of a file" "$XFS_IO_PROG" -f -c "falloc 0 $((sz / 2))" "$testdir/file2" _test_remount -lsattr -l $testdir/ | _filter_test_dir +lsattr -l $testdir/ | _filter_test_dir | _filter_spaces echo "funshare some of the copies" "$XFS_IO_PROG" -f -c "falloc 0 $sz" "$testdir/file2" "$XFS_IO_PROG" -f -c "falloc 0 $sz" "$testdir/file3" _test_remount free_blocks2=$(stat -f "$testdir" -c '%f') -lsattr -l $testdir/ | _filter_test_dir +lsattr -l $testdir/ | _filter_test_dir | _filter_spaces echo "funshare the rest of the files" "$XFS_IO_PROG" -f -c "falloc 0 $sz" "$testdir/file4" "$XFS_IO_PROG" -f -c "falloc 0 $sz" "$testdir/file1" _test_remount free_blocks3=$(stat -f "$testdir" -c '%f') -lsattr -l $testdir/ | _filter_test_dir +lsattr -l $testdir/ | _filter_test_dir | _filter_spaces echo "Rewrite the original file" _pwrite_byte 0x65 0 $sz "$testdir/file1" >> "$seqres.full" _test_remount free_blocks4=$(stat -f "$testdir" -c '%f') -lsattr -l $testdir/ | _filter_test_dir +lsattr -l $testdir/ | _filter_test_dir | _filter_spaces #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4 _within_tolerance "free blocks after reflinking" $free_blocks1 $((free_blocks0 - blks)) $margin -v diff --git a/tests/xfs/132.out b/tests/xfs/132.out index fd2b7bd..f32db7d 100644 --- a/tests/xfs/132.out +++ b/tests/xfs/132.out @@ -1,30 +1,30 @@ QA output created by 132 Create the original file blocks Create the reflink copies -TEST_DIR/test-132/file1 --- -TEST_DIR/test-132/file2 --- -TEST_DIR/test-132/file3 --- -TEST_DIR/test-132/file4 --- +TEST_DIR/test-132/file1 --- +TEST_DIR/test-132/file2 --- +TEST_DIR/test-132/file3 --- +TEST_DIR/test-132/file4 --- funshare part of a file -TEST_DIR/test-132/file1 --- -TEST_DIR/test-132/file2 --- -TEST_DIR/test-132/file3 --- -TEST_DIR/test-132/file4 --- +TEST_DIR/test-132/file1 --- +TEST_DIR/test-132/file2 --- +TEST_DIR/test-132/file3 --- +TEST_DIR/test-132/file4 --- funshare some of the copies -TEST_DIR/test-132/file1 --- -TEST_DIR/test-132/file2 No_COW -TEST_DIR/test-132/file3 No_COW -TEST_DIR/test-132/file4 --- +TEST_DIR/test-132/file1 --- +TEST_DIR/test-132/file2 No_COW +TEST_DIR/test-132/file3 No_COW +TEST_DIR/test-132/file4 --- funshare the rest of the files -TEST_DIR/test-132/file1 No_COW -TEST_DIR/test-132/file2 No_COW -TEST_DIR/test-132/file3 No_COW -TEST_DIR/test-132/file4 No_COW +TEST_DIR/test-132/file1 No_COW +TEST_DIR/test-132/file2 No_COW +TEST_DIR/test-132/file3 No_COW +TEST_DIR/test-132/file4 No_COW Rewrite the original file -TEST_DIR/test-132/file1 No_COW -TEST_DIR/test-132/file2 No_COW -TEST_DIR/test-132/file3 No_COW -TEST_DIR/test-132/file4 No_COW +TEST_DIR/test-132/file1 No_COW +TEST_DIR/test-132/file2 No_COW +TEST_DIR/test-132/file3 No_COW +TEST_DIR/test-132/file4 No_COW free blocks after reflinking is in range free blocks after nocow'ing some copies is in range free blocks after nocow'ing all copies is in range