From patchwork Thu Jan 7 10:27:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 7975591 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EA19C9F3E6 for ; Thu, 7 Jan 2016 10:27:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 572F52017E for ; Thu, 7 Jan 2016 10:27:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A9D42010E for ; Thu, 7 Jan 2016 10:27:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752763AbcAGK1a (ORCPT ); Thu, 7 Jan 2016 05:27:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47230 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752725AbcAGK12 (ORCPT ); Thu, 7 Jan 2016 05:27:28 -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 (Postfix) with ESMTPS id DAE6FC0A527D; Thu, 7 Jan 2016 10:27:27 +0000 (UTC) Received: from localhost (dhcp-12-106.nay.redhat.com [10.66.12.106]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u07AROof032289; Thu, 7 Jan 2016 05:27:26 -0500 Date: Thu, 7 Jan 2016 18:27:23 +0800 From: Eryu Guan To: Jia He Cc: fstests@vger.kernel.org Subject: Re: [PATCH 1/2] fstests: comments to prevent from adding "/" to the end of 2 environment variables Message-ID: <20160107102723.GD21019@eguan.usersys.redhat.com> References: <1452148649-22451-1-git-send-email-hejianet@gmail.com> <1452148649-22451-2-git-send-email-hejianet@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1452148649-22451-2-git-send-email-hejianet@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) 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, 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 On Thu, Jan 07, 2016 at 02:37:28PM +0800, Jia He wrote: > This adds comments to prevent user from adding "/" to the end of TEST_DIR and > SCRATCH_MNT Instead of adding comments, how about removing the trailing "/" in the code, something like: Thanks, Eryu --- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/common/config b/common/config index e82d279..cb34fd7 100644 --- a/common/config +++ b/common/config @@ -551,5 +551,10 @@ if [ -z "$CONFIG_INCLUDED" ]; then [ -z "$FSCK_OPTIONS" ] && _fsck_opts fi +# canonicalize the mount points +# this follows symlinks and removes all trailing "/"s +export TEST_DIR=`readlink -e "$TEST_DIR"` +export SCRATCH_MNT=`readlink -e "$SCRATCH_MNT"` + # make sure this script returns success /bin/true