From patchwork Mon Oct 6 18:23:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Paulson X-Patchwork-Id: 5039091 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D36A79F30B for ; Mon, 6 Oct 2014 18:38:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6228F2014A for ; Mon, 6 Oct 2014 18:38:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D96520145 for ; Mon, 6 Oct 2014 18:38:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753143AbaJFSi3 (ORCPT ); Mon, 6 Oct 2014 14:38:29 -0400 Received: from mx0a-00003501.pphosted.com ([67.231.144.15]:11210 "EHLO mx0a-00003501.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753155AbaJFSi2 (ORCPT ); Mon, 6 Oct 2014 14:38:28 -0400 X-Greylist: delayed 869 seconds by postgrey-1.27 at vger.kernel.org; Mon, 06 Oct 2014 14:38:28 EDT Received: from pps.filterd (m0075552.ppops.net [127.0.0.1]) by mx0a-00003501.pphosted.com (8.14.5/8.14.5) with SMTP id s96IJNu6012524 for ; Mon, 6 Oct 2014 14:24:01 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-00003501.pphosted.com with ESMTP id 1puy7ggcwr-1 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 06 Oct 2014 14:23:58 -0400 Received: from m0075552.ppops.net (m0075552.ppops.net [127.0.0.1]) by pps.reinject (8.14.5/8.14.5) with SMTP id s96ILmsg015560 for ; Mon, 6 Oct 2014 14:23:58 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-00003501.pphosted.com with ESMTP id 1puy7ggcwh-1 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 06 Oct 2014 14:23:57 -0400 Received: from m0075552.ppops.net (m0075552.ppops.net [127.0.0.1]) by pps.reinject (8.14.5/8.14.5) with SMTP id s96ILLch014713; Mon, 6 Oct 2014 14:23:57 -0400 Received: from mh3.ok.mailhost.seagate.com ([192.55.20.36]) by mx0a-00003501.pphosted.com with ESMTP id 1puy7ggcw0-1 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 06 Oct 2014 14:23:57 -0400 Received: from SHK-L000510060D003.shk.minn.seagate.com (2d1-dhcp-2-138-192.shk.minn.seagate.com [10.2.138.192]) by mh3.ok.mailhost.seagate.com (Postfix) with ESMTP id 6BE65CA16E; Mon, 6 Oct 2014 11:23:52 -0700 (PDT) From: Paul Paulson To: fstests@vger.kernel.org Cc: linux-ext4@vger.kernel.org, Paul Paulson Subject: [PATCH] generic/017: skip tests with mkfs failures Date: Mon, 6 Oct 2014 13:23:50 -0500 Message-Id: <1412619830-23088-1-git-send-email-paul.paulson@seagate.com> X-Mailer: git-send-email 1.9.1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52, 1.0.28, 0.0.0000 definitions=2014-10-06_03:2014-10-06, 2014-10-06, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=2.29538610341251e-12 kscore.compositescore=0 circleOfTrustscore=49.32 compositescore=0.0722059478670498 urlsuspect_oldscore=0.722059478670498 suspectscore=1 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=6165 rbsscore=0.0722059478670498 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.3 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1410060167 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=ham 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 mkfs command fails to create ext4 filesystems on partition sizes greater than 1998080 MiB when using 1024 byte blocks and the default calculation for the number of inodes reserved for the filesystem. The following error message is produced when the maximum number of inodes is exceeded: "Cannot create filesystem with requested number of inodes while setting up superblock" The generic/017 test was modified to skip the 1K block size test for partitions with an inode count that exceeds the maximum. The QA output for the test was also changed to a simple pass/fail indication to account for a variable number of test iterations. --- common/config | 1 + tests/generic/017 | 21 +++++++++++++++++++-- tests/generic/017.out | 4 +--- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/common/config b/common/config index d68d4d0..824985e 100644 --- a/common/config +++ b/common/config @@ -184,6 +184,7 @@ export LOGGER_PROG="`set_prog_path logger`" export DBENCH_PROG="`set_prog_path dbench`" export DMSETUP_PROG="`set_prog_path dmsetup`" export WIPEFS_PROG="`set_prog_path wipefs`" +export TUNE2FS_PROG="`set_prog_path tune2fs`" # Generate a comparable xfsprogs version number in the form of # major * 10000 + minor * 100 + release diff --git a/tests/generic/017 b/tests/generic/017 index 13b7254..eb38d4d 100755 --- a/tests/generic/017 +++ b/tests/generic/017 @@ -49,8 +49,16 @@ _do_die_on_error=y testfile=$SCRATCH_MNT/$seq.$$ BLOCKS=10240 -for (( BSIZE = 1024; BSIZE <= 4096; BSIZE *= 2 )); do +MAX_INODE_COUNT_1K=127877120 +inode_count=`$TUNE2FS_PROG -l $SCRATCH_DEV | awk '/Inode count:/ { print $3 }'` +initial_bsize=$(($inode_count <= $MAX_INODE_COUNT_1K ? 1024 : 2048)) +iterations=0 +passcount=0 + +for (( BSIZE = $initial_bsize; BSIZE <= 4096; BSIZE *= 2 )); do + + let iterations++ length=$(($BLOCKS * $BSIZE)) case $FSTYP in xfs) @@ -74,7 +82,10 @@ for (( BSIZE = 1024; BSIZE <= 4096; BSIZE *= 2 )); do done # Check if 80 extents are present - $XFS_IO_PROG -c "fiemap -v" $testfile | grep "^ *[0-9]*:" |wc -l + extents=`$XFS_IO_PROG -c "fiemap -v" $testfile | grep "^ *[0-9]*:" | wc -l` + if [ $extents -eq 80 ]; then + let passcount++ + fi _check_scratch_fs if [ $? -ne 0 ]; then @@ -85,6 +96,12 @@ for (( BSIZE = 1024; BSIZE <= 4096; BSIZE *= 2 )); do umount $SCRATCH_MNT done +if [ $iterations -gt 0 -a $passcount -eq $iterations ]; then + echo pass +else + echo fail +fi + # success, all done status=0 exit diff --git a/tests/generic/017.out b/tests/generic/017.out index cc524ac..008ac18 100644 --- a/tests/generic/017.out +++ b/tests/generic/017.out @@ -1,4 +1,2 @@ QA output created by 017 -80 -80 -80 +pass