From patchwork Thu Jun 23 10:37:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 9194835 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 41F466077D for ; Thu, 23 Jun 2016 10:37:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31F4A2844A for ; Thu, 23 Jun 2016 10:37:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26DD82844C; Thu, 23 Jun 2016 10:37:01 +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, UNPARSEABLE_RELAY autolearn=unavailable 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 342A72844A for ; Thu, 23 Jun 2016 10:36:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845AbcFWKgr (ORCPT ); Thu, 23 Jun 2016 06:36:47 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:19351 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751830AbcFWKgp (ORCPT ); Thu, 23 Jun 2016 06:36:45 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u5NAaim0013083 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 23 Jun 2016 10:36:44 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u5NAahNW032288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 23 Jun 2016 10:36:44 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u5NAahVr011282; Thu, 23 Jun 2016 10:36:43 GMT Received: from arch2.sg.oracle.com (/10.186.101.143) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 23 Jun 2016 03:36:42 -0700 From: Anand Jain To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org Subject: [PATCH v2] fstests: btrfs: fix 006 adds _runnt_btrfs_util_prog() Date: Thu, 23 Jun 2016 18:37:32 +0800 Message-Id: <1466678252-4058-1-git-send-email-anand.jain@oracle.com> X-Mailer: git-send-email 2.7.0 X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP btrfs fi sync /mnt, now does not output anything for success, so the 006.out should be updated. This change in btrfs-progs was introduced in the commit b005ca024990569d2de459485682158633937928 btrfs-progs: fi sync: make it silent by default which was integrated at btrfs-progs version v4.5.2 Further created helper function _runnt_btrfs_utils_progs() which won't call _fail upon command failure, instead it just echo to stdout. This was required so to continue with the test script and do the cleanups at the end. Signed-off-by: Anand Jain --- v2: Update commit log to indicate the btrfs-progs version at which sync UI is changed. common/rc | 11 +++++++++++ tests/btrfs/006 | 2 +- tests/btrfs/006.out | 1 - 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index a44fb8750220..2a10fbb2d341 100644 --- a/common/rc +++ b/common/rc @@ -3114,6 +3114,17 @@ _min_dio_alignment() fi } +run_check_dontfail() +{ + echo "# $@" >> $seqres.full 2>&1 + "$@" >> $seqres.full 2>&1 || echo "failed: '$@'" +} + +_runnt_btrfs_util_prog() +{ + run_check_dontfail $BTRFS_UTIL_PROG $* +} + run_check() { echo "# $@" >> $seqres.full 2>&1 diff --git a/tests/btrfs/006 b/tests/btrfs/006 index 715fd80fb6fc..9d1fe09e07de 100755 --- a/tests/btrfs/006 +++ b/tests/btrfs/006 @@ -79,7 +79,7 @@ echo "== Show filesystem by UUID" $BTRFS_UTIL_PROG filesystem show $UUID | _filter_btrfs_filesystem_show $TOTAL_DEVS $UUID echo "== Sync filesystem" -$BTRFS_UTIL_PROG filesystem sync $SCRATCH_MNT | _filter_scratch +_runnt_btrfs_util_prog filesystem sync $SCRATCH_MNT echo "== Show device stats by mountpoint" $BTRFS_UTIL_PROG device stats $SCRATCH_MNT | _filter_btrfs_device_stats $TOTAL_DEVS diff --git a/tests/btrfs/006.out b/tests/btrfs/006.out index 22bcb777076a..05b9ac020737 100644 --- a/tests/btrfs/006.out +++ b/tests/btrfs/006.out @@ -14,7 +14,6 @@ Label: 'TestLabel.006' uuid: devid size used path SCRATCH_DEV == Sync filesystem -FSSync 'SCRATCH_MNT' == Show device stats by mountpoint [SCRATCH_DEV].corruption_errs [SCRATCH_DEV].flush_io_errs