All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] network/nfs_lib.sh: Use double quotes for grep pattern
Date: Tue, 9 Jun 2020 14:14:54 +0800	[thread overview]
Message-ID: <5EDF28DE.7070202@cn.fujitsu.com> (raw)
In-Reply-To: <20200608145831.GA2746544@x230>

On 2020/6/8 22:58, Petr Vorel wrote:
> Hi Xiao,
>
> Reviewed-by: Petr Vorel<petr.vorel@gmail.com>
>
>> +++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh
>> @@ -58,7 +58,7 @@ nfs_server_udp_enabled()
>>   	tst_rhost_run -c "[ -f /etc/nfs.conf ]" || return 0
>>   	config=$(tst_rhost_run -c 'for f in $(grep ^include.*= '/etc/nfs.conf' | cut -d = -f2); do [ -f $f ]&&  printf "$f "; done')
>
>> -	tst_rhost_run -c "grep -q '^[# ]*udp *= *y' /etc/nfs.conf $config"
>> +	tst_rhost_run -c "grep -q \"^[# ]*udp *= *y\" /etc/nfs.conf $config"
> Good catch. But I wonder if we shouldn't fix tst_rhost_run instead, to avoid
> this error in the future. How about replacing ' with \" in $cmd?
Hi Petr,

It is fine for me to fix the issue in tst_rhost_run() but I didn't find 
a better fix, could you provide an example about your idea?

Best Regards,
Xiao Yang
>
> Kind regards,
> Petr
>
>
> .
>




  reply	other threads:[~2020-06-09  6:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08 14:27 [LTP] [PATCH] network/nfs_lib.sh: Use double quotes for grep pattern Xiao Yang
2020-06-08 14:58 ` Petr Vorel
2020-06-09  6:14   ` Xiao Yang [this message]
2020-06-17 14:28   ` Alexey Kodanev
2020-06-17 18:43     ` Petr Vorel
2020-06-18 12:38       ` Alexey Kodanev
2020-06-18 13:23         ` Petr Vorel

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=5EDF28DE.7070202@cn.fujitsu.com \
    --to=yangx.jy@cn.fujitsu.com \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.