Skip to content

Commit 23ae287

Browse files
committed
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-07-27' into staging
Block patches for 5.1: - Coverity fix - iotests fix for rx and avr - iotests fix for qcow2 -o compat=0.10 # gpg: Signature made Mon 27 Jul 2020 15:36:23 BST # gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40 # gpg: issuer "[email protected]" # gpg: Good signature from "Max Reitz <[email protected]>" [full] # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * remotes/maxreitz/tags/pull-block-2020-07-27: iotests/197: Fix for compat=0.10 iotests: Select a default machine for the rx and avr targets block/amend: Check whether the node exists Signed-off-by: Peter Maydell <[email protected]>
2 parents 93ea484 + 1855536 commit 23ae287

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

block/amend.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,12 @@ void qmp_x_blockdev_amend(const char *job_id,
6969
BlockdevAmendJob *s;
7070
const char *fmt = BlockdevDriver_str(options->driver);
7171
BlockDriver *drv = bdrv_find_format(fmt);
72-
BlockDriverState *bs = bdrv_find_node(node_name);
72+
BlockDriverState *bs;
7373

74+
bs = bdrv_lookup_bs(NULL, node_name, errp);
75+
if (!bs) {
76+
return;
77+
}
7478

7579
if (!drv) {
7680
error_setg(errp, "Block driver '%s' not found or not supported", fmt);

tests/qemu-iotests/197

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ echo
112112
echo '=== Partial final cluster ==='
113113
echo
114114

115-
_make_test_img 1024
115+
# Force compat=1.1, because writing zeroes on a v2 image without a
116+
# backing file would just result in an unallocated cluster
117+
_make_test_img -o compat=1.1 1024
116118
$QEMU_IO -f $IMGFMT -C -c 'read 0 1024' "$TEST_IMG" | _filter_qemu_io
117119
$QEMU_IO -f $IMGFMT -c map "$TEST_IMG"
118120
_check_test_img

tests/qemu-iotests/check

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -595,15 +595,19 @@ then
595595
fi
596596
export QEMU_PROG="$(type -p "$QEMU_PROG")"
597597

598+
export QEMU_OPTIONS="-nodefaults -display none -accel qtest"
598599
case "$QEMU_PROG" in
599600
*qemu-system-arm|*qemu-system-aarch64)
600-
export QEMU_OPTIONS="-nodefaults -display none -machine virt -accel qtest"
601+
export QEMU_OPTIONS="$QEMU_OPTIONS -machine virt"
601602
;;
602-
*qemu-system-tricore)
603-
export QEMU_OPTIONS="-nodefaults -display none -machine tricore_testboard -accel qtest"
603+
*qemu-system-avr)
604+
export QEMU_OPTIONS="$QEMU_OPTIONS -machine mega2560"
605+
;;
606+
*qemu-system-rx)
607+
export QEMU_OPTIONS="$QEMU_OPTIONS -machine gdbsim-r5f562n8"
604608
;;
605-
*)
606-
export QEMU_OPTIONS="-nodefaults -display none -accel qtest"
609+
*qemu-system-tricore)
610+
export QEMU_OPTIONS="-$QEMU_OPTIONS -machine tricore_testboard"
607611
;;
608612
esac
609613

0 commit comments

Comments
 (0)