[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 02/22] iotests/qcow2.py: Add dump-header-exts
From: |
Max Reitz |
Subject: |
[PATCH v3 02/22] iotests/qcow2.py: Add dump-header-exts |
Date: |
Thu, 7 Nov 2019 17:36:48 +0100 |
This is useful for tests that want to whitelist fields from dump-header
(with grep) but still print all header extensions.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Maxim Levitsky <address@hidden>
---
tests/qemu-iotests/qcow2.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/qemu-iotests/qcow2.py b/tests/qemu-iotests/qcow2.py
index b392972d1b..d813b4fc81 100755
--- a/tests/qemu-iotests/qcow2.py
+++ b/tests/qemu-iotests/qcow2.py
@@ -154,6 +154,10 @@ def cmd_dump_header(fd):
h.dump()
h.dump_extensions()
+def cmd_dump_header_exts(fd):
+ h = QcowHeader(fd)
+ h.dump_extensions()
+
def cmd_set_header(fd, name, value):
try:
value = int(value, 0)
@@ -230,6 +234,7 @@ def cmd_set_feature_bit(fd, group, bit):
cmds = [
[ 'dump-header', cmd_dump_header, 0, 'Dump image header
and header extensions' ],
+ [ 'dump-header-exts', cmd_dump_header_exts, 0, 'Dump image 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' ],
--
2.23.0
- [PATCH v3 00/22] iotests: Allow ./check -o data_file, Max Reitz, 2019/11/07
- [PATCH v3 01/22] iotests: s/qocw2/qcow2/, Max Reitz, 2019/11/07
- [PATCH v3 02/22] iotests/qcow2.py: Add dump-header-exts,
Max Reitz <=
- [PATCH v3 03/22] iotests/qcow2.py: Split feature fields into bits, Max Reitz, 2019/11/07
- [PATCH v3 04/22] iotests: Add _filter_json_filename, Max Reitz, 2019/11/07
- [PATCH v3 05/22] iotests: Filter refcount_order in 036, Max Reitz, 2019/11/07
- [PATCH v3 06/22] iotests: Replace IMGOPTS by _unsupported_imgopts, Max Reitz, 2019/11/07
- [PATCH v3 07/22] iotests: Drop compat=1.1 in 050, Max Reitz, 2019/11/07
- [PATCH v3 08/22] iotests: Let _make_test_img parse its parameters, Max Reitz, 2019/11/07
- [PATCH v3 09/22] iotests: Add -o and --no-opts to _make_test_img, Max Reitz, 2019/11/07
- [PATCH v3 10/22] iotests: Inject space into -ocompat=0.10 in 051, Max Reitz, 2019/11/07
- [PATCH v3 12/22] iotests: Replace IMGOPTS='' by --no-opts, Max Reitz, 2019/11/07
- [PATCH v3 14/22] iotests: Avoid qemu-img create, Max Reitz, 2019/11/07