public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Yi Zhao <yi.zhao@windriver.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 3/3] oeqa/runtime/parselogs: escape special character for grep
Date: Tue, 12 Jan 2016 09:51:14 +0800	[thread overview]
Message-ID: <56945C12.7020507@windriver.com> (raw)
In-Reply-To: <CAJTo0LYvLxSBXZ5VWzVrKzSww7xQgpX=L2_dc=ZxOOkCpzX+vA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]



在 2016年01月08日 16:59, Burton, Ross 写道:
>
> On 8 January 2016 at 08:44, Yi Zhao <yi.zhao@windriver.com 
> <mailto:yi.zhao@windriver.com>> wrote:
>
>     It still need to escape quotation marks if using -F option.
>     Consider the following log:
>     [521514.737] (EE) evdev: Qemu Tablet: Unable to open evdev device
>     "/dev/input/touchscreen0".
>
>     We still need an extra step to replace " with \" before grep
>
>
> Actually that's only true as the grep command is passed to 
> subproces.check_output() as a string.  If it was constructed as a list 
> the shell wouldn't be parsing it and you wouldn't have to worry about 
> quoting at all.
>
> (always pass lists instead of strings to subprocess, it makes 
> everything a lot easier)
>
> Ross

Thanks, Ross.

I will test it and send the v2 patch.

Yi

[-- Attachment #2: Type: text/html, Size: 2136 bytes --]

      reply	other threads:[~2016-01-12  1:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07  3:29 [PATCH 0/3] oeqa/runtime: improve some test cases Yi Zhao
2016-01-07  3:29 ` [PATCH 1/3] oeqa/runtime/smart: fix hardcoded root directory Yi Zhao
2016-01-07  3:29 ` [PATCH 2/3] oeqa/runtime/logrotate: " Yi Zhao
2016-01-07  3:29 ` [PATCH 3/3] oeqa/runtime/parselogs: escape special character for grep Yi Zhao
2016-01-07 12:21   ` Burton, Ross
2016-01-08  8:44     ` Yi Zhao
2016-01-08  8:59       ` Burton, Ross
2016-01-12  1:51         ` Yi Zhao [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=56945C12.7020507@windriver.com \
    --to=yi.zhao@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@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