From patchwork Sat Jan 9 03:54:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia He X-Patchwork-Id: 7991801 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4212ABEEE5 for ; Sat, 9 Jan 2016 03:55:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7AA00201E4 for ; Sat, 9 Jan 2016 03:55:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A1390201DD for ; Sat, 9 Jan 2016 03:55:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750806AbcAIDzJ (ORCPT ); Fri, 8 Jan 2016 22:55:09 -0500 Received: from mail-oi0-f67.google.com ([209.85.218.67]:36224 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbcAIDzI (ORCPT ); Fri, 8 Jan 2016 22:55:08 -0500 Received: by mail-oi0-f67.google.com with SMTP id a202so1492260oib.3 for ; Fri, 08 Jan 2016 19:55:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nZxB0K4VCUvzPZwmQYirGjETuzb03fr5Xt5cCahJikM=; b=d9FwrrbhRMYX2SWs0PlMi5SlOikiWMsKMlK/m3jU/orOmJeC/PXVj+A2CXgZO68RMT PrDL0onnr6VMw96PoPTftI2c9uo0TS4DK+rSIVk+WNINp8iHbl/pVPUlnnvmL4CGQB5T Gs6uIH9G75o5BF7UupnPZ0sMVvdes0CsTx7vyVM349tmD/GgkAKNxQg8mt48BQ9N76Bt zNCB6TVhdfPfpp9Z7iLQ3G4+zk+oWMXHcyq8xZ70Tn3e1vot8H1EGpTTrnzfpkbQihIt pyC4GRfRucnwgoawjkLKBFsOkXFg6ZhuYihymNyaWxeVHRVpRy1SaTHYn084e9aRGxUn P/AQ== X-Received: by 10.202.85.194 with SMTP id j185mr81170784oib.107.1452311707840; Fri, 08 Jan 2016 19:55:07 -0800 (PST) Received: from localhost.localdomain ([60.247.125.148]) by smtp.gmail.com with ESMTPSA id r63sm45372202oia.13.2016.01.08.19.55.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Jan 2016 19:55:07 -0800 (PST) From: Jia He To: fstests@vger.kernel.org Cc: eguan@redhat.com, Jia He Subject: [PATCH V2 1/2] fstests: add user friendly prompts for already mounted points name Date: Sat, 9 Jan 2016 11:54:52 +0800 Message-Id: <1452311693-27529-2-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1452311693-27529-1-git-send-email-hejianet@gmail.com> References: <1452311693-27529-1-git-send-email-hejianet@gmail.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 This adds user friendly prompts to output the already mounted point from _mount. xfstests will do the cleanup (ie. umount) and user can not get the mount name information. Signed-off-by: Jia He --- common/rc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index d33e3fb..f0caef2 100644 --- a/common/rc +++ b/common/rc @@ -1271,7 +1271,9 @@ _require_scratch_nocheck() # if it's mounted, make sure its on $SCRATCH_MNT if ! _mount | grep -F $SCRATCH_DEV | grep -q $SCRATCH_MNT then - echo "\$SCRATCH_DEV is mounted but not on \$SCRATCH_MNT - aborting" + echo "\$SCRATCH_DEV=$SCRATCH_DEV is mounted but not on \$SCRATCH_MNT=$SCRATCH_MNT - aborting" + echo "Already mounted result:" + _mount | grep -F $SCRATCH_DEV exit 1 fi # and then unmount it @@ -1353,7 +1355,9 @@ _require_test() # if it's mounted, make sure its on $TEST_DIR if ! _mount | grep -F $TEST_DEV | grep -q $TEST_DIR then - echo "\$TEST_DEV is mounted but not on \$TEST_DIR - aborting" + echo "\$TEST_DEV=$TEST_DEV is mounted but not on \$TEST_DIR=$TEST_DIR - aborting" + echo "Already mounted result:" + _mount | grep -F $TEST_DEV exit 1 fi else