| |
| Testcase non-persistent without restart |
| |
| {"execute": "block-dirty-bitmap-add", "arguments": {"name": "bitmap0", "node": "drive0", "persistent": false}} |
| {"return": {}} |
| initial bitmap: name=bitmap0 dirty-clusters=1 |
| {"execute": "blockdev-snapshot-sync", "arguments": {"device": "drive0", "format": "qcow2", "snapshot-file": "TEST_DIR/PID-top"}} |
| {"return": {}} |
| check that no bitmaps are in snapshot: not found |
| {"execute": "block-commit", "arguments": {"device": "drive0", "top": "TEST_DIR/PID-top"}} |
| {"return": {}} |
| {"data": {"device": "drive0", "len": 65536, "offset": 65536, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} |
| {"execute": "block-job-complete", "arguments": {"device": "drive0"}} |
| {"return": {}} |
| {"data": {"device": "drive0", "len": 65536, "offset": 65536, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} |
| check bitmap after commit: name=bitmap0 dirty-clusters=2 |
| check updated bitmap: name=bitmap0 dirty-clusters=3 |
| |
| Testcase persistent without restart |
| |
| {"execute": "block-dirty-bitmap-add", "arguments": {"name": "bitmap0", "node": "drive0", "persistent": true}} |
| {"return": {}} |
| initial bitmap: name=bitmap0 dirty-clusters=1 |
| {"execute": "blockdev-snapshot-sync", "arguments": {"device": "drive0", "format": "qcow2", "snapshot-file": "TEST_DIR/PID-top"}} |
| {"return": {}} |
| check that no bitmaps are in snapshot: not found |
| {"execute": "block-commit", "arguments": {"device": "drive0", "top": "TEST_DIR/PID-top"}} |
| {"return": {}} |
| {"data": {"device": "drive0", "len": 65536, "offset": 65536, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} |
| {"execute": "block-job-complete", "arguments": {"device": "drive0"}} |
| {"return": {}} |
| {"data": {"device": "drive0", "len": 65536, "offset": 65536, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} |
| check bitmap after commit: name=bitmap0 dirty-clusters=2 |
| check updated bitmap: name=bitmap0 dirty-clusters=3 |
| |
| Testcase persistent with restart |
| |
| {"execute": "block-dirty-bitmap-add", "arguments": {"name": "bitmap0", "node": "drive0", "persistent": true}} |
| {"return": {}} |
| initial bitmap: name=bitmap0 dirty-clusters=1 |
| {"execute": "blockdev-snapshot-sync", "arguments": {"device": "drive0", "format": "qcow2", "snapshot-file": "TEST_DIR/PID-top"}} |
| {"return": {}} |
| check that no bitmaps are in snapshot: not found |
| ... Restart ... |
| {"execute": "block-commit", "arguments": {"device": "drive0", "top": "TEST_DIR/PID-top"}} |
| {"return": {}} |
| {"data": {"device": "drive0", "len": 65536, "offset": 65536, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} |
| {"execute": "block-job-complete", "arguments": {"device": "drive0"}} |
| {"return": {}} |
| {"data": {"device": "drive0", "len": 65536, "offset": 65536, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} |
| check bitmap after commit: name=bitmap0 dirty-clusters=2 |
| check updated bitmap: name=bitmap0 dirty-clusters=3 |