]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/qemu-iotests: Fix broken grep command in iotest 207
authorThomas Huth <thuth@redhat.com>
Thu, 13 Nov 2025 08:05:25 +0000 (09:05 +0100)
committerEric Blake <eblake@redhat.com>
Thu, 13 Nov 2025 22:40:52 +0000 (16:40 -0600)
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>
Message-ID: <20251113080525.444826-1-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
tests/qemu-iotests/207

index 41dcf3ff55ea097b4f18a7239f331ba5f1b29cd2..ceab990e648c3e26ff3249f60c127eddf2a62033 100755 (executable)
@@ -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')