From patchwork Fri Jan 31 15:53:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Whitney X-Patchwork-Id: 315718 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44BA82C00A1 for ; Sat, 1 Feb 2014 02:53:37 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754033AbaAaPxg (ORCPT ); Fri, 31 Jan 2014 10:53:36 -0500 Received: from mail-qc0-f171.google.com ([209.85.216.171]:64620 "EHLO mail-qc0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753976AbaAaPxf (ORCPT ); Fri, 31 Jan 2014 10:53:35 -0500 Received: by mail-qc0-f171.google.com with SMTP id n7so7395084qcx.30 for ; Fri, 31 Jan 2014 07:53:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=oqeyWJbf/0UTdoUvCWbVf+nRi1iuD2q5FF+Gxfv5lVg=; b=XUoM0TESgpE0psp7oXYzbDIgU5fxlAt5UVzwcfqAa2ENcfH89feJAqFJR1fuCODvDZ LN3/I5NePCPYQyc1XZKTjE+weuCX0JEk1Sb6I704Dm3kN75HILwiueyzqH7mJpQsgfet 2eC1cgPlxqECVFR/LvXezyGunyfrvuDZg7c0c5+EfAkci/C7EOByG9VFJEUfNjjgjx4B uicRYkcVbSFwQGqzStyyR+l7fOa1IM07x70cGf6RNmcSYVOrHODtipVDBd2JeWzvSErk KfVNtZLDdEEVpjfWHFFZ3p4Wwh2STTSkJ5aJB+Zx0OwIkA7f5BauLQKybfYHAK30XtaY ZSdw== X-Received: by 10.224.22.129 with SMTP id n1mr32680193qab.103.1391183615063; Fri, 31 Jan 2014 07:53:35 -0800 (PST) Received: from wallace (c-75-67-250-69.hsd1.nh.comcast.net. [75.67.250.69]) by mx.google.com with ESMTPSA id u75sm13935357qgd.23.2014.01.31.07.53.34 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 Jan 2014 07:53:34 -0800 (PST) Date: Fri, 31 Jan 2014 10:53:32 -0500 From: Eric Whitney To: xfs@oss.sgi.com Cc: linux-ext4@vger.kernel.org Subject: [PATCH v2] xfstests: avoid ext4/306 failures caused by incompatible mount options Message-ID: <20140131155332.GB2385@wallace> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org ext4/306 will fail when mounting the ext3 file system it creates if an ext3-incompatible mount option is applied by _scratch_mount. This can happen if EXT_MOUNT_OPTIONS is defined appropriately in the test environment. For example, the block_validity option is commonly used to enhance ext4 testing, and it is not supported by ext3. Fix this by instead creating an ext4 file system without extents as a functionally equivalent substitute. This will also eliminate a dependency for ext3 support on the test system. Signed-off-by: Eric Whitney Reviewed-by: Eric Sandeen --- tests/ext4/306 | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/tests/ext4/306 b/tests/ext4/306 index 398c4c0..9559cf2 100755 --- a/tests/ext4/306 +++ b/tests/ext4/306 @@ -45,29 +45,22 @@ _supported_os Linux _require_scratch -# This needs to mount ext3; might require ext3 driver, or ext4 -# might handle it itself. Find out if we have it one way or another. -modprobe ext3 > /dev/null 2>&1 -grep -q ext3 /proc/filesystems || _notrun "This test requires ext3 support" - rm -f $seqres.full -# Make a small ext3 fs, (extents disabled) & mount it -yes | mkfs.ext3 $SCRATCH_DEV 512m >> $seqres.full 2>&1 -_scratch_mount -t ext3 || _fail "couldn't mount fs as ext3" +# Make a small ext4 fs with extents disabled & mount it +yes | mkfs.ext4 -O ^extents $SCRATCH_DEV 512m >> $seqres.full 2>&1 +_scratch_mount || _fail "couldn't mount fs" + # Create a small non-extent-based file echo "Create 1m testfile1" $XFS_IO_PROG -f $SCRATCH_MNT/testfile1 -c "pwrite 0 1m" | _filter_xfs_io + +# Create a large non-extent-based file filling the fs; this will run out & fail echo "Create testfile2 to fill the fs" -# A large non-extent-based file filling the fs; this will run out & fail $XFS_IO_PROG -f $SCRATCH_MNT/testfile2 -c "pwrite 0 512m" | _filter_xfs_io - -# Remount as ext4 -_scratch_unmount -_scratch_mount -t ext4 || _fail "couldn't remount fs as ext4" df -h $SCRATCH_MNT >> $seqres.full -# Grow it by 512m +# Grow fs by 512m echo "Resize to 1g" resize2fs $SCRATCH_DEV 1g >> $seqres.full 2>&1 || _fail "Could not resize to 1g" df -h $SCRATCH_MNT >> $seqres.full