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

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches

# gpg: Signature made Tue 03 Apr 2018 16:48:53 BST
# gpg: using RSA key 7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream:
iotests: Test abnormally large size in compressed cluster descriptor
qemu-iotests: Use ppc64 qemu_arch on ppc64le host
iotests: Test preallocated truncate of 2G image
block/file-posix: Fix fully preallocated truncate
iotests: fix 208 for luks format
iotests: Update 186 after commit ac64273c66ab136c44043259162
iotests: Update 051 and 186 after commit 1454509726719e0933c
block: handle invalid lseek returns gracefully
gluster: Fix blockdev-add with server.N.type=unix

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

+167 -88
+15 -4
block/file-posix.c
··· 1701 1701 case PREALLOC_MODE_FULL: 1702 1702 { 1703 1703 int64_t num = 0, left = offset - current_length; 1704 + off_t seek_result; 1704 1705 1705 1706 /* 1706 1707 * Knowing the final size from the beginning could allow the file ··· 1715 1716 1716 1717 buf = g_malloc0(65536); 1717 1718 1718 - result = lseek(fd, current_length, SEEK_SET); 1719 - if (result < 0) { 1719 + seek_result = lseek(fd, current_length, SEEK_SET); 1720 + if (seek_result < 0) { 1720 1721 result = -errno; 1721 1722 error_setg_errno(errp, -result, 1722 1723 "Failed to seek to the old end of file"); ··· 2114 2115 if (offs < 0) { 2115 2116 return -errno; /* D3 or D4 */ 2116 2117 } 2117 - assert(offs >= start); 2118 + 2119 + if (offs < start) { 2120 + /* This is not a valid return by lseek(). We are safe to just return 2121 + * -EIO in this case, and we'll treat it like D4. */ 2122 + return -EIO; 2123 + } 2118 2124 2119 2125 if (offs > start) { 2120 2126 /* D2: in hole, next data at offs */ ··· 2146 2152 if (offs < 0) { 2147 2153 return -errno; /* D1 and (H3 or H4) */ 2148 2154 } 2149 - assert(offs >= start); 2155 + 2156 + if (offs < start) { 2157 + /* This is not a valid return by lseek(). We are safe to just return 2158 + * -EIO in this case, and we'll treat it like H4. */ 2159 + return -EIO; 2160 + } 2150 2161 2151 2162 if (offs > start) { 2152 2163 /*
-20
tests/qemu-iotests/051.pc.out
··· 117 117 QEMU X.Y.Z monitor - type 'help' for more information 118 118 (qemu) quit 119 119 120 - Testing: -drive if=scsi,media=cdrom 121 - QEMU X.Y.Z monitor - type 'help' for more information 122 - (qemu) QEMU_PROG: -drive if=scsi,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type 123 - quit 124 - 125 120 Testing: -drive if=ide 126 121 QEMU X.Y.Z monitor - type 'help' for more information 127 122 (qemu) QEMU_PROG: Initialization of device ide-hd failed: Device needs media, but drive is empty 128 - 129 - Testing: -drive if=scsi 130 - QEMU X.Y.Z monitor - type 'help' for more information 131 - (qemu) QEMU_PROG: -drive if=scsi: warning: bus=0,unit=0 is deprecated with this machine type 132 - QEMU_PROG: -drive if=scsi: Device needs media, but drive is empty 133 123 134 124 Testing: -drive if=virtio 135 125 QEMU X.Y.Z monitor - type 'help' for more information ··· 170 160 QEMU X.Y.Z monitor - type 'help' for more information 171 161 (qemu) quit 172 162 173 - Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on 174 - QEMU X.Y.Z monitor - type 'help' for more information 175 - (qemu) QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on: warning: bus=0,unit=0 is deprecated with this machine type 176 - quit 177 - 178 163 Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on 179 164 QEMU X.Y.Z monitor - type 'help' for more information 180 165 (qemu) QEMU_PROG: Initialization of device ide-hd failed: Block node is read-only 181 - 182 - Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,readonly=on 183 - QEMU X.Y.Z monitor - type 'help' for more information 184 - (qemu) QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=scsi,readonly=on: warning: bus=0,unit=0 is deprecated with this machine type 185 - quit 186 166 187 167 Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on 188 168 QEMU X.Y.Z monitor - type 'help' for more information
+24
tests/qemu-iotests/106
··· 86 86 $QEMU_IMG resize -f "$IMGFMT" --shrink --preallocation=$growth_mode "$TEST_IMG" -${GROWTH_SIZE}K 87 87 done 88 88 89 + echo 90 + echo '=== Testing image growth on 2G empty image ===' 91 + 92 + for growth_mode in falloc full; do 93 + echo 94 + echo "--- growth_mode=$growth_mode ---" 95 + 96 + # Maybe we want to do an lseek() to the end of the file before the 97 + # preallocation; if the file has a length of 2 GB, that would 98 + # return an integer that overflows to negative when put into a 99 + # plain int. We should use the correct type for the result, and 100 + # this tests we do. 101 + 102 + _make_test_img 2G 103 + $QEMU_IMG resize -f "$IMGFMT" --preallocation=$growth_mode "$TEST_IMG" +${GROWTH_SIZE}K 104 + 105 + actual_size=$($QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | grep 'disk size') 106 + actual_size=$(echo "$actual_size" | sed -e 's/^[^0-9]*\([0-9]\+\).*$/\1/') 107 + 108 + if [ $actual_size -lt $GROWTH_SIZE ]; then 109 + echo "ERROR: Image should have at least ${GROWTH_SIZE}K, but has ${actual_size}K" 110 + fi 111 + done 112 + 89 113 # success, all done 90 114 echo '*** done' 91 115 rm -f $seq.full
+10
tests/qemu-iotests/106.out
··· 47 47 48 48 --- growth_mode=off --- 49 49 Image resized. 50 + 51 + === Testing image growth on 2G empty image === 52 + 53 + --- growth_mode=falloc --- 54 + Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=2147483648 55 + Image resized. 56 + 57 + --- growth_mode=full --- 58 + Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=2147483648 59 + Image resized. 50 60 *** done
+47
tests/qemu-iotests/122
··· 130 130 131 131 132 132 echo 133 + echo "=== Corrupted size field in compressed cluster descriptor ===" 134 + echo 135 + # Create an empty image and fill half of it with compressed data. 136 + # The L2 entries of the two compressed clusters are located at 137 + # 0x800000 and 0x800008, their original values are 0x4008000000a00000 138 + # and 0x4008000000a00802 (5 sectors for compressed data each). 139 + _make_test_img 8M -o cluster_size=2M 140 + $QEMU_IO -c "write -c -P 0x11 0 2M" -c "write -c -P 0x11 2M 2M" "$TEST_IMG" \ 141 + 2>&1 | _filter_qemu_io | _filter_testdir 142 + 143 + # Reduce size of compressed data to 4 sectors: this corrupts the image. 144 + poke_file "$TEST_IMG" $((0x800000)) "\x40\x06" 145 + $QEMU_IO -c "read -P 0x11 0 4M" "$TEST_IMG" 2>&1 | _filter_qemu_io | _filter_testdir 146 + 147 + # 'qemu-img check' however doesn't see anything wrong because it 148 + # doesn't try to decompress the data and the refcounts are consistent. 149 + # TODO: update qemu-img so this can be detected. 150 + _check_test_img 151 + 152 + # Increase size of compressed data to the maximum (8192 sectors). 153 + # This makes QEMU read more data (8192 sectors instead of 5, host 154 + # addresses [0xa00000, 0xdfffff]), but the decompression algorithm 155 + # stops once we have enough to restore the uncompressed cluster, so 156 + # the rest of the data is ignored. 157 + poke_file "$TEST_IMG" $((0x800000)) "\x7f\xfe" 158 + # Do it also for the second compressed cluster (L2 entry at 0x800008). 159 + # In this case the compressed data would span 3 host clusters 160 + # (host addresses: [0xa00802, 0xe00801]) 161 + poke_file "$TEST_IMG" $((0x800008)) "\x7f\xfe" 162 + 163 + # Here the image is too small so we're asking QEMU to read beyond the 164 + # end of the image. 165 + $QEMU_IO -c "read -P 0x11 0 4M" "$TEST_IMG" 2>&1 | _filter_qemu_io | _filter_testdir 166 + # But if we grow the image we won't be reading beyond its end anymore. 167 + $QEMU_IO -c "write -P 0x22 4M 4M" "$TEST_IMG" 2>&1 | _filter_qemu_io | _filter_testdir 168 + $QEMU_IO -c "read -P 0x11 0 4M" "$TEST_IMG" 2>&1 | _filter_qemu_io | _filter_testdir 169 + 170 + # The refcount data is however wrong because due to the increased size 171 + # of the compressed data it now reaches the following host clusters. 172 + # This can be repaired by qemu-img check by increasing the refcount of 173 + # those clusters. 174 + # TODO: update qemu-img to correct the compressed cluster size instead. 175 + _check_test_img -r all 176 + $QEMU_IO -c "read -P 0x11 0 4M" "$TEST_IMG" 2>&1 | _filter_qemu_io | _filter_testdir 177 + $QEMU_IO -c "read -P 0x22 4M 4M" "$TEST_IMG" 2>&1 | _filter_qemu_io | _filter_testdir 178 + 179 + echo 133 180 echo "=== Full allocation with -S 0 ===" 134 181 echo 135 182
+33
tests/qemu-iotests/122.out
··· 99 99 read 1046528/1046528 bytes at offset 1048576 100 100 1022 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 101 101 102 + === Corrupted size field in compressed cluster descriptor === 103 + 104 + Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8388608 105 + wrote 2097152/2097152 bytes at offset 0 106 + 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 107 + wrote 2097152/2097152 bytes at offset 2097152 108 + 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 109 + read failed: Input/output error 110 + No errors were found on the image. 111 + read 4194304/4194304 bytes at offset 0 112 + 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 113 + wrote 4194304/4194304 bytes at offset 4194304 114 + 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 115 + read 4194304/4194304 bytes at offset 0 116 + 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 117 + ERROR cluster 6 refcount=1 reference=3 118 + ERROR cluster 7 refcount=1 reference=2 119 + Repairing cluster 6 refcount=1 reference=3 120 + Repairing cluster 7 refcount=1 reference=2 121 + Repairing OFLAG_COPIED data cluster: l2_entry=8000000000c00000 refcount=3 122 + Repairing OFLAG_COPIED data cluster: l2_entry=8000000000e00000 refcount=2 123 + The following inconsistencies were found and repaired: 124 + 125 + 0 leaked clusters 126 + 4 corruptions 127 + 128 + Double checking the fixed image now... 129 + No errors were found on the image. 130 + read 4194304/4194304 bytes at offset 0 131 + 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 132 + read 4194304/4194304 bytes at offset 4194304 133 + 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 134 + 102 135 === Full allocation with -S 0 === 103 136 104 137 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
+1 -5
tests/qemu-iotests/186
··· 64 64 { 65 65 echo "info block" | 66 66 do_run_qemu "$@" | _filter_win32 | _filter_hmp | _filter_qemu | 67 - _filter_generated_node_ids 67 + _filter_generated_node_ids | _filter_qom_path 68 68 } 69 69 70 70 ··· 132 132 check_info_block -drive if=ide,driver=null-co 133 133 check_info_block -drive if=ide,media=cdrom 134 134 check_info_block -drive if=ide,driver=null-co,media=cdrom 135 - 136 - check_info_block -drive if=scsi,driver=null-co 137 - check_info_block -drive if=scsi,media=cdrom 138 - check_info_block -drive if=scsi,driver=null-co,media=cdrom 139 135 140 136 check_info_block -drive if=virtio,driver=null-co 141 137
+28 -56
tests/qemu-iotests/186.out
··· 7 7 QEMU X.Y.Z monitor - type 'help' for more information 8 8 (qemu) info block 9 9 /machine/peripheral-anon/device[1]: [not inserted] 10 - Attached to: /machine/peripheral-anon/device[1] 10 + Attached to: PATH 11 11 Removable device: not locked, tray closed 12 12 (qemu) quit 13 13 ··· 23 23 QEMU X.Y.Z monitor - type 'help' for more information 24 24 (qemu) info block 25 25 /machine/peripheral-anon/device[1]: [not inserted] 26 - Attached to: /machine/peripheral-anon/device[1] 26 + Attached to: PATH 27 27 Removable device: not locked, tray closed 28 28 (qemu) quit 29 29 ··· 39 39 QEMU X.Y.Z monitor - type 'help' for more information 40 40 (qemu) info block 41 41 /machine/peripheral-anon/device[1]: [not inserted] 42 - Attached to: /machine/peripheral-anon/device[1] 42 + Attached to: PATH 43 43 Removable device: not locked, tray closed 44 44 (qemu) quit 45 45 ··· 58 58 QEMU X.Y.Z monitor - type 'help' for more information 59 59 (qemu) info block 60 60 null: null-co:// (null-co) 61 - Attached to: /machine/peripheral-anon/device[1] 61 + Attached to: PATH 62 62 Cache mode: writeback 63 63 (qemu) quit 64 64 ··· 74 74 QEMU X.Y.Z monitor - type 'help' for more information 75 75 (qemu) info block 76 76 null: null-co:// (null-co) 77 - Attached to: /machine/peripheral-anon/device[1] 77 + Attached to: PATH 78 78 Cache mode: writeback 79 79 (qemu) quit 80 80 ··· 90 90 QEMU X.Y.Z monitor - type 'help' for more information 91 91 (qemu) info block 92 92 null: null-co:// (null-co) 93 - Attached to: /machine/peripheral-anon/device[1]/virtio-backend 93 + Attached to: PATH 94 94 Cache mode: writeback 95 95 (qemu) quit 96 96 ··· 98 98 QEMU X.Y.Z monitor - type 'help' for more information 99 99 (qemu) info block 100 100 null: null-co:// (null-co) 101 - Attached to: /machine/peripheral/qdev_id/virtio-backend 101 + Attached to: PATH 102 102 Cache mode: writeback 103 103 (qemu) quit 104 104 ··· 106 106 QEMU X.Y.Z monitor - type 'help' for more information 107 107 (qemu) info block 108 108 null: null-co:// (null-co) 109 - Attached to: /machine/peripheral-anon/device[1] 109 + Attached to: PATH 110 110 Removable device: not locked, tray closed 111 111 Cache mode: writeback 112 112 (qemu) quit ··· 124 124 QEMU X.Y.Z monitor - type 'help' for more information 125 125 (qemu) info block 126 126 null: null-co:// (null-co) 127 - Attached to: /machine/peripheral-anon/device[1] 127 + Attached to: PATH 128 128 Removable device: not locked, tray closed 129 129 Cache mode: writeback 130 130 (qemu) quit ··· 142 142 QEMU X.Y.Z monitor - type 'help' for more information 143 143 (qemu) info block 144 144 null: null-co:// (null-co) 145 - Attached to: /machine/peripheral-anon/device[1] 145 + Attached to: PATH 146 146 Removable device: not locked, tray closed 147 147 Cache mode: writeback 148 148 (qemu) quit ··· 191 191 Cache mode: writeback 192 192 193 193 null: null-co:// (null-co) 194 - Attached to: /machine/peripheral/qdev_id/virtio-backend 194 + Attached to: PATH 195 195 Cache mode: writeback 196 196 (qemu) quit 197 197 ··· 241 241 QEMU X.Y.Z monitor - type 'help' for more information 242 242 (qemu) info block 243 243 none0 (null): null-co:// (null-co) 244 - Attached to: /machine/peripheral-anon/device[1] 244 + Attached to: PATH 245 245 Cache mode: writeback 246 246 (qemu) quit 247 247 ··· 257 257 QEMU X.Y.Z monitor - type 'help' for more information 258 258 (qemu) info block 259 259 none0 (null): null-co:// (null-co) 260 - Attached to: /machine/peripheral-anon/device[1] 260 + Attached to: PATH 261 261 Cache mode: writeback 262 262 (qemu) quit 263 263 ··· 273 273 QEMU X.Y.Z monitor - type 'help' for more information 274 274 (qemu) info block 275 275 none0 (null): null-co:// (null-co) 276 - Attached to: /machine/peripheral-anon/device[1]/virtio-backend 276 + Attached to: PATH 277 277 Cache mode: writeback 278 278 (qemu) quit 279 279 ··· 281 281 QEMU X.Y.Z monitor - type 'help' for more information 282 282 (qemu) info block 283 283 none0 (null): null-co:// (null-co) 284 - Attached to: /machine/peripheral/qdev_id/virtio-backend 284 + Attached to: PATH 285 285 Cache mode: writeback 286 286 (qemu) quit 287 287 ··· 289 289 QEMU X.Y.Z monitor - type 'help' for more information 290 290 (qemu) info block 291 291 none0 (null): null-co:// (null-co) 292 - Attached to: /machine/peripheral-anon/device[1] 292 + Attached to: PATH 293 293 Removable device: not locked, tray closed 294 294 Cache mode: writeback 295 295 (qemu) quit ··· 307 307 QEMU X.Y.Z monitor - type 'help' for more information 308 308 (qemu) info block 309 309 none0 (null): null-co:// (null-co) 310 - Attached to: /machine/peripheral-anon/device[1] 310 + Attached to: PATH 311 311 Removable device: not locked, tray closed 312 312 Cache mode: writeback 313 313 (qemu) quit ··· 325 325 QEMU X.Y.Z monitor - type 'help' for more information 326 326 (qemu) info block 327 327 none0 (null): null-co:// (null-co) 328 - Attached to: /machine/peripheral-anon/device[1] 328 + Attached to: PATH 329 329 Removable device: not locked, tray closed 330 330 Cache mode: writeback 331 331 (qemu) quit ··· 353 353 QEMU X.Y.Z monitor - type 'help' for more information 354 354 (qemu) info block 355 355 none0: [not inserted] 356 - Attached to: /machine/peripheral-anon/device[1] 356 + Attached to: PATH 357 357 Removable device: not locked, tray closed 358 358 (qemu) quit 359 359 ··· 369 369 QEMU X.Y.Z monitor - type 'help' for more information 370 370 (qemu) info block 371 371 none0: [not inserted] 372 - Attached to: /machine/peripheral-anon/device[1] 372 + Attached to: PATH 373 373 Removable device: not locked, tray closed 374 374 (qemu) quit 375 375 ··· 385 385 QEMU X.Y.Z monitor - type 'help' for more information 386 386 (qemu) info block 387 387 none0: [not inserted] 388 - Attached to: /machine/peripheral-anon/device[1] 388 + Attached to: PATH 389 389 Removable device: not locked, tray closed 390 390 (qemu) quit 391 391 ··· 404 404 QEMU X.Y.Z monitor - type 'help' for more information 405 405 (qemu) info block 406 406 floppy0: [not inserted] 407 - Attached to: /machine/unattached/device[17] 407 + Attached to: PATH 408 408 Removable device: not locked, tray closed 409 409 (qemu) quit 410 410 ··· 412 412 QEMU X.Y.Z monitor - type 'help' for more information 413 413 (qemu) info block 414 414 floppy0 (NODE_NAME): null-co:// (null-co) 415 - Attached to: /machine/unattached/device[17] 415 + Attached to: PATH 416 416 Removable device: not locked, tray closed 417 417 Cache mode: writeback 418 418 (qemu) quit ··· 421 421 QEMU X.Y.Z monitor - type 'help' for more information 422 422 (qemu) info block 423 423 ide0-hd0 (NODE_NAME): null-co:// (null-co) 424 - Attached to: /machine/unattached/device[18] 424 + Attached to: PATH 425 425 Cache mode: writeback 426 426 (qemu) quit 427 427 ··· 429 429 QEMU X.Y.Z monitor - type 'help' for more information 430 430 (qemu) info block 431 431 ide0-cd0: [not inserted] 432 - Attached to: /machine/unattached/device[18] 432 + Attached to: PATH 433 433 Removable device: not locked, tray closed 434 434 (qemu) quit 435 435 ··· 437 437 QEMU X.Y.Z monitor - type 'help' for more information 438 438 (qemu) info block 439 439 ide0-cd0 (NODE_NAME): null-co:// (null-co, read-only) 440 - Attached to: /machine/unattached/device[18] 441 - Removable device: not locked, tray closed 442 - Cache mode: writeback 443 - (qemu) quit 444 - 445 - Testing: -drive if=scsi,driver=null-co 446 - QEMU X.Y.Z monitor - type 'help' for more information 447 - (qemu) QEMU_PROG: -drive if=scsi,driver=null-co: warning: bus=0,unit=0 is deprecated with this machine type 448 - info block 449 - scsi0-hd0 (NODE_NAME): null-co:// (null-co) 450 - Attached to: /machine/unattached/device[27]/scsi.0/legacy[0] 451 - Cache mode: writeback 452 - (qemu) quit 453 - 454 - Testing: -drive if=scsi,media=cdrom 455 - QEMU X.Y.Z monitor - type 'help' for more information 456 - (qemu) QEMU_PROG: -drive if=scsi,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type 457 - info block 458 - scsi0-cd0: [not inserted] 459 - Attached to: /machine/unattached/device[27]/scsi.0/legacy[0] 460 - Removable device: not locked, tray closed 461 - (qemu) quit 462 - 463 - Testing: -drive if=scsi,driver=null-co,media=cdrom 464 - QEMU X.Y.Z monitor - type 'help' for more information 465 - (qemu) QEMU_PROG: -drive if=scsi,driver=null-co,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type 466 - info block 467 - scsi0-cd0 (NODE_NAME): null-co:// (null-co, read-only) 468 - Attached to: /machine/unattached/device[27]/scsi.0/legacy[0] 440 + Attached to: PATH 469 441 Removable device: not locked, tray closed 470 442 Cache mode: writeback 471 443 (qemu) quit ··· 474 446 QEMU X.Y.Z monitor - type 'help' for more information 475 447 (qemu) info block 476 448 virtio0 (NODE_NAME): null-co:// (null-co) 477 - Attached to: /machine/peripheral-anon/device[1]/virtio-backend 449 + Attached to: PATH 478 450 Cache mode: writeback 479 451 (qemu) quit 480 452 ··· 482 454 QEMU X.Y.Z monitor - type 'help' for more information 483 455 (qemu) info block 484 456 pflash0 (NODE_NAME): json:{"driver": "null-co", "size": "1M"} (null-co) 485 - Attached to: /machine/unattached/device[2] 457 + Attached to: PATH 486 458 Cache mode: writeback 487 459 (qemu) quit 488 460
+1 -1
tests/qemu-iotests/208
··· 28 28 iotests.VM() as vm: 29 29 30 30 img_size = '10M' 31 - iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, disk_img_path, img_size) 31 + iotests.qemu_img_create('-f', iotests.imgfmt, disk_img_path, img_size) 32 32 33 33 iotests.log('Launching VM...') 34 34 (vm.add_drive(disk_img_path, 'node-name=drive0-node', interface='none')
+2 -2
tests/qemu-iotests/check
··· 538 538 then 539 539 if [ -x "$build_iotests/qemu" ]; then 540 540 export QEMU_PROG="$build_iotests/qemu" 541 - elif [ -x "$build_root/$arch-softmmu/qemu-system-$arch" ]; then 542 - export QEMU_PROG="$build_root/$arch-softmmu/qemu-system-$arch" 541 + elif [ -x "$build_root/${qemu_arch}-softmmu/qemu-system-${qemu_arch}" ]; then 542 + export QEMU_PROG="$build_root/${qemu_arch}-softmmu/qemu-system-${qemu_arch}" 543 543 else 544 544 pushd "$build_root" > /dev/null 545 545 for binary in *-softmmu/qemu-system-*
+1
tests/qemu-iotests/common.config
··· 23 23 24 24 HOSTOS=`uname -s` 25 25 arch=`uname -m` 26 + [[ "$arch" =~ "ppc64" ]] && qemu_arch=ppc64 || qemu_arch="$arch" 26 27 27 28 export PWD=`pwd` 28 29
+5
tests/qemu-iotests/common.filter
··· 32 32 sed -re 's/\#block[0-9]{3,}/NODE_NAME/' 33 33 } 34 34 35 + _filter_qom_path() 36 + { 37 + sed -e 's#\(Attached to: *\) /.*#\1 PATH#' 38 + } 39 + 35 40 # replace occurrences of the actual TEST_DIR value with TEST_DIR 36 41 _filter_testdir() 37 42 {