mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
Block pull request
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJTsnWTAAoJEJykq7OBq3PIKXMH/0+fWDs4ZnAl32AVmHTYFNZS AJHkzdRCWAsq2E7jqoPficjZSy7oZMvgWN7t30SxljlhRVfilr+KXNHl0sxXFRAn rnjWIPBATcVYpHaPcjP85YTsJitjj08eUYVD2HgbtIarQyyUdhEG5l1voAI8oxkY 7T92X+olbyI+NqdDUMvQUt0gdoptZPEnieCI5rScQQiwXKRv9uEJBYBSlTFJ5BTb 6XOszj62Yk25W3Sq74yfvvecFhNIXAOlzXqD03DSKHos0pLIJhMxEeYZrKIacBqP HspYKFwOjRAflp3Pcv29m+6IjnL33IJJK6dou9Aou4UqsLRReDeeeiU1aX9ym2Q= =txun -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging Block pull request # gpg: Signature made Tue 01 Jul 2014 09:47:15 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: (23 commits) block: add backing-file option to block-stream block: extend block-commit to accept a string for the backing file block: add helper function to determine if a BDS is in a chain block: add QAPI command to allow live backing file change qapi: Change back sector-count to sectors-count in quorum QAPI events. block/cow: Avoid use of uninitialized cow_bs in error path block: simplify bdrv_find_base() and bdrv_find_overlay() block: make 'top' argument to block-commit optional iotests: Add more tests to quick group iotests: Add qemu tests to quick group iotests: Simplify qemu-iotests-quick.sh qemu-img create: add 'nocow' option virtio-blk: remove need for explicit x-data-plane=on option qdev: drop iothread property type virtio-blk: replace x-iothread with iothread link property virtio-blk: move qdev properties into virtio-blk.c virtio: fix virtio-blk child refcount in transports virtio-blk: drop virtio_blk_set_conf() virtio-blk: use aliases instead of duplicate qdev properties qdev: add qdev_alias_all_properties() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
8593efa4fb
35 changed files with 569 additions and 242 deletions
|
@ -1,16 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# We don't know which of the system emulator binaries there is (or if there is
|
||||
# any at all), so the 'quick' group doesn't contain any tests that require
|
||||
# running qemu proper. Assign a fake binary name so that qemu-iotests doesn't
|
||||
# complain about the missing binary.
|
||||
export QEMU_PROG="this_should_be_unused"
|
||||
|
||||
export QEMU_IMG_PROG="$(pwd)/qemu-img"
|
||||
export QEMU_IO_PROG="$(pwd)/qemu-io"
|
||||
export QEMU_NBD_PROG="$(pwd)/qemu-nbd"
|
||||
|
||||
cd $SRC_PATH/tests/qemu-iotests
|
||||
cd tests/qemu-iotests
|
||||
|
||||
ret=0
|
||||
./check -T -nocache -qcow2 -g quick || ret=1
|
||||
|
|
|
@ -35,11 +35,7 @@ test_img = os.path.join(iotests.test_dir, 'test.img')
|
|||
class ImageCommitTestCase(iotests.QMPTestCase):
|
||||
'''Abstract base class for image commit test cases'''
|
||||
|
||||
def run_commit_test(self, top, base, need_ready=False):
|
||||
self.assert_no_active_block_jobs()
|
||||
result = self.vm.qmp('block-commit', device='drive0', top=top, base=base)
|
||||
self.assert_qmp(result, 'return', {})
|
||||
|
||||
def wait_for_complete(self, need_ready=False):
|
||||
completed = False
|
||||
ready = False
|
||||
while not completed:
|
||||
|
@ -62,6 +58,18 @@ class ImageCommitTestCase(iotests.QMPTestCase):
|
|||
self.assert_no_active_block_jobs()
|
||||
self.vm.shutdown()
|
||||
|
||||
def run_commit_test(self, top, base, need_ready=False):
|
||||
self.assert_no_active_block_jobs()
|
||||
result = self.vm.qmp('block-commit', device='drive0', top=top, base=base)
|
||||
self.assert_qmp(result, 'return', {})
|
||||
self.wait_for_complete(need_ready)
|
||||
|
||||
def run_default_commit_test(self):
|
||||
self.assert_no_active_block_jobs()
|
||||
result = self.vm.qmp('block-commit', device='drive0')
|
||||
self.assert_qmp(result, 'return', {})
|
||||
self.wait_for_complete()
|
||||
|
||||
class TestSingleDrive(ImageCommitTestCase):
|
||||
image_len = 1 * 1024 * 1024
|
||||
test_len = 1 * 1024 * 256
|
||||
|
@ -113,17 +121,17 @@ class TestSingleDrive(ImageCommitTestCase):
|
|||
self.assertEqual(-1, qemu_io('-c', 'read -P 0xab 0 524288', backing_img).find("verification failed"))
|
||||
self.assertEqual(-1, qemu_io('-c', 'read -P 0xef 524288 524288', backing_img).find("verification failed"))
|
||||
|
||||
def test_top_is_default_active(self):
|
||||
self.run_default_commit_test()
|
||||
self.assertEqual(-1, qemu_io('-c', 'read -P 0xab 0 524288', backing_img).find("verification failed"))
|
||||
self.assertEqual(-1, qemu_io('-c', 'read -P 0xef 524288 524288', backing_img).find("verification failed"))
|
||||
|
||||
def test_top_and_base_reversed(self):
|
||||
self.assert_no_active_block_jobs()
|
||||
result = self.vm.qmp('block-commit', device='drive0', top='%s' % backing_img, base='%s' % mid_img)
|
||||
self.assert_qmp(result, 'error/class', 'GenericError')
|
||||
self.assert_qmp(result, 'error/desc', 'Base \'%s\' not found' % mid_img)
|
||||
|
||||
def test_top_omitted(self):
|
||||
self.assert_no_active_block_jobs()
|
||||
result = self.vm.qmp('block-commit', device='drive0')
|
||||
self.assert_qmp(result, 'error/class', 'GenericError')
|
||||
self.assert_qmp(result, 'error/desc', "Parameter 'top' is missing")
|
||||
|
||||
class TestRelativePaths(ImageCommitTestCase):
|
||||
image_len = 1 * 1024 * 1024
|
||||
|
|
|
@ -66,6 +66,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: create -f qcow2 -o ? TEST_DIR/t.qcow2 128M
|
||||
Supported options:
|
||||
|
@ -77,6 +78,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: create -f qcow2 -o cluster_size=4k,help TEST_DIR/t.qcow2 128M
|
||||
Supported options:
|
||||
|
@ -88,6 +90,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: create -f qcow2 -o cluster_size=4k,? TEST_DIR/t.qcow2 128M
|
||||
Supported options:
|
||||
|
@ -99,6 +102,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: create -f qcow2 -o help,cluster_size=4k TEST_DIR/t.qcow2 128M
|
||||
Supported options:
|
||||
|
@ -110,6 +114,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: create -f qcow2 -o ?,cluster_size=4k TEST_DIR/t.qcow2 128M
|
||||
Supported options:
|
||||
|
@ -121,6 +126,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: create -f qcow2 -o cluster_size=4k -o help TEST_DIR/t.qcow2 128M
|
||||
Supported options:
|
||||
|
@ -132,6 +138,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: create -f qcow2 -o cluster_size=4k -o ? TEST_DIR/t.qcow2 128M
|
||||
Supported options:
|
||||
|
@ -143,6 +150,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: create -f qcow2 -o backing_file=TEST_DIR/t.qcow2,,help TEST_DIR/t.qcow2 128M
|
||||
Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/t.qcow2,help' encryption=off cluster_size=65536 lazy_refcounts=off
|
||||
|
@ -247,6 +255,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: convert -O qcow2 -o ? TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
|
||||
Supported options:
|
||||
|
@ -258,6 +267,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: convert -O qcow2 -o cluster_size=4k,help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
|
||||
Supported options:
|
||||
|
@ -269,6 +279,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: convert -O qcow2 -o cluster_size=4k,? TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
|
||||
Supported options:
|
||||
|
@ -280,6 +291,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: convert -O qcow2 -o help,cluster_size=4k TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
|
||||
Supported options:
|
||||
|
@ -291,6 +303,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: convert -O qcow2 -o ?,cluster_size=4k TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
|
||||
Supported options:
|
||||
|
@ -302,6 +315,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: convert -O qcow2 -o cluster_size=4k -o help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
|
||||
Supported options:
|
||||
|
@ -313,6 +327,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: convert -O qcow2 -o cluster_size=4k -o ? TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
|
||||
Supported options:
|
||||
|
@ -324,6 +339,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: convert -O qcow2 -o backing_file=TEST_DIR/t.qcow2,,help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
|
||||
qemu-img: Could not open 'TEST_DIR/t.qcow2.base': Could not open backing file: Could not open 'TEST_DIR/t.qcow2,help': No such file or directory
|
||||
|
@ -417,6 +433,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: amend -f qcow2 -o ? TEST_DIR/t.qcow2
|
||||
Supported options:
|
||||
|
@ -428,6 +445,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: amend -f qcow2 -o cluster_size=4k,help TEST_DIR/t.qcow2
|
||||
Supported options:
|
||||
|
@ -439,6 +457,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: amend -f qcow2 -o cluster_size=4k,? TEST_DIR/t.qcow2
|
||||
Supported options:
|
||||
|
@ -450,6 +469,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: amend -f qcow2 -o help,cluster_size=4k TEST_DIR/t.qcow2
|
||||
Supported options:
|
||||
|
@ -461,6 +481,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: amend -f qcow2 -o ?,cluster_size=4k TEST_DIR/t.qcow2
|
||||
Supported options:
|
||||
|
@ -472,6 +493,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: amend -f qcow2 -o cluster_size=4k -o help TEST_DIR/t.qcow2
|
||||
Supported options:
|
||||
|
@ -483,6 +505,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: amend -f qcow2 -o cluster_size=4k -o ? TEST_DIR/t.qcow2
|
||||
Supported options:
|
||||
|
@ -494,6 +517,7 @@ encryption Encrypt the image
|
|||
cluster_size qcow2 cluster size
|
||||
preallocation Preallocation mode (allowed values: off, metadata)
|
||||
lazy_refcounts Postpone refcount updates
|
||||
nocow Turn off copy-on-write (valid only on btrfs)
|
||||
|
||||
Testing: amend -f qcow2 -o backing_file=TEST_DIR/t.qcow2,,help TEST_DIR/t.qcow2
|
||||
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
#
|
||||
# test-group association ... one line per test
|
||||
#
|
||||
001 rw auto
|
||||
001 rw auto quick
|
||||
002 rw auto quick
|
||||
003 rw auto
|
||||
004 rw auto quick
|
||||
005 img auto
|
||||
005 img auto quick
|
||||
006 img auto
|
||||
007 snapshot auto
|
||||
008 rw auto
|
||||
009 rw auto
|
||||
010 rw auto
|
||||
008 rw auto quick
|
||||
009 rw auto quick
|
||||
010 rw auto quick
|
||||
011 rw auto quick
|
||||
012 auto quick
|
||||
013 rw auto
|
||||
|
@ -24,36 +24,36 @@
|
|||
015 rw snapshot auto
|
||||
016 rw auto quick
|
||||
017 rw backing auto quick
|
||||
018 rw backing auto
|
||||
018 rw backing auto quick
|
||||
019 rw backing auto quick
|
||||
020 rw backing auto quick
|
||||
021 io auto
|
||||
021 io auto quick
|
||||
022 rw snapshot auto
|
||||
023 rw auto
|
||||
024 rw backing auto quick
|
||||
025 rw auto quick
|
||||
026 rw blkdbg auto
|
||||
027 rw auto quick
|
||||
028 rw backing auto
|
||||
028 rw backing auto quick
|
||||
029 rw auto quick
|
||||
030 rw auto backing
|
||||
031 rw auto quick
|
||||
032 rw auto
|
||||
032 rw auto quick
|
||||
033 rw auto quick
|
||||
034 rw auto backing
|
||||
034 rw auto backing quick
|
||||
035 rw auto quick
|
||||
036 rw auto quick
|
||||
037 rw auto backing
|
||||
038 rw auto backing
|
||||
039 rw auto
|
||||
037 rw auto backing quick
|
||||
038 rw auto backing quick
|
||||
039 rw auto quick
|
||||
040 rw auto
|
||||
041 rw auto backing
|
||||
042 rw auto quick
|
||||
043 rw auto backing
|
||||
044 rw auto
|
||||
045 rw auto
|
||||
046 rw auto aio
|
||||
047 rw auto
|
||||
045 rw auto quick
|
||||
046 rw auto aio quick
|
||||
047 rw auto quick
|
||||
048 img auto quick
|
||||
049 rw auto
|
||||
050 rw auto backing quick
|
||||
|
@ -71,32 +71,32 @@
|
|||
062 rw auto quick
|
||||
063 rw auto quick
|
||||
064 rw auto quick
|
||||
065 rw auto
|
||||
065 rw auto quick
|
||||
066 rw auto quick
|
||||
067 rw auto
|
||||
068 rw auto
|
||||
067 rw auto quick
|
||||
068 rw auto quick
|
||||
069 rw auto quick
|
||||
070 rw auto quick
|
||||
071 rw auto
|
||||
071 rw auto quick
|
||||
072 rw auto quick
|
||||
073 rw auto quick
|
||||
074 rw auto quick
|
||||
075 rw auto
|
||||
075 rw auto quick
|
||||
076 auto
|
||||
077 rw auto quick
|
||||
078 rw auto
|
||||
078 rw auto quick
|
||||
079 rw auto
|
||||
080 rw auto
|
||||
081 rw auto
|
||||
081 rw auto quick
|
||||
082 rw auto quick
|
||||
083 rw auto
|
||||
084 img auto
|
||||
084 img auto quick
|
||||
085 rw auto
|
||||
086 rw auto quick
|
||||
087 rw auto
|
||||
088 rw auto
|
||||
087 rw auto quick
|
||||
088 rw auto quick
|
||||
089 rw auto quick
|
||||
090 rw auto quick
|
||||
091 rw auto
|
||||
091 rw auto quick
|
||||
092 rw auto quick
|
||||
095 rw auto
|
||||
095 rw auto quick
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue