{
  "schemaVersion": 1,
  "generatedAt": "2026-10-18T20:08:09.979218+00:00",
  "kind": "measured-tool-behavior-with-synthetic-inputs",
  "license": "CC0-1.0",
  "environment": {
    "python": "3.12.3",
    "kernel": "6.8.0-146-generic",
    "qemuImg": {
      "version": "qemu-img version 8.2.2 (Debian 1:8.2.2+ds-0ubuntu1.18)",
      "binarySha256": "634320b91165669917123e8e79cce1c4d00cee0a4aa4d662d7c0a8186479b3fb"
    },
    "qemuIo": {
      "version": "qemu-io version 8.2.2 (Debian 1:8.2.2+ds-0ubuntu1.18)",
      "binarySha256": "71b3d50189aae57b2d01a5f16c46c1c48d006bf27403b7033478b9a6f013d414"
    }
  },
  "clusterBytes": 65536,
  "virtualSizeBytes": 262144,
  "repetitions": 3,
  "harnessSha256": "2fc59fa3eda33d66fe0bfcd20b287ac4f180f8f49ec04a6f85e0659802d932e6",
  "observations": [
    {
      "case": "intact",
      "repetition": 1,
      "checkExit": 0,
      "compareExit": 0,
      "exportExit": 0,
      "topHashUnchanged": true,
      "guestMatchesBaseline": true,
      "guestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "expectedGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 0,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.974 MiB/sec and 79.5838 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (63.687 MiB/sec and 1018.9951 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 0,
          "stdout": "Images are identical.\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "base-replaced",
      "repetition": 1,
      "checkExit": 0,
      "compareExit": 1,
      "exportExit": 0,
      "topHashUnchanged": true,
      "guestMatchesBaseline": false,
      "guestSha256": "9c01606913b0db194f8a2cc9ff233fc179bda7d309766dce804c2469feb8156b",
      "expectedGuestSha256": "9c01606913b0db194f8a2cc9ff233fc179bda7d309766dce804c2469feb8156b",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 131072,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "cf5e6682885e71ce6e5ab7e2470a00f78bf54544496d16a72a37e85423a95af6",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (5.011 MiB/sec and 80.1742 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (68.174 MiB/sec and 1090.7766 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 1,
          "stdout": "Content mismatch at offset 131072!\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "base-missing",
      "repetition": 1,
      "checkExit": 1,
      "compareExit": 2,
      "exportExit": 1,
      "topHashUnchanged": true,
      "guestMatchesBaseline": null,
      "guestSha256": null,
      "expectedGuestSha256": null,
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": null,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": null,
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": null,
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.604 MiB/sec and 73.6580 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (65.238 MiB/sec and 1043.8108 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 1,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'overlay.qcow2': Could not open backing file: Could not open 'base.raw': No such file or directory\n"
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 2,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'overlay.qcow2': Could not open backing file: Could not open 'base.raw': No such file or directory\n"
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 1,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'overlay.qcow2': Could not open backing file: Could not open 'base.raw': No such file or directory\n"
        }
      ]
    },
    {
      "case": "overlay-only-relocated",
      "repetition": 1,
      "checkExit": 1,
      "compareExit": 2,
      "exportExit": 1,
      "topHashUnchanged": true,
      "guestMatchesBaseline": null,
      "guestSha256": null,
      "expectedGuestSha256": null,
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": null,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": null,
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": null,
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.770 MiB/sec and 76.3256 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (68.463 MiB/sec and 1095.4138 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "restore/overlay.qcow2"
          ],
          "exitCode": 1,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'restore/overlay.qcow2': Could not open backing file: Could not open 'restore/base.raw': No such file or directory\n"
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "restore/overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 2,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'restore/overlay.qcow2': Could not open backing file: Could not open 'restore/base.raw': No such file or directory\n"
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "restore/overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 1,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'restore/overlay.qcow2': Could not open backing file: Could not open 'restore/base.raw': No such file or directory\n"
        }
      ]
    },
    {
      "case": "chain-relocated",
      "repetition": 1,
      "checkExit": 0,
      "compareExit": 0,
      "exportExit": 0,
      "topHashUnchanged": true,
      "guestMatchesBaseline": true,
      "guestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "expectedGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 0,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "restore/overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.08 sec (792.723 KiB/sec and 12.3863 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (63.474 MiB/sec and 1015.5903 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "restore/overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"restore/overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "restore/overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 0,
          "stdout": "Images are identical.\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "restore/overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "payload-byte-flip",
      "repetition": 1,
      "checkExit": 0,
      "compareExit": 1,
      "exportExit": 0,
      "topHashUnchanged": false,
      "guestMatchesBaseline": false,
      "guestSha256": "c74bd8870cc99deb355dd55c2cce74aa834ae650cd9376ab1ea5e738c4a0defb",
      "expectedGuestSha256": "c74bd8870cc99deb355dd55c2cce74aa834ae650cd9376ab1ea5e738c4a0defb",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 1,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "1c47440f265b2267d876a844a2de727af2437120eba0a7681d48126ad619289c",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (5.569 MiB/sec and 89.1053 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (71.262 MiB/sec and 1140.1924 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 1,
          "stdout": "Content mismatch at offset 0!\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "safe-rebase",
      "repetition": 1,
      "checkExit": 0,
      "compareExit": 0,
      "exportExit": 0,
      "topHashUnchanged": false,
      "guestMatchesBaseline": true,
      "guestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "expectedGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 0,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "f6ed38e4a0d5f01152a6ce4c4b326655e837a5337ad490b38226bba2812b2264",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "cf5e6682885e71ce6e5ab7e2470a00f78bf54544496d16a72a37e85423a95af6",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 524288,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 3,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (5.698 MiB/sec and 91.1605 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (64.879 MiB/sec and 1038.0583 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "rebase",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "-b",
            "newbase.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 524288,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 3,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 0,
          "stdout": "Images are identical.\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "unsafe-rebase",
      "repetition": 1,
      "checkExit": 0,
      "compareExit": 1,
      "exportExit": 0,
      "topHashUnchanged": false,
      "guestMatchesBaseline": false,
      "guestSha256": "9c01606913b0db194f8a2cc9ff233fc179bda7d309766dce804c2469feb8156b",
      "expectedGuestSha256": "9c01606913b0db194f8a2cc9ff233fc179bda7d309766dce804c2469feb8156b",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 131072,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "c9b5d2f8c3bf902960126dbebe039fafe2e722326ed886f5683bed7ca6fba8be",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "cf5e6682885e71ce6e5ab7e2470a00f78bf54544496d16a72a37e85423a95af6",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (5.415 MiB/sec and 86.6372 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (66.847 MiB/sec and 1069.5553 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "rebase",
            "-u",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "-b",
            "newbase.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 1,
          "stdout": "Content mismatch at offset 131072!\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "base-truncated",
      "repetition": 1,
      "checkExit": 0,
      "compareExit": 1,
      "exportExit": 0,
      "topHashUnchanged": true,
      "guestMatchesBaseline": false,
      "guestSha256": "b8215b0d293758fcc7bcf0955dc7972acc4c0853da3035c64f0b59b00802891b",
      "expectedGuestSha256": "b8215b0d293758fcc7bcf0955dc7972acc4c0853da3035c64f0b59b00802891b",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 131072,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "51caac4c4a2a04ba6ec6d56b20b017456aa31bf8232f06ec3d78297c920ea831",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (5.258 MiB/sec and 84.1342 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (64.734 MiB/sec and 1035.7457 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 1,
          "stdout": "Content mismatch at offset 131072!\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "zero-tail-size",
      "repetition": 1,
      "compareExit": 0,
      "strictCompareExit": 1,
      "smallSizeBytes": 65536,
      "largeSizeBytes": 131072,
      "smallSha256": "2dc4424addd6f849f68402090e7d0d19018adf629de600210d807575932f2e2d",
      "largeSha256": "bb208d7fab0b6b15d96ed9f45bf98381c56bf8d55de763a19a714adffcd96f37",
      "commands": [
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "raw",
            "-F",
            "raw",
            "small.raw",
            "large.raw"
          ],
          "exitCode": 0,
          "stdout": "Warning: Image size mismatch!\nImages are identical.\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-s",
            "-f",
            "raw",
            "-F",
            "raw",
            "small.raw",
            "large.raw"
          ],
          "exitCode": 1,
          "stdout": "Strict mode: Image size mismatch!\n",
          "stderr": ""
        }
      ]
    },
    {
      "case": "intact",
      "repetition": 2,
      "checkExit": 0,
      "compareExit": 0,
      "exportExit": 0,
      "topHashUnchanged": true,
      "guestMatchesBaseline": true,
      "guestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "expectedGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 0,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (5.302 MiB/sec and 84.8393 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (57.220 MiB/sec and 915.5137 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 0,
          "stdout": "Images are identical.\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "base-replaced",
      "repetition": 2,
      "checkExit": 0,
      "compareExit": 1,
      "exportExit": 0,
      "topHashUnchanged": true,
      "guestMatchesBaseline": false,
      "guestSha256": "9c01606913b0db194f8a2cc9ff233fc179bda7d309766dce804c2469feb8156b",
      "expectedGuestSha256": "9c01606913b0db194f8a2cc9ff233fc179bda7d309766dce804c2469feb8156b",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 131072,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "cf5e6682885e71ce6e5ab7e2470a00f78bf54544496d16a72a37e85423a95af6",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.879 MiB/sec and 78.0572 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (62.723 MiB/sec and 1003.5737 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 1,
          "stdout": "Content mismatch at offset 131072!\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "base-missing",
      "repetition": 2,
      "checkExit": 1,
      "compareExit": 2,
      "exportExit": 1,
      "topHashUnchanged": true,
      "guestMatchesBaseline": null,
      "guestSha256": null,
      "expectedGuestSha256": null,
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": null,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": null,
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": null,
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.821 MiB/sec and 77.1427 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (67.783 MiB/sec and 1084.5317 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 1,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'overlay.qcow2': Could not open backing file: Could not open 'base.raw': No such file or directory\n"
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 2,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'overlay.qcow2': Could not open backing file: Could not open 'base.raw': No such file or directory\n"
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 1,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'overlay.qcow2': Could not open backing file: Could not open 'base.raw': No such file or directory\n"
        }
      ]
    },
    {
      "case": "overlay-only-relocated",
      "repetition": 2,
      "checkExit": 1,
      "compareExit": 2,
      "exportExit": 1,
      "topHashUnchanged": true,
      "guestMatchesBaseline": null,
      "guestSha256": null,
      "expectedGuestSha256": null,
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": null,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": null,
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": null,
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.474 MiB/sec and 71.5823 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (64.914 MiB/sec and 1038.6168 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "restore/overlay.qcow2"
          ],
          "exitCode": 1,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'restore/overlay.qcow2': Could not open backing file: Could not open 'restore/base.raw': No such file or directory\n"
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "restore/overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 2,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'restore/overlay.qcow2': Could not open backing file: Could not open 'restore/base.raw': No such file or directory\n"
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "restore/overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 1,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'restore/overlay.qcow2': Could not open backing file: Could not open 'restore/base.raw': No such file or directory\n"
        }
      ]
    },
    {
      "case": "chain-relocated",
      "repetition": 2,
      "checkExit": 0,
      "compareExit": 0,
      "exportExit": 0,
      "topHashUnchanged": true,
      "guestMatchesBaseline": true,
      "guestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "expectedGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 0,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "restore/overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.837 MiB/sec and 77.3906 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (64.326 MiB/sec and 1029.2227 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "restore/overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"restore/overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "restore/overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 0,
          "stdout": "Images are identical.\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "restore/overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "payload-byte-flip",
      "repetition": 2,
      "checkExit": 0,
      "compareExit": 1,
      "exportExit": 0,
      "topHashUnchanged": false,
      "guestMatchesBaseline": false,
      "guestSha256": "c74bd8870cc99deb355dd55c2cce74aa834ae650cd9376ab1ea5e738c4a0defb",
      "expectedGuestSha256": "c74bd8870cc99deb355dd55c2cce74aa834ae650cd9376ab1ea5e738c4a0defb",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 1,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "1c47440f265b2267d876a844a2de727af2437120eba0a7681d48126ad619289c",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.800 MiB/sec and 76.7935 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (45.507 MiB/sec and 728.1094 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 1,
          "stdout": "Content mismatch at offset 0!\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "safe-rebase",
      "repetition": 2,
      "checkExit": 0,
      "compareExit": 0,
      "exportExit": 0,
      "topHashUnchanged": false,
      "guestMatchesBaseline": true,
      "guestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "expectedGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 0,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "f6ed38e4a0d5f01152a6ce4c4b326655e837a5337ad490b38226bba2812b2264",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "cf5e6682885e71ce6e5ab7e2470a00f78bf54544496d16a72a37e85423a95af6",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 524288,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 3,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.797 MiB/sec and 76.7566 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (67.822 MiB/sec and 1085.1554 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "rebase",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "-b",
            "newbase.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 524288,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 3,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 0,
          "stdout": "Images are identical.\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "unsafe-rebase",
      "repetition": 2,
      "checkExit": 0,
      "compareExit": 1,
      "exportExit": 0,
      "topHashUnchanged": false,
      "guestMatchesBaseline": false,
      "guestSha256": "9c01606913b0db194f8a2cc9ff233fc179bda7d309766dce804c2469feb8156b",
      "expectedGuestSha256": "9c01606913b0db194f8a2cc9ff233fc179bda7d309766dce804c2469feb8156b",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 131072,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "c9b5d2f8c3bf902960126dbebe039fafe2e722326ed886f5683bed7ca6fba8be",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "cf5e6682885e71ce6e5ab7e2470a00f78bf54544496d16a72a37e85423a95af6",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.974 MiB/sec and 79.5848 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (51.309 MiB/sec and 820.9399 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "rebase",
            "-u",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "-b",
            "newbase.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 1,
          "stdout": "Content mismatch at offset 131072!\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "base-truncated",
      "repetition": 2,
      "checkExit": 0,
      "compareExit": 1,
      "exportExit": 0,
      "topHashUnchanged": true,
      "guestMatchesBaseline": false,
      "guestSha256": "b8215b0d293758fcc7bcf0955dc7972acc4c0853da3035c64f0b59b00802891b",
      "expectedGuestSha256": "b8215b0d293758fcc7bcf0955dc7972acc4c0853da3035c64f0b59b00802891b",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 131072,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "51caac4c4a2a04ba6ec6d56b20b017456aa31bf8232f06ec3d78297c920ea831",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (5.302 MiB/sec and 84.8313 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (67.501 MiB/sec and 1080.0116 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 1,
          "stdout": "Content mismatch at offset 131072!\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "zero-tail-size",
      "repetition": 2,
      "compareExit": 0,
      "strictCompareExit": 1,
      "smallSizeBytes": 65536,
      "largeSizeBytes": 131072,
      "smallSha256": "2dc4424addd6f849f68402090e7d0d19018adf629de600210d807575932f2e2d",
      "largeSha256": "bb208d7fab0b6b15d96ed9f45bf98381c56bf8d55de763a19a714adffcd96f37",
      "commands": [
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "raw",
            "-F",
            "raw",
            "small.raw",
            "large.raw"
          ],
          "exitCode": 0,
          "stdout": "Warning: Image size mismatch!\nImages are identical.\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-s",
            "-f",
            "raw",
            "-F",
            "raw",
            "small.raw",
            "large.raw"
          ],
          "exitCode": 1,
          "stdout": "Strict mode: Image size mismatch!\n",
          "stderr": ""
        }
      ]
    },
    {
      "case": "intact",
      "repetition": 3,
      "checkExit": 0,
      "compareExit": 0,
      "exportExit": 0,
      "topHashUnchanged": true,
      "guestMatchesBaseline": true,
      "guestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "expectedGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 0,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (5.484 MiB/sec and 87.7436 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (68.292 MiB/sec and 1092.6729 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 0,
          "stdout": "Images are identical.\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "base-replaced",
      "repetition": 3,
      "checkExit": 0,
      "compareExit": 1,
      "exportExit": 0,
      "topHashUnchanged": true,
      "guestMatchesBaseline": false,
      "guestSha256": "9c01606913b0db194f8a2cc9ff233fc179bda7d309766dce804c2469feb8156b",
      "expectedGuestSha256": "9c01606913b0db194f8a2cc9ff233fc179bda7d309766dce804c2469feb8156b",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 131072,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "cf5e6682885e71ce6e5ab7e2470a00f78bf54544496d16a72a37e85423a95af6",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.08 sec (780.122 KiB/sec and 12.1894 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (61.643 MiB/sec and 986.2906 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 1,
          "stdout": "Content mismatch at offset 131072!\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "base-missing",
      "repetition": 3,
      "checkExit": 1,
      "compareExit": 2,
      "exportExit": 1,
      "topHashUnchanged": true,
      "guestMatchesBaseline": null,
      "guestSha256": null,
      "expectedGuestSha256": null,
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": null,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": null,
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": null,
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.903 MiB/sec and 78.4510 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (50.506 MiB/sec and 808.1030 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 1,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'overlay.qcow2': Could not open backing file: Could not open 'base.raw': No such file or directory\n"
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 2,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'overlay.qcow2': Could not open backing file: Could not open 'base.raw': No such file or directory\n"
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 1,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'overlay.qcow2': Could not open backing file: Could not open 'base.raw': No such file or directory\n"
        }
      ]
    },
    {
      "case": "overlay-only-relocated",
      "repetition": 3,
      "checkExit": 1,
      "compareExit": 2,
      "exportExit": 1,
      "topHashUnchanged": true,
      "guestMatchesBaseline": null,
      "guestSha256": null,
      "expectedGuestSha256": null,
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": null,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": null,
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": null,
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (5.013 MiB/sec and 80.2109 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (64.283 MiB/sec and 1028.5219 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "restore/overlay.qcow2"
          ],
          "exitCode": 1,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'restore/overlay.qcow2': Could not open backing file: Could not open 'restore/base.raw': No such file or directory\n"
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "restore/overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 2,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'restore/overlay.qcow2': Could not open backing file: Could not open 'restore/base.raw': No such file or directory\n"
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "restore/overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 1,
          "stdout": "",
          "stderr": "qemu-img: Could not open 'restore/overlay.qcow2': Could not open backing file: Could not open 'restore/base.raw': No such file or directory\n"
        }
      ]
    },
    {
      "case": "chain-relocated",
      "repetition": 3,
      "checkExit": 0,
      "compareExit": 0,
      "exportExit": 0,
      "topHashUnchanged": true,
      "guestMatchesBaseline": true,
      "guestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "expectedGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 0,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "restore/overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.959 MiB/sec and 79.3418 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (63.269 MiB/sec and 1012.3107 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "restore/overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"restore/overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "restore/overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 0,
          "stdout": "Images are identical.\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "restore/overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "payload-byte-flip",
      "repetition": 3,
      "checkExit": 0,
      "compareExit": 1,
      "exportExit": 0,
      "topHashUnchanged": false,
      "guestMatchesBaseline": false,
      "guestSha256": "c74bd8870cc99deb355dd55c2cce74aa834ae650cd9376ab1ea5e738c4a0defb",
      "expectedGuestSha256": "c74bd8870cc99deb355dd55c2cce74aa834ae650cd9376ab1ea5e738c4a0defb",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 1,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "1c47440f265b2267d876a844a2de727af2437120eba0a7681d48126ad619289c",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (5.033 MiB/sec and 80.5275 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (66.094 MiB/sec and 1057.4983 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 1,
          "stdout": "Content mismatch at offset 0!\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "safe-rebase",
      "repetition": 3,
      "checkExit": 0,
      "compareExit": 0,
      "exportExit": 0,
      "topHashUnchanged": false,
      "guestMatchesBaseline": true,
      "guestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "expectedGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 0,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "f6ed38e4a0d5f01152a6ce4c4b326655e837a5337ad490b38226bba2812b2264",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "cf5e6682885e71ce6e5ab7e2470a00f78bf54544496d16a72a37e85423a95af6",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 524288,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 3,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.679 MiB/sec and 74.8677 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (66.550 MiB/sec and 1064.7960 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "rebase",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "-b",
            "newbase.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 524288,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 3,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 0,
          "stdout": "Images are identical.\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "unsafe-rebase",
      "repetition": 3,
      "checkExit": 0,
      "compareExit": 1,
      "exportExit": 0,
      "topHashUnchanged": false,
      "guestMatchesBaseline": false,
      "guestSha256": "9c01606913b0db194f8a2cc9ff233fc179bda7d309766dce804c2469feb8156b",
      "expectedGuestSha256": "9c01606913b0db194f8a2cc9ff233fc179bda7d309766dce804c2469feb8156b",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 131072,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "c9b5d2f8c3bf902960126dbebe039fafe2e722326ed886f5683bed7ca6fba8be",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "cf5e6682885e71ce6e5ab7e2470a00f78bf54544496d16a72a37e85423a95af6",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.283 MiB/sec and 68.5217 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (68.354 MiB/sec and 1093.6647 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "rebase",
            "-u",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "-b",
            "newbase.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 1,
          "stdout": "Content mismatch at offset 131072!\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "base-truncated",
      "repetition": 3,
      "checkExit": 0,
      "compareExit": 1,
      "exportExit": 0,
      "topHashUnchanged": true,
      "guestMatchesBaseline": false,
      "guestSha256": "b8215b0d293758fcc7bcf0955dc7972acc4c0853da3035c64f0b59b00802891b",
      "expectedGuestSha256": "b8215b0d293758fcc7bcf0955dc7972acc4c0853da3035c64f0b59b00802891b",
      "baselineGuestSha256": "c30da6cb3fd4d6aa04dbe3947efa4907f4cf417287e6e66eb79a39b5f63d3ac6",
      "changedGuestBytes": 131072,
      "topBeforeSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "topAfterSha256": "7872210a5847e975d67556993c3a0924516bec17985af5c680e08a0993834f4d",
      "baseBeforeSha256": "ca35e308c077e01b75f4698e8d730776e0288c285965c185a8f5fe7a7a42a835",
      "selectedBaseSha256": "51caac4c4a2a04ba6ec6d56b20b017456aa31bf8232f06ec3d78297c920ea831",
      "initialMap": [
        {
          "start": 0,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 327680
        },
        {
          "start": 65536,
          "length": 65536,
          "depth": 0,
          "present": true,
          "zero": true,
          "data": false,
          "compressed": false
        },
        {
          "start": 131072,
          "length": 131072,
          "depth": 1,
          "present": true,
          "zero": false,
          "data": true,
          "compressed": false,
          "offset": 131072
        }
      ],
      "checkResult": {
        "image-end-offset": 393216,
        "total-clusters": 4,
        "check-errors": 0,
        "allocated-clusters": 1,
        "filename": "overlay.qcow2",
        "format": "qcow2"
      },
      "commands": [
        {
          "command": [
            "qemu-img",
            "create",
            "-f",
            "qcow2",
            "-o",
            "cluster_size=65536",
            "-F",
            "raw",
            "-b",
            "base.raw",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "Formatting 'overlay.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=base.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -P 34 0 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 0\n64 KiB, 1 ops; 00.01 sec (4.740 MiB/sec and 75.8451 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-io",
            "-f",
            "qcow2",
            "-c",
            "write -z 65536 65536",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "wrote 65536/65536 bytes at offset 65536\n64 KiB, 1 ops; 00.00 sec (63.284 MiB/sec and 1012.5362 ops/sec)\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "before.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "map",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "[{ \"start\": 0, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 327680},\n{ \"start\": 65536, \"length\": 65536, \"depth\": 0, \"present\": true, \"zero\": true, \"data\": false, \"compressed\": false},\n{ \"start\": 131072, \"length\": 131072, \"depth\": 1, \"present\": true, \"zero\": false, \"data\": true, \"compressed\": false, \"offset\": 131072}]\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "check",
            "--output=json",
            "-f",
            "qcow2",
            "overlay.qcow2"
          ],
          "exitCode": 0,
          "stdout": "{\n    \"image-end-offset\": 393216,\n    \"total-clusters\": 4,\n    \"check-errors\": 0,\n    \"allocated-clusters\": 1,\n    \"filename\": \"overlay.qcow2\",\n    \"format\": \"qcow2\"\n}\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "qcow2",
            "-F",
            "raw",
            "overlay.qcow2",
            "expected.raw"
          ],
          "exitCode": 1,
          "stdout": "Content mismatch at offset 131072!\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "convert",
            "-f",
            "qcow2",
            "-O",
            "raw",
            "overlay.qcow2",
            "after.raw"
          ],
          "exitCode": 0,
          "stdout": "",
          "stderr": ""
        }
      ]
    },
    {
      "case": "zero-tail-size",
      "repetition": 3,
      "compareExit": 0,
      "strictCompareExit": 1,
      "smallSizeBytes": 65536,
      "largeSizeBytes": 131072,
      "smallSha256": "2dc4424addd6f849f68402090e7d0d19018adf629de600210d807575932f2e2d",
      "largeSha256": "bb208d7fab0b6b15d96ed9f45bf98381c56bf8d55de763a19a714adffcd96f37",
      "commands": [
        {
          "command": [
            "qemu-img",
            "compare",
            "-f",
            "raw",
            "-F",
            "raw",
            "small.raw",
            "large.raw"
          ],
          "exitCode": 0,
          "stdout": "Warning: Image size mismatch!\nImages are identical.\n",
          "stderr": ""
        },
        {
          "command": [
            "qemu-img",
            "compare",
            "-s",
            "-f",
            "raw",
            "-F",
            "raw",
            "small.raw",
            "large.raw"
          ],
          "exitCode": 1,
          "stdout": "Strict mode: Image size mismatch!\n",
          "stderr": ""
        }
      ]
    }
  ]
}
