From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 989125A99 for ; Fri, 17 Jul 2015 11:32:19 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 17 Jul 2015 02:32:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,495,1432623600"; d="scan'208";a="607974606" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 17 Jul 2015 02:32:17 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t6H9WGSo027711; Fri, 17 Jul 2015 17:32:16 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t6H9WEAR032304; Fri, 17 Jul 2015 17:32:16 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t6H9WEPT032300; Fri, 17 Jul 2015 17:32:14 +0800 From: Yong Liu To: dts@dpdk.org Date: Fri, 17 Jul 2015 17:32:13 +0800 Message-Id: <1437125533-32268-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] Do not remount hugepage file system when it still mounted X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2015 09:32:20 -0000 From: Marvin Liu Signed-off-by: Marvin Liu diff --git a/framework/crb.py b/framework/crb.py index c623c38..dd18207 100644 --- a/framework/crb.py +++ b/framework/crb.py @@ -98,8 +98,11 @@ class Crb(object): Mount hugepage file system on CRB. """ self.send_expect("umount `awk '/hugetlbfs/ { print $2 }' /proc/mounts`", '# ') - self.send_expect('mkdir -p /mnt/huge', '# ') - self.send_expect('mount -t hugetlbfs nodev /mnt/huge', '# ') + out = self.send_expect("awk '/hugetlbfs/ { print $2 }' /proc/mounts", "# ") + # only mount hugepage when no hugetlbfs mounted + if not len(out): + self.send_expect('mkdir -p /mnt/huge', '# ') + self.send_expect('mount -t hugetlbfs nodev /mnt/huge', '# ') def strip_hugepage_path(self): mounts = self.send_expect("cat /proc/mounts |grep hugetlbfs", "# ") -- 1.9.3