test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] framework: strip the PEXPECT from the output
@ 2022-09-27 11:51 Reshma Pattan
  2022-10-10  3:33 ` lijuan.tu
  0 siblings, 1 reply; 2+ messages in thread
From: Reshma Pattan @ 2022-09-27 11:51 UTC (permalink / raw)
  To: dts; +Cc: Reshma Pattan

During hugetlbfs mount check, if no hugetlbfs is mounted
the output would have a string " [PEXPECT]#". The output must
strip the " [PEXPECT]#" if no hugetlbfs mounted, inorder to
correctly decide there is no mounted hugetlbfs and to mount the
new one.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 framework/crb.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/framework/crb.py b/framework/crb.py
index 5ce4e2c9..9559e738 100644
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -207,6 +207,9 @@ class Crb(object):
         """
         self.send_expect("umount `awk '/hugetlbfs/ { print $2 }' /proc/mounts`", "# ")
         out = self.send_expect("awk '/hugetlbfs/ { print $2 }' /proc/mounts", "# ")
+        # if no hugetlbfs mounted, then above command will return " [PEXPECT]#"
+        # so strip the unexptectd " [PEXPECT]#", to proceed to mount the hugetlbfs 
+        out = out.strip(' [PEXPECT]#')
         # only mount hugepage when no hugetlbfs mounted
         if not len(out):
             self.send_expect("mkdir -p /mnt/huge", "# ")
-- 
2.31.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dts] [PATCH] framework: strip the PEXPECT from the output
  2022-09-27 11:51 [dts] [PATCH] framework: strip the PEXPECT from the output Reshma Pattan
@ 2022-10-10  3:33 ` lijuan.tu
  0 siblings, 0 replies; 2+ messages in thread
From: lijuan.tu @ 2022-10-10  3:33 UTC (permalink / raw)
  To: dts, Reshma Pattan; +Cc: Reshma Pattan

On Tue, 27 Sep 2022 12:51:41 +0100, Reshma Pattan <reshma.pattan@intel.com> wrote:
> During hugetlbfs mount check, if no hugetlbfs is mounted
> the output would have a string " [PEXPECT]#". The output must
> strip the " [PEXPECT]#" if no hugetlbfs mounted, inorder to
> correctly decide there is no mounted hugetlbfs and to mount the
> new one.
> 
> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>

Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-10  3:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 11:51 [dts] [PATCH] framework: strip the PEXPECT from the output Reshma Pattan
2022-10-10  3:33 ` lijuan.tu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).