[PATCH v2] tools: bootconfig: Regex enclosed with quotes to make syntax highlight proper

Bhaskar Chowdhury posted 1 patch 3 months ago
tools/bootconfig/test-bootconfig.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH v2] tools: bootconfig: Regex enclosed with quotes to make syntax highlight proper
Posted by Bhaskar Chowdhury 3 months ago
As suggested, changed the square brackets escaping to quote the whole Regex
class.

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 Changes to V2 from V1:
 Surround the Regex class with single quotations.

 tools/bootconfig/test-bootconfig.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/bootconfig/test-bootconfig.sh b/tools/bootconfig/test-bootconfig.sh
index a2c484c243f5..32401bf61340 100755
--- a/tools/bootconfig/test-bootconfig.sh
+++ b/tools/bootconfig/test-bootconfig.sh
@@ -167,8 +167,8 @@ echo > $INITRD

 xpass $BOOTCONF -a $TEMPCONF $INITRD
 $BOOTCONF $INITRD > $OUTFILE
-xfail grep -q val[[:space:]] $OUTFILE
-xpass grep -q val2[[:space:]] $OUTFILE
+xfail grep -q 'val[[:space:]]' $OUTFILE
+xpass grep -q 'val2[[:space:]]' $OUTFILE

 echo "=== expected failure cases ==="
 for i in samples/bad-* ; do
--
2.49.1
Re: [PATCH v2] tools: bootconfig: Regex enclosed with quotes to make syntax highlight proper
Posted by Masami Hiramatsu (Google) 2 months, 3 weeks ago
On Wed,  9 Jul 2025 08:27:59 +0530
Bhaskar Chowdhury <unixbhaskar@gmail.com> wrote:

> As suggested, changed the square brackets escaping to quote the whole Regex
> class.
> 

Yeah, let me pick it.

Thanks,

> Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
> ---
>  Changes to V2 from V1:
>  Surround the Regex class with single quotations.
> 
>  tools/bootconfig/test-bootconfig.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/bootconfig/test-bootconfig.sh b/tools/bootconfig/test-bootconfig.sh
> index a2c484c243f5..32401bf61340 100755
> --- a/tools/bootconfig/test-bootconfig.sh
> +++ b/tools/bootconfig/test-bootconfig.sh
> @@ -167,8 +167,8 @@ echo > $INITRD
> 
>  xpass $BOOTCONF -a $TEMPCONF $INITRD
>  $BOOTCONF $INITRD > $OUTFILE
> -xfail grep -q val[[:space:]] $OUTFILE
> -xpass grep -q val2[[:space:]] $OUTFILE
> +xfail grep -q 'val[[:space:]]' $OUTFILE
> +xpass grep -q 'val2[[:space:]]' $OUTFILE
> 
>  echo "=== expected failure cases ==="
>  for i in samples/bad-* ; do
> --
> 2.49.1
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>