qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

iotests/common.pattern: Quote echos

From time to time, my shell decides to repace the bracketed numbers here
by the numbers inside (i.e., "=== Clusters to be compressed [1]" is
printed as "=== Clusters to be compressed 1"). That makes tests that
use common.pattern fail. Prevent that from happening by quoting the
arguments to all echos in common.pattern.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200403101134.805871-1-mreitz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>

+11 -11
+11 -11
tests/qemu-iotests/common.pattern
··· 23 23 local count=$4 24 24 25 25 for ((i=1;i<=$count;i++)); do 26 - echo alloc $(( start + (i - 1) * step )) $size 26 + echo "alloc $(( start + (i - 1) * step )) $size" 27 27 done 28 28 } 29 29 ··· 39 39 local count=$5 40 40 local pattern=$6 41 41 42 - echo === IO: pattern $pattern >&2 42 + echo "=== IO: pattern $pattern" >&2 43 43 for ((i=1;i<=$count;i++)); do 44 - echo $op -P $pattern $(( start + (i - 1) * step )) $size 44 + echo "$op -P $pattern $(( start + (i - 1) * step )) $size" 45 45 done 46 46 } 47 47 ··· 110 110 # free - free - compressed 111 111 112 112 # Write the clusters to be compressed 113 - echo === Clusters to be compressed [1] 113 + echo '=== Clusters to be compressed [1]' 114 114 io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 115 - echo === Clusters to be compressed [2] 115 + echo '=== Clusters to be compressed [2]' 116 116 io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 117 - echo === Clusters to be compressed [3] 117 + echo '=== Clusters to be compressed [3]' 118 118 io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 119 119 120 120 mv "$TEST_IMG" "$TEST_IMG.orig" 121 121 $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" 122 122 123 123 # Write the used clusters 124 - echo === Used clusters [1] 124 + echo '=== Used clusters [1]' 125 125 io_pattern writev $((offset + 0 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 126 - echo === Used clusters [2] 126 + echo '=== Used clusters [2]' 127 127 io_pattern writev $((offset + 1 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 128 - echo === Used clusters [3] 128 + echo '=== Used clusters [3]' 129 129 io_pattern writev $((offset + 3 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 130 130 131 131 # Read them 132 - echo === Read used/compressed clusters 132 + echo '=== Read used/compressed clusters' 133 133 io_pattern readv $((offset + 0 * $cluster_size)) $((2 * $cluster_size)) $((9 * $cluster_size)) $num 165 134 134 io_pattern readv $((offset + 3 * $cluster_size)) $((3 * $cluster_size)) $((9 * $cluster_size)) $num 165 135 135 io_pattern readv $((offset + 8 * $cluster_size)) $((1 * $cluster_size)) $((9 * $cluster_size)) $num 165 136 136 137 - echo === Read zeros 137 + echo '=== Read zeros' 138 138 io_zero readv $((offset + 2 * $cluster_size)) $((1 * $cluster_size)) $((9 * $cluster_size)) $num 139 139 io_zero readv $((offset + 6 * $cluster_size)) $((2 * $cluster_size)) $((9 * $cluster_size)) $num 140 140 }