From patchwork Tue Feb 17 15:45:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 5840631 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 76D99BF440 for ; Tue, 17 Feb 2015 15:46:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C11D20155 for ; Tue, 17 Feb 2015 15:46:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8DB7D20160 for ; Tue, 17 Feb 2015 15:46:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752432AbbBQPqn (ORCPT ); Tue, 17 Feb 2015 10:46:43 -0500 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:59153 "EHLO e23smtp05.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752234AbbBQPql (ORCPT ); Tue, 17 Feb 2015 10:46:41 -0500 Received: from /spool/local by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Feb 2015 01:46:39 +1000 Received: from d23dlp02.au.ibm.com (202.81.31.213) by e23smtp05.au.ibm.com (202.81.31.211) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 18 Feb 2015 01:46:37 +1000 Received: from d23relay07.au.ibm.com (d23relay07.au.ibm.com [9.190.26.37]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 81F8B2BB0040; Wed, 18 Feb 2015 02:46:37 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1HFkTOI35782834; Wed, 18 Feb 2015 02:46:37 +1100 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1HFk4uJ017199; Wed, 18 Feb 2015 02:46:04 +1100 Received: from localhost.in.ibm.com ([9.79.203.156]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t1HFk06k016888; Wed, 18 Feb 2015 02:46:02 +1100 From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , linux-btrfs@vger.kernel.org Subject: [PATCH] generic/325: Fix test case to work on 64K page size. Date: Tue, 17 Feb 2015 21:15:28 +0530 Message-Id: <1424187928-28487-1-git-send-email-chandan@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15021715-0017-0000-0000-000000CF767C Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@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 The test case passes 32K as the offset value to msync. This fails on machines with 64K page size. Fix this by creating a larger file and passing offset values which are multiples of 64K. Signed-off-by: Chandan Rajendra --- tests/generic/325 | 10 +++++----- tests/generic/325.out | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/generic/325 b/tests/generic/325 index c47e372..e62ac95 100755 --- a/tests/generic/325 +++ b/tests/generic/325 @@ -64,7 +64,7 @@ _init_flakey _mount_flakey # Create the file first. -$XFS_IO_PROG -f -c "pwrite -S 0xff 0 64K" $SCRATCH_MNT/foo | _filter_xfs_io +$XFS_IO_PROG -f -c "pwrite -S 0xff 0 256K" $SCRATCH_MNT/foo | _filter_xfs_io # Now sync the file data to disk using 'sync' and not an fsync. This is because # in btrfs the first fsync clears the btrfs inode full fsync flag, which must @@ -80,11 +80,11 @@ sync # This second msync() used to be a no-op for that btrfs bug (and the first fsync # didn't log the last 4Kb extent as expected too). $XFS_IO_PROG \ - -c "mmap -w 0 64K" \ + -c "mmap -w 0 256K" \ -c "mwrite -S 0xaa 0 4K" \ - -c "mwrite -S 0xbb 60K 4K" \ - -c "msync -s 0K 16K" \ - -c "msync -s 32K 32K" \ + -c "mwrite -S 0xbb 252K 4K" \ + -c "msync -s 0K 64K" \ + -c "msync -s 192K 64K" \ -c "munmap" \ $SCRATCH_MNT/foo | _filter_xfs_io diff --git a/tests/generic/325.out b/tests/generic/325.out index 9a78c3e..9373e01 100644 --- a/tests/generic/325.out +++ b/tests/generic/325.out @@ -1,19 +1,19 @@ QA output created by 325 -wrote 65536/65536 bytes at offset 0 +wrote 262144/262144 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) File content before crash/reboot: 0000000 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa * 0010000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff * -0170000 bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb +0770000 bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb * -0200000 +1000000 File content after crash/reboot and fs mount: 0000000 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa * 0010000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff * -0170000 bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb +0770000 bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb * -0200000 +1000000