diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-07-18 13:47:22 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-07-18 13:47:22 +0100 |
commit | e0097ea371a647651f6c89c3091c4962fdde26fd (patch) | |
tree | f5d9229f30a7f07ff36ac482fabab094a176e342 /tests/qemu-iotests/qcow2.py | |
parent | 4d121a549869b93475ccf8b9a0d3e693011d1abb (diff) | |
parent | 8283c5c316333fb9d2540167f3e22bd91404ecee (diff) |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Block pull request
# gpg: Signature made Fri 18 Jul 2014 13:39:43 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:
qemu-iotests: fix 028 failure due to disk image path
raw-posix: Fail gracefully if no working alignment is found
block: Add Error argument to bdrv_refresh_limits()
qcow2: Fix error path for unknown incompatible features
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qemu-iotests/qcow2.py')
-rwxr-xr-x | tests/qemu-iotests/qcow2.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/qemu-iotests/qcow2.py b/tests/qemu-iotests/qcow2.py index 44a2b45641..2058596964 100755 --- a/tests/qemu-iotests/qcow2.py +++ b/tests/qemu-iotests/qcow2.py @@ -176,6 +176,10 @@ def cmd_add_header_ext(fd, magic, data): h.extensions.append(QcowHeaderExtension.create(magic, data)) h.update(fd) +def cmd_add_header_ext_stdio(fd, magic): + data = sys.stdin.read() + cmd_add_header_ext(fd, magic, data) + def cmd_del_header_ext(fd, magic): try: magic = int(magic, 0) @@ -220,11 +224,12 @@ def cmd_set_feature_bit(fd, group, bit): h.update(fd) cmds = [ - [ 'dump-header', cmd_dump_header, 0, 'Dump image header and header extensions' ], - [ 'set-header', cmd_set_header, 2, 'Set a field in the header'], - [ 'add-header-ext', cmd_add_header_ext, 2, 'Add a header extension' ], - [ 'del-header-ext', cmd_del_header_ext, 1, 'Delete a header extension' ], - [ 'set-feature-bit', cmd_set_feature_bit, 2, 'Set a feature bit'], + [ 'dump-header', cmd_dump_header, 0, 'Dump image header and header extensions' ], + [ 'set-header', cmd_set_header, 2, 'Set a field in the header'], + [ 'add-header-ext', cmd_add_header_ext, 2, 'Add a header extension' ], + [ 'add-header-ext-stdio', cmd_add_header_ext_stdio, 1, 'Add a header extension, data from stdin' ], + [ 'del-header-ext', cmd_del_header_ext, 1, 'Delete a header extension' ], + [ 'set-feature-bit', cmd_set_feature_bit, 2, 'Set a feature bit'], ] def main(filename, cmd, args): |