14089f7c6SJeff CodyQA output created by 085 2d88bef19SMax ReitzFormatting 'TEST_DIR/t.IMGFMT.1', fmt=IMGFMT size=134217728 3d88bef19SMax ReitzFormatting 'TEST_DIR/t.IMGFMT.2', fmt=IMGFMT size=134217728 44089f7c6SJeff Cody 54089f7c6SJeff Cody=== Running QEMU === 64089f7c6SJeff Cody 74089f7c6SJeff Cody 84089f7c6SJeff Cody=== Sending capabilities === 94089f7c6SJeff Cody 10a98b1a1fSEric Blake{ 'execute': 'qmp_capabilities' } 114089f7c6SJeff Cody{"return": {}} 124089f7c6SJeff Cody 134089f7c6SJeff Cody=== Create a single snapshot on virtio0 === 144089f7c6SJeff Cody 15a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'virtio0', 'snapshot-file':'TEST_DIR/1-snapshot-v0.IMGFMT', 'format': 'IMGFMT' } } 160b6786a9SMaxim LevitskyFormatting 'TEST_DIR/1-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/t.qcow2.1 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 174089f7c6SJeff Cody{"return": {}} 184089f7c6SJeff Cody 194089f7c6SJeff Cody=== Invalid command - missing device and nodename === 204089f7c6SJeff Cody 21a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'snapshot-file':'TEST_DIR/1-snapshot-v0.IMGFMT', 'format': 'IMGFMT' } } 224089f7c6SJeff Cody{"error": {"class": "GenericError", "desc": "Cannot find device= nor node_name="}} 234089f7c6SJeff Cody 244089f7c6SJeff Cody=== Invalid command - missing snapshot-file === 254089f7c6SJeff Cody 26a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'virtio0', 'format': 'IMGFMT' } } 274089f7c6SJeff Cody{"error": {"class": "GenericError", "desc": "Parameter 'snapshot-file' is missing"}} 284089f7c6SJeff Cody 294089f7c6SJeff Cody 304089f7c6SJeff Cody=== Create several transactional group snapshots === 314089f7c6SJeff Cody 32a98b1a1fSEric Blake{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/2-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/2-snapshot-v1.IMGFMT' } } ] } } 330b6786a9SMaxim LevitskyFormatting 'TEST_DIR/2-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/1-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 340b6786a9SMaxim LevitskyFormatting 'TEST_DIR/2-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/t.qcow2.2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 354089f7c6SJeff Cody{"return": {}} 36a98b1a1fSEric Blake{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/3-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/3-snapshot-v1.IMGFMT' } } ] } } 370b6786a9SMaxim LevitskyFormatting 'TEST_DIR/3-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/2-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 380b6786a9SMaxim LevitskyFormatting 'TEST_DIR/3-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/2-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 394089f7c6SJeff Cody{"return": {}} 40a98b1a1fSEric Blake{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/4-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/4-snapshot-v1.IMGFMT' } } ] } } 410b6786a9SMaxim LevitskyFormatting 'TEST_DIR/4-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/3-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 420b6786a9SMaxim LevitskyFormatting 'TEST_DIR/4-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/3-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 434089f7c6SJeff Cody{"return": {}} 44a98b1a1fSEric Blake{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/5-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/5-snapshot-v1.IMGFMT' } } ] } } 450b6786a9SMaxim LevitskyFormatting 'TEST_DIR/5-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/4-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 460b6786a9SMaxim LevitskyFormatting 'TEST_DIR/5-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/4-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 474089f7c6SJeff Cody{"return": {}} 48a98b1a1fSEric Blake{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/6-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/6-snapshot-v1.IMGFMT' } } ] } } 490b6786a9SMaxim LevitskyFormatting 'TEST_DIR/6-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/5-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 500b6786a9SMaxim LevitskyFormatting 'TEST_DIR/6-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/5-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 514089f7c6SJeff Cody{"return": {}} 52a98b1a1fSEric Blake{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/7-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/7-snapshot-v1.IMGFMT' } } ] } } 530b6786a9SMaxim LevitskyFormatting 'TEST_DIR/7-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/6-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 540b6786a9SMaxim LevitskyFormatting 'TEST_DIR/7-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/6-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 554089f7c6SJeff Cody{"return": {}} 56a98b1a1fSEric Blake{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/8-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/8-snapshot-v1.IMGFMT' } } ] } } 570b6786a9SMaxim LevitskyFormatting 'TEST_DIR/8-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/7-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 580b6786a9SMaxim LevitskyFormatting 'TEST_DIR/8-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/7-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 594089f7c6SJeff Cody{"return": {}} 60a98b1a1fSEric Blake{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/9-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/9-snapshot-v1.IMGFMT' } } ] } } 610b6786a9SMaxim LevitskyFormatting 'TEST_DIR/9-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/8-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 620b6786a9SMaxim LevitskyFormatting 'TEST_DIR/9-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/8-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 634089f7c6SJeff Cody{"return": {}} 64a98b1a1fSEric Blake{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/10-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/10-snapshot-v1.IMGFMT' } } ] } } 650b6786a9SMaxim LevitskyFormatting 'TEST_DIR/10-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/9-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 660b6786a9SMaxim LevitskyFormatting 'TEST_DIR/10-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=134217728 backing_file=TEST_DIR/9-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 674089f7c6SJeff Cody{"return": {}} 6889e3a2d8SAlberto Garcia 6989e3a2d8SAlberto Garcia=== Create a couple of snapshots using blockdev-snapshot === 7089e3a2d8SAlberto Garcia 71*b66ff2c2SEric BlakeFormatting 'TEST_DIR/11-snapshot-v0.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/10-snapshot-v0.IMGFMT backing_fmt=IMGFMT 72a98b1a1fSEric Blake{ 'execute': 'blockdev-add', 'arguments': { 'driver': 'IMGFMT', 'node-name': 'snap_11', 'backing': null, 'file': { 'driver': 'file', 'filename': 'TEST_DIR/11-snapshot-v0.IMGFMT', 'node-name': 'file_11' } } } 7389e3a2d8SAlberto Garcia{"return": {}} 74a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay':'snap_11' } } 7589e3a2d8SAlberto Garcia{"return": {}} 76*b66ff2c2SEric BlakeFormatting 'TEST_DIR/12-snapshot-v0.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/11-snapshot-v0.IMGFMT backing_fmt=IMGFMT 77a98b1a1fSEric Blake{ 'execute': 'blockdev-add', 'arguments': { 'driver': 'IMGFMT', 'node-name': 'snap_12', 'backing': null, 'file': { 'driver': 'file', 'filename': 'TEST_DIR/12-snapshot-v0.IMGFMT', 'node-name': 'file_12' } } } 7889e3a2d8SAlberto Garcia{"return": {}} 79a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay':'snap_12' } } 8089e3a2d8SAlberto Garcia{"return": {}} 8189e3a2d8SAlberto Garcia 823fa123d0SAlberto Garcia=== Invalid command - cannot create a snapshot using a file BDS === 833fa123d0SAlberto Garcia 84a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot', 'arguments': { 'node':'virtio0', 'overlay':'file_12' } } 85d29d3d1fSKevin Wolf{"error": {"class": "GenericError", "desc": "The overlay is already in use"}} 863fa123d0SAlberto Garcia 8789e3a2d8SAlberto Garcia=== Invalid command - snapshot node used as active layer === 8889e3a2d8SAlberto Garcia 89a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay':'snap_12' } } 90a2bb6f8cSMax Reitz{"error": {"class": "GenericError", "desc": "The overlay is already in use"}} 91a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot', 'arguments': { 'node':'virtio0', 'overlay':'virtio0' } } 92a2bb6f8cSMax Reitz{"error": {"class": "GenericError", "desc": "The overlay is already in use"}} 93a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot', 'arguments': { 'node':'virtio0', 'overlay':'virtio1' } } 94a2bb6f8cSMax Reitz{"error": {"class": "GenericError", "desc": "The overlay is already in use"}} 9589e3a2d8SAlberto Garcia 9689e3a2d8SAlberto Garcia=== Invalid command - snapshot node used as backing hd === 9789e3a2d8SAlberto Garcia 98a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay':'snap_11' } } 99d29d3d1fSKevin Wolf{"error": {"class": "GenericError", "desc": "The overlay is already in use"}} 10089e3a2d8SAlberto Garcia 10189e3a2d8SAlberto Garcia=== Invalid command - snapshot node has a backing image === 10289e3a2d8SAlberto Garcia 103ecffa634SFam ZhengFormatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728 104*b66ff2c2SEric BlakeFormatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT 105a98b1a1fSEric Blake{ 'execute': 'blockdev-add', 'arguments': { 'driver': 'IMGFMT', 'node-name': 'snap_13', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT', 'node-name': 'file_13' } } } 10689e3a2d8SAlberto Garcia{"return": {}} 107a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay':'snap_13' } } 108a2bb6f8cSMax Reitz{"error": {"class": "GenericError", "desc": "The overlay already has a backing image"}} 10989e3a2d8SAlberto Garcia 11089e3a2d8SAlberto Garcia=== Invalid command - The node does not exist === 11189e3a2d8SAlberto Garcia 112a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay':'snap_14' } } 11389e3a2d8SAlberto Garcia{"error": {"class": "GenericError", "desc": "Cannot find device=snap_14 nor node_name=snap_14"}} 114a98b1a1fSEric Blake{ 'execute': 'blockdev-snapshot', 'arguments': { 'node':'nodevice', 'overlay':'snap_13' } } 11589e3a2d8SAlberto Garcia{"error": {"class": "GenericError", "desc": "Cannot find device=nodevice nor node_name=nodevice"}} 1164089f7c6SJeff Cody*** done 117