qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/qemu-iotests: Fix broken grep command in iotest 207
@ 2025-11-13  8:05 Thomas Huth
  2025-11-13  9:18 ` Daniel P. Berrangé
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2025-11-13  8:05 UTC (permalink / raw)
  To: Kevin Wolf, qemu-block; +Cc: Hanna Reitz, qemu-devel

From: Thomas Huth <thuth@redhat.com>

Running "./check -ssh 207" fails for me with lots of lines like this
in the output:

+base64: invalid input

While looking closer at it, I noticed that the grep -v "\\^#" command
in this test is not working as expected - it is likely meant to filter
out the comment lines that are starting with a "#", but at least my
version of grep (GNU grep 3.11) does not work with the backslashes here.
There does not seem to be a compelling reason for these backslashes,
so let's simply drop them to fix this issue.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qemu-iotests/207 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/207 b/tests/qemu-iotests/207
index 41dcf3ff55e..ceab990e648 100755
--- a/tests/qemu-iotests/207
+++ b/tests/qemu-iotests/207
@@ -119,7 +119,7 @@ with iotests.FilePath('t.img') as disk_path, \
     iotests.img_info_log(remote_path)
 
     keys = subprocess.check_output(
-        'ssh-keyscan 127.0.0.1 2>/dev/null | grep -v "\\^#" | ' +
+        'ssh-keyscan 127.0.0.1 2>/dev/null | grep -v "^#" | ' +
         'cut -d" " -f3',
         shell=True).rstrip().decode('ascii').split('\n')
 
-- 
2.51.1



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

* Re: [PATCH] tests/qemu-iotests: Fix broken grep command in iotest 207
  2025-11-13  8:05 [PATCH] tests/qemu-iotests: Fix broken grep command in iotest 207 Thomas Huth
@ 2025-11-13  9:18 ` Daniel P. Berrangé
  2025-11-13 22:41   ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel P. Berrangé @ 2025-11-13  9:18 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Kevin Wolf, qemu-block, Hanna Reitz, qemu-devel

On Thu, Nov 13, 2025 at 09:05:25AM +0100, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> Running "./check -ssh 207" fails for me with lots of lines like this
> in the output:
> 
> +base64: invalid input
> 
> While looking closer at it, I noticed that the grep -v "\\^#" command
> in this test is not working as expected - it is likely meant to filter
> out the comment lines that are starting with a "#", but at least my
> version of grep (GNU grep 3.11) does not work with the backslashes here.
> There does not seem to be a compelling reason for these backslashes,
> so let's simply drop them to fix this issue.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/qemu-iotests/207 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



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

* Re: [PATCH] tests/qemu-iotests: Fix broken grep command in iotest 207
  2025-11-13  9:18 ` Daniel P. Berrangé
@ 2025-11-13 22:41   ` Eric Blake
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Blake @ 2025-11-13 22:41 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Thomas Huth, Kevin Wolf, qemu-block, Hanna Reitz, qemu-devel

On Thu, Nov 13, 2025 at 09:18:19AM +0000, Daniel P. Berrangé wrote:
> On Thu, Nov 13, 2025 at 09:05:25AM +0100, Thomas Huth wrote:
> > From: Thomas Huth <thuth@redhat.com>
> > 
> > Running "./check -ssh 207" fails for me with lots of lines like this
> > in the output:
> > 
> > +base64: invalid input
> > 
> > While looking closer at it, I noticed that the grep -v "\\^#" command
> > in this test is not working as expected - it is likely meant to filter
> > out the comment lines that are starting with a "#", but at least my
> > version of grep (GNU grep 3.11) does not work with the backslashes here.
> > There does not seem to be a compelling reason for these backslashes,
> > so let's simply drop them to fix this issue.
> > 
> > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > ---
> >  tests/qemu-iotests/207 | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Not quite NBD material, but since it touches iotests and I was
preparing a pull request that benefitted from a cleaner run, I went
ahead and queued it through my tree.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org



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

end of thread, other threads:[~2025-11-13 22:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-13  8:05 [PATCH] tests/qemu-iotests: Fix broken grep command in iotest 207 Thomas Huth
2025-11-13  9:18 ` Daniel P. Berrangé
2025-11-13 22:41   ` Eric Blake

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).