qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH 06/17] iotests: Drop format-specifi


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 06/17] iotests: Drop format-specific in _filter_img_info
Date: Thu, 30 Nov 2017 09:42:02 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 11/29/2017 09:16 PM, Fam Zheng wrote:
On Thu, 11/23 03:08, Max Reitz wrote:
_filter_img_info should remove format-specific information, too.  We
already have such a filter in _img_info, and it is very useful for
query-block-named-block-nodes (etc.), too.

However, in 198 we need that information (but we still want the rest of
the filter), so make that filtering optional.  Note that "the rest of
the filter" includes filtering of the test directory, so we can drop the
_filter_testdir from 198 at the same time.


+        if [[ $discard == 0 ]]; then
+            echo "$line"
+        elif [[ $discard == 1 && ! $line ]]; then

s/\$line/"\$line"/ ?


Not necessary; [[ ]] is a bashism, which is part of the shell grammar so it doesn't need quoting. In fact, there are some expressions in [[ ]] where comparing to "$foo" is actively different than comparing to $foo (mostly in regex, as the quotes change whether \ inside $foo are special to the regex or literally matched).

So this part is fine.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]