test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Liu, Yong" <yong.liu@intel.com>
To: "Tu, LijuanX A" <lijuanx.a.tu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH]framwork: add new parameter for kill_all
Date: Fri, 27 Nov 2015 08:10:29 +0000	[thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10F7047B@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1448607440-26752-1-git-send-email-lijuanx.a.tu@intel.com>

Thanks, applied.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Lijuan Tu
> Sent: Friday, November 27, 2015 2:57 PM
> To: dts@dpdk.org
> Subject: [dts] [PATCH]framwork: add new parameter for kill_all
> 
> in some case ,we will choose session or alt_session to run kill-cmds
> 
> Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
> ---
>  framework/crb.py | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/framework/crb.py b/framework/crb.py
> index fcbd7d9..afa4e63 100644
> --- a/framework/crb.py
> +++ b/framework/crb.py
> @@ -337,14 +337,14 @@ class Crb(object):
>              f.write(contents)
>          self.session.copy_file_to(fileName)
> 
> -    def kill_all(self):
> +    def kill_all(self, alt_session=True):
>          """
>          Kill all dpdk applications on CRB.
>          """
>          pids = []
>          pid_reg = r'p(\d+)'
>          cmd = 'lsof -Fp /var/run/.rte_config'
> -        out = self.alt_session.session.send_expect(cmd, "# ", 10)
> +        out = self.send_expect(cmd, "# ", 20, alt_session)
>          if len(out):
>              lines = out.split('\r\n')
>              for line in lines:
> @@ -352,11 +352,11 @@ class Crb(object):
>                  if m:
>                      pids.append(m.group(1))
>          for pid in pids:
> -            self.alt_session.session.send_expect('kill -9 %s' % pid, '# ')
> +            self.send_expect('kill -9 %s' % pid, '# ', 20, alt_session)
>              self.get_session_output(timeout=2)
> 
>          cmd = 'lsof -Fp /var/run/.rte_hugepage_info'
> -        out = self.alt_session.session.send_expect(cmd, "# ", 10)
> +        out = self.send_expect(cmd, "# ", 20, alt_session)
>          if len(out) and "No such file or directory" not in out:
>              self.logger.warning("There are some dpdk process not free
> hugepage")
>              self.logger.warning("**************************************")
> --
> 1.8.4.2

      reply	other threads:[~2015-11-27  8:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27  6:57 Lijuan Tu
2015-11-27  8:10 ` Liu, Yong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86228AFD5BCD8E4EBFD2B90117B5E81E10F7047B@SHSMSX103.ccr.corp.intel.com \
    --to=yong.liu@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuanx.a.tu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).