summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Liu <yong.liu@intel.com>2015-07-17 17:32:13 +0800
committerMarvin Liu <yong.liu@intel.com>2015-07-20 09:21:17 +0800
commit0d5aea42fa08324094457f76e123ac50660bd737 (patch)
treef85295967f43e067c1b96929e048fff912abce87
parent9d1e102f76df23743c299a16009819e4982b80c8 (diff)
downloaddts-0d5aea42fa08324094457f76e123ac50660bd737.zip
dts-0d5aea42fa08324094457f76e123ac50660bd737.tar.gz
dts-0d5aea42fa08324094457f76e123ac50660bd737.tar.xz
Do not remount hugepage file system when it still mounted
Signed-off-by: Marvin Liu <yong.liu@intel.com>
-rw-r--r--framework/crb.py7
1 files changed, 5 insertions, 2 deletions
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", "# ")