diff mbox

[05/17] iotests: Fix _img_info for backslashes

Message ID 20171123020832.8165-6-mreitz@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Max Reitz Nov. 23, 2017, 2:08 a.m. UTC
read without -r eats backslashes.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/common.rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Fam Zheng Nov. 30, 2017, 2:59 a.m. UTC | #1
On Thu, 11/23 03:08, Max Reitz wrote:
> read without -r eats backslashes.
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  tests/qemu-iotests/common.rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
> index dbae7d74ba..6fa0495e10 100644
> --- a/tests/qemu-iotests/common.rc
> +++ b/tests/qemu-iotests/common.rc
> @@ -338,7 +338,7 @@ _img_info()
>              -e "s#$IMGFMT#IMGFMT#g" \
>              -e "/^disk size:/ D" \
>              -e "/actual-size/ D" | \
> -        while IFS='' read line; do
> +        while IFS='' read -r line; do
>              if [[ $format_specific == 1 ]]; then
>                  discard=0
>              elif [[ $line == "Format specific information:" ]]; then
> -- 
> 2.13.6
> 

Reviewed-by: Fam Zheng <famz@redhat.com>
diff mbox

Patch

diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index dbae7d74ba..6fa0495e10 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -338,7 +338,7 @@  _img_info()
             -e "s#$IMGFMT#IMGFMT#g" \
             -e "/^disk size:/ D" \
             -e "/actual-size/ D" | \
-        while IFS='' read line; do
+        while IFS='' read -r line; do
             if [[ $format_specific == 1 ]]; then
                 discard=0
             elif [[ $line == "Format specific information:" ]]; then