From patchwork Tue Dec 16 11:41:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 5500371 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 94A129F326 for ; Tue, 16 Dec 2014 11:42:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB79720A1E for ; Tue, 16 Dec 2014 11:42:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAD6E20A21 for ; Tue, 16 Dec 2014 11:42:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751066AbaLPLmZ (ORCPT ); Tue, 16 Dec 2014 06:42:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35466 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbaLPLmZ (ORCPT ); Tue, 16 Dec 2014 06:42:25 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBGBgPfj021197 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 16 Dec 2014 06:42:25 -0500 Received: from localhost (dhcp-12-174.nay.redhat.com [10.66.12.174]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBGBgN3D006196; Tue, 16 Dec 2014 06:42:24 -0500 From: Eryu Guan To: fstests@vger.kernel.org Cc: Eryu Guan Subject: [PATCH v2 2/3] common: return failure if _check_xxx_filesystem find corruption Date: Tue, 16 Dec 2014 19:41:41 +0800 Message-Id: <1418730102-17061-2-git-send-email-eguan@redhat.com> In-Reply-To: <1418730102-17061-1-git-send-email-eguan@redhat.com> References: <1418730102-17061-1-git-send-email-eguan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 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=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 So the callers could know if these functions find corruptions by the return value. Signed-off-by: Eryu Guan --- v2: - write new commit message, the old one is not correct - split out the 'check' check as a separate patch common/rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/rc b/common/rc index 6bbdc69..bf4e580 100644 --- a/common/rc +++ b/common/rc @@ -1722,6 +1722,7 @@ _check_generic_filesystem() if [ "$iam" != "check" ]; then exit 1 fi + return 1 fi return 0 @@ -1823,6 +1824,7 @@ _check_xfs_filesystem() if [ "$iam" != "check" ]; then exit 1 fi + return 1 fi return 0 @@ -1867,7 +1869,8 @@ _check_udf_filesystem() $here/src/udf_test $OPT_ARG $device | tee $seqres.checkfs | egrep "Error|Warning" | \ _udf_test_known_error_filter | \ egrep -iv "Error count:.*[0-9]+.*total occurrences:.*[0-9]+|Warning count:.*[0-9]+.*total occurrences:.*[0-9]+" && \ - echo "Warning UDF Verifier reported errors see $seqres.checkfs." + echo "Warning UDF Verifier reported errors see $seqres.checkfs." && return 1 + return 0 } _check_xfs_test_fs() @@ -1935,6 +1938,7 @@ _check_btrfs_filesystem() if [ "$iam" != "check" ]; then exit 1 fi + return 1 fi return 0