From patchwork Tue Dec 16 11:41:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 5500361 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3D8A8BEEA8 for ; Tue, 16 Dec 2014 11:42:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5CC7420A20 for ; Tue, 16 Dec 2014 11:42:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 508F520A1E for ; Tue, 16 Dec 2014 11:42:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751101AbaLPLmX (ORCPT ); Tue, 16 Dec 2014 06:42:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33820 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751066AbaLPLmX (ORCPT ); Tue, 16 Dec 2014 06:42:23 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBGBgMZg017105 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 16 Dec 2014 06:42:23 -0500 Received: from localhost (dhcp-12-174.nay.redhat.com [10.66.12.174]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBGBgKC7006705; Tue, 16 Dec 2014 06:42:21 -0500 From: Eryu Guan To: fstests@vger.kernel.org Cc: Eryu Guan Subject: [PATCH 1/3] common: exit only if _check_xxx_filesystem called by tests when corruption found Date: Tue, 16 Dec 2014 19:41:40 +0800 Message-Id: <1418730102-17061-1-git-send-email-eguan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 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 Otherwise these functions cause check to exit if they find corruption and terminate the whole test. _check_xfs_filesystem already behaves correctly, make _check_generic_filesystem and _check_btrfs_filesystem follow the same behavior. Signed-off-by: Eryu Guan --- common/rc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index 765e05a..6bbdc69 100644 --- a/common/rc +++ b/common/rc @@ -1719,7 +1719,9 @@ _check_generic_filesystem() if [ $ok -eq 0 ]; then status=1 - exit 1 + if [ "$iam" != "check" ]; then + exit 1 + fi fi return 0 @@ -1930,7 +1932,9 @@ _check_btrfs_filesystem() if [ $ok -eq 0 ]; then status=1 - exit 1 + if [ "$iam" != "check" ]; then + exit 1 + fi fi return 0