Browse Source
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJVevYFAAoJEH8JsnLIjy/W3jEP/0hiQ3rCRZ/he8s5maTdT+TR
YSeHkB5rKpz0Uopn1DMn1QrIbUVzX7dyb+uf9zQ0/xRQIzf6k8uxqU/NWrdoF3NK
qx91dGWedwnG+TEBIMbcR7nMrw4dP6kH7uPz/VWMXDHVLz0HIcD95qhKgs0mSY6J
dWqex6ACjXM68zJU5IioagU9evV80WZE1S8z7zfixxtTBx5hCaTVbwalkaCxcrXw
PbZle55rjI8B10+OzgBw0fq10nias+NTndU9CwNBboxmEtAjq8/mQ663vcWlmiFo
9a/hkda27Z5ut/0Tqk1v4uLHauylp++rrAabPBAuCFMKes6cdkddP15Q/r52aJ29
5meodQtbet1rGrM+Aq4vuSuWId71PGypEI/3URDdNfYFNISoeLLsk4lcQUu7VrDD
sRX3Jt8SI3nkIgOnhPyi7NDPmafxFt8yRt5vM8MyR5ynF8NS/2hiAc3wqnbXGjUj
a5GqDCefb1yM0R5HvksuFFt3OnXlKJQ3J+ksXNUJf9DSAZPauqWD696pcTeg8wyy
3PIGkczgUuKTVfFWd3THZxJLAo7ZuqvXBHHV8o1SeMBDxwh4FhTd8Kjvm3rUNFfl
VDox4qwZ1AcxLrxgqazKU7sD9iWBDHURRcpOoUsBys7oxQZnhcmMp1fRlEkTOyrD
HNiSNByqBrtkfeVzHlSe
=QgYk
-----END PGP SIGNATURE-----
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer core and image format patches
# gpg: Signature made Fri Jun 12 16:08:53 2015 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
* remotes/kevin/tags/for-upstream: (25 commits)
block: Fix reopen flag inheritance
block: Add BlockDriverState.inherits_from
block: Add list of children to BlockDriverState
queue.h: Add QLIST_FIX_HEAD_PTR()
block: Drain requests before swapping nodes in bdrv_swap()
block: Move flag inheritance to bdrv_open_inherit()
block: Use QemuOpts in bdrv_open_common()
block: Use macro for cache option names
vmdk: Use bdrv_open_image()
quorum: Use bdrv_open_image()
check-qdict: Test cases for new functions
qdict: Add qdict_{set,copy}_default()
qdict: Add qdict_array_entries()
iotests: Add tests for overriding BDRV_O_PROTOCOL
block: driver should override flags in bdrv_open()
block: Change bitmap truncate conditional to assertion
block: record new size in bdrv_dirty_bitmap_truncate
raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size
vmdk: Use vmdk_find_index_in_cluster everywhere
vmdk: Fix index_in_cluster calculation in vmdk_co_get_block_status
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
pull/28/head
25 changed files with 657 additions and 158 deletions
@ -0,0 +1,60 @@ |
|||
#!/bin/bash |
|||
# |
|||
# NBD test case for overriding BDRV_O_PROTOCOL by explicitly specifying |
|||
# a driver |
|||
# |
|||
# Copyright (C) 2015 Red Hat, Inc. |
|||
# |
|||
# This program is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 2 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
|
|||
# creator |
|||
owner=mreitz@redhat.com |
|||
|
|||
seq="$(basename $0)" |
|||
echo "QA output created by $seq" |
|||
|
|||
here="$PWD" |
|||
tmp=/tmp/$$ |
|||
status=1 # failure is the default! |
|||
|
|||
_cleanup() |
|||
{ |
|||
_cleanup_test_img |
|||
} |
|||
trap "_cleanup; exit \$status" 0 1 2 3 15 |
|||
|
|||
# get standard environment, filters and checks |
|||
. ./common.rc |
|||
. ./common.filter |
|||
|
|||
_supported_fmt raw |
|||
_supported_proto nbd |
|||
_supported_os Linux |
|||
|
|||
_make_test_img 64M |
|||
# This should not crash |
|||
echo "{'execute': 'qmp_capabilities'} |
|||
{'execute': 'human-monitor-command', |
|||
'arguments': {'command-line': 'qemu-io drv \"read -P 0 0 64k\"'}} |
|||
{'execute': 'quit'}" \ |
|||
| $QEMU -drive id=drv,if=none,file="$TEST_IMG",driver=nbd \ |
|||
-qmp stdio -nodefaults \ |
|||
| _filter_qmp | _filter_qemu_io |
|||
|
|||
# success, all done |
|||
echo |
|||
echo '*** done' |
|||
rm -f $seq.full |
|||
status=0 |
|||
@ -0,0 +1,11 @@ |
|||
QA output created by 119 |
|||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 |
|||
QMP_VERSION |
|||
{"return": {}} |
|||
read 65536/65536 bytes at offset 0 |
|||
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
|||
{"return": ""} |
|||
{"return": {}} |
|||
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} |
|||
|
|||
*** done |
|||
@ -0,0 +1,65 @@ |
|||
#!/bin/bash |
|||
# |
|||
# Non-NBD test cases for overriding BDRV_O_PROTOCOL by explicitly |
|||
# specifying a driver |
|||
# |
|||
# Copyright (C) 2015 Red Hat, Inc. |
|||
# |
|||
# This program is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 2 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
|
|||
# creator |
|||
owner=mreitz@redhat.com |
|||
|
|||
seq="$(basename $0)" |
|||
echo "QA output created by $seq" |
|||
|
|||
here="$PWD" |
|||
tmp=/tmp/$$ |
|||
status=1 # failure is the default! |
|||
|
|||
_cleanup() |
|||
{ |
|||
_cleanup_test_img |
|||
} |
|||
trap "_cleanup; exit \$status" 0 1 2 3 15 |
|||
|
|||
# get standard environment, filters and checks |
|||
. ./common.rc |
|||
. ./common.filter |
|||
|
|||
_supported_fmt generic |
|||
_supported_proto file |
|||
_supported_os Linux |
|||
|
|||
_make_test_img 64M |
|||
|
|||
echo "{'execute': 'qmp_capabilities'} |
|||
{'execute': 'human-monitor-command', |
|||
'arguments': {'command-line': 'qemu-io drv \"write -P 42 0 64k\"'}} |
|||
{'execute': 'quit'}" \ |
|||
| $QEMU -qmp stdio -nodefaults \ |
|||
-drive id=drv,if=none,file="$TEST_IMG",driver=raw,file.driver=$IMGFMT \ |
|||
| _filter_qmp | _filter_qemu_io |
|||
$QEMU_IO -c 'read -P 42 0 64k' "$TEST_IMG" | _filter_qemu_io |
|||
|
|||
$QEMU_IO_PROG -c 'read -P 42 0 64k' \ |
|||
"json:{'driver': 'raw', 'file': {'driver': '$IMGFMT', 'file': {'filename': '$TEST_IMG'}}}" \ |
|||
| _filter_qemu_io |
|||
|
|||
# success, all done |
|||
echo |
|||
echo '*** done' |
|||
rm -f $seq.full |
|||
status=0 |
|||
@ -0,0 +1,15 @@ |
|||
QA output created by 120 |
|||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 |
|||
QMP_VERSION |
|||
{"return": {}} |
|||
wrote 65536/65536 bytes at offset 0 |
|||
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
|||
{"return": ""} |
|||
{"return": {}} |
|||
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} |
|||
read 65536/65536 bytes at offset 0 |
|||
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
|||
read 65536/65536 bytes at offset 0 |
|||
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
|||
|
|||
*** done |
|||
Loading…
Reference in new issue