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

tests/qemu-iotests: Don't use 'seq' in the iotests

The 'seq' command is not available by default on OpenBSD, so these
iotests are currently failing there. It could be installed as 'gseq'
from the coreutils package - but since it is using a different name
there and we are running the iotests with the "bash" shell anyway,
let's simply use the built-in double parentheses for the for-loops
instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190723111201.1926-1-thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

authored by

Thomas Huth and committed by
Alex Bennée
30edd9fa 4f010461

+8 -8
+1 -1
tests/qemu-iotests/007
··· 48 48 echo "creating image" 49 49 _make_test_img 1M 50 50 51 - for i in `seq 1 10`; do 51 + for ((i=1;i<=10;i++)); do 52 52 echo "savevm $i" 53 53 $QEMU -nographic -hda "$TEST_IMG" -serial none -monitor stdio >/dev/null 2>&1 <<EOF 54 54 savevm test-$i
+1 -1
tests/qemu-iotests/011
··· 49 49 50 50 echo 51 51 echo "overlapping I/O" 52 - for i in `seq 1 10`; do 52 + for ((i=1;i<=10;i++)); do 53 53 let mb=1024*1024 54 54 let off1=$i*$mb 55 55 let off2=$off1+512
+1 -1
tests/qemu-iotests/032
··· 52 52 53 53 # Allocate every other cluster so that afterwards a big write request will 54 54 # actually loop a while and issue many I/O requests for the lower layer 55 - for i in $(seq 0 128 4096); do echo "write ${i}k 64k"; done | $QEMU_IO "$TEST_IMG" | _filter_qemu_io 55 + for ((i=0;i<=4096;i+=128)); do echo "write ${i}k 64k"; done | $QEMU_IO "$TEST_IMG" | _filter_qemu_io 56 56 57 57 echo 58 58 echo === AIO request during close ===
+1 -1
tests/qemu-iotests/035
··· 49 49 _make_test_img $size 50 50 51 51 generate_requests() { 52 - for i in $(seq 0 63); do 52 + for ((i=0;i<=63;i++)); do 53 53 echo "aio_write ${i}M 512" 54 54 echo "aio_write ${i}M 512" 55 55 echo "aio_write ${i}M 512"
+1 -1
tests/qemu-iotests/037
··· 61 61 local pattern=0 62 62 local cur_sec=0 63 63 64 - for i in $(seq 0 $((sectors - 1))); do 64 + for ((i=0;i<=$((sectors - 1));i++)); do 65 65 cur_sec=$((offset / 512 + i)) 66 66 pattern=$(( ( (cur_sec % 256) + (cur_sec / 256)) % 256 )) 67 67
+1 -1
tests/qemu-iotests/046
··· 55 55 local pattern=0 56 56 local cur_sec=0 57 57 58 - for i in $(seq 0 $((sectors - 1))); do 58 + for ((i=0;i<=$((sectors - 1));i++)); do 59 59 cur_sec=$((offset / 65536 + i)) 60 60 pattern=$(( ( (cur_sec % 128) + (cur_sec / 128)) % 128 )) 61 61
+2 -2
tests/qemu-iotests/common.pattern
··· 22 22 local step=$3 23 23 local count=$4 24 24 25 - for i in `seq 1 $count`; do 25 + for ((i=1;i<=$count;i++)); do 26 26 echo alloc $(( start + (i - 1) * step )) $size 27 27 done 28 28 } ··· 40 40 local pattern=$6 41 41 42 42 echo === IO: pattern $pattern >&2 43 - for i in `seq 1 $count`; do 43 + for ((i=1;i<=$count;i++)); do 44 44 echo $op -P $pattern $(( start + (i - 1) * step )) $size 45 45 done 46 46 }