From patchwork Fri Jul 1 16:14:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Tulak X-Patchwork-Id: 9210149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8DDD3607D8 for ; Fri, 1 Jul 2016 16:14:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D64328516 for ; Fri, 1 Jul 2016 16:14:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 701B02868D; Fri, 1 Jul 2016 16:14:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CC3428516 for ; Fri, 1 Jul 2016 16:14:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752375AbcGAQOj (ORCPT ); Fri, 1 Jul 2016 12:14:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49834 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752371AbcGAQOi (ORCPT ); Fri, 1 Jul 2016 12:14:38 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2DC9E73059; Fri, 1 Jul 2016 16:14:38 +0000 (UTC) Received: from jtulak.brq.redhat.com (jtulak.brq.redhat.com [10.34.26.85]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u61GEaiq024535; Fri, 1 Jul 2016 12:14:36 -0400 From: Jan Tulak To: fstests@vger.kernel.org Cc: david@fromorbit.com, eguan@redhat.com, Jan Tulak Subject: [PATCH v3] xfstests: update xfs/096 for new behaviour Date: Fri, 1 Jul 2016 18:14:34 +0200 Message-Id: <1467389674-5341-1-git-send-email-jtulak@redhat.com> In-Reply-To: <1464858659-610-1-git-send-email-jtulak@redhat.com> References: <1464858659-610-1-git-send-email-jtulak@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 01 Jul 2016 16:14:38 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Because we recently changed how mkfs behaves when it gets incorrect/invalid values, add a feature check to run this test only on older binaries, which accepts invalid sunit values. Signed-off-by: Jan Tulak --- UPDATE: Change it to _notrun on newer binaries. Commit message updated respectivvely. --- tests/xfs/096 | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/xfs/096 b/tests/xfs/096 index f949e83..803b49d 100755 --- a/tests/xfs/096 +++ b/tests/xfs/096 @@ -39,6 +39,20 @@ _cleanup() rm -f $tmp.* } +# maximum log record size +max_lr_size=`expr 256 \* 1024` +big_su=`expr $max_lr_size + 4096` + +requires_mkfs_accept_invalid_log_sunit() +{ + accepts=`mkfs.xfs -N -l version=2,su=$big_su 2>&1 | \ + grep -ci "No device name"` + if [ "$accepts" -eq 0 ];then + _notrun "Runs only on older xfsprogs accepting invalid log sunit" + fi + return 1 +} + # get standard environment, filters and checks . ./common/rc . ./common/filter @@ -97,6 +111,9 @@ mkfs_filter() | grep -v parent } +# skip on newer versions +requires_mkfs_accept_invalid_log_sunit + # real QA test starts here rm -f $seqres.full @@ -108,16 +125,13 @@ _require_v2log # choose .out file based on internal/external log rm -f $seqfull.out + if [ "$USE_EXTERNAL" = yes ]; then ln -s $seq.out.external $seqfull.out else ln -s $seq.out.internal $seqfull.out fi -# maximum log record size -max_lr_size=`expr 256 \* 1024` - -big_su=`expr $max_lr_size + 4096` # # Test out various mkfs param combinations