Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 1 | === Successful image creation (defaults) === |
| 2 | |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 3 | {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}} |
| 4 | {"return": {}} |
| 5 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 6 | {"return": {}} |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 7 | |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 8 | {"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "node_name": "imgfile"}} |
| 9 | {"return": {}} |
| 10 | {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "imgfile", "size": 134217728}}} |
| 11 | {"return": {}} |
| 12 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 13 | {"return": {}} |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 14 | |
| 15 | image: TEST_IMG |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 16 | file format: IMGFMT |
| 17 | virtual size: 128M (134217728 bytes) |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 18 | cluster_size: 1048576 |
| 19 | |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 20 | [{ "start": 0, "length": 134217728, "depth": 0, "zero": true, "data": false}] |
| 21 | |
| 22 | === Successful image creation (explicit defaults) === |
| 23 | |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 24 | {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}} |
| 25 | {"return": {}} |
| 26 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 27 | {"return": {}} |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 28 | |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 29 | {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi"}, "preallocation": "off", "size": 67108864}}} |
| 30 | {"return": {}} |
| 31 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 32 | {"return": {}} |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 33 | |
| 34 | image: TEST_IMG |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 35 | file format: IMGFMT |
| 36 | virtual size: 64M (67108864 bytes) |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 37 | cluster_size: 1048576 |
| 38 | |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 39 | [{ "start": 0, "length": 67108864, "depth": 0, "zero": true, "data": false}] |
| 40 | |
| 41 | === Successful image creation (with non-default options) === |
| 42 | |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 43 | {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}} |
| 44 | {"return": {}} |
| 45 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 46 | {"return": {}} |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 47 | |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 48 | {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi"}, "preallocation": "metadata", "size": 33554432}}} |
| 49 | {"return": {}} |
| 50 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 51 | {"return": {}} |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 52 | |
| 53 | image: TEST_IMG |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 54 | file format: IMGFMT |
| 55 | virtual size: 32M (33554432 bytes) |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 56 | cluster_size: 1048576 |
| 57 | |
| 58 | [{ "start": 0, "length": 3072, "depth": 0, "zero": false, "data": true, "offset": 1024}, |
| 59 | { "start": 3072, "length": 33551360, "depth": 0, "zero": true, "data": true, "offset": 4096}] |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 60 | |
| 61 | === Invalid BlockdevRef === |
| 62 | |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 63 | {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "this doesn't exist", "size": 33554432}}} |
| 64 | {"return": {}} |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 65 | Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 66 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 67 | {"return": {}} |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 68 | |
| 69 | === Zero size === |
| 70 | |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 71 | {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 0}}} |
| 72 | {"return": {}} |
| 73 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 74 | {"return": {}} |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 75 | |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 76 | image: TEST_IMG |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 77 | file format: IMGFMT |
| 78 | virtual size: 0 (0 bytes) |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 79 | cluster_size: 1048576 |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 80 | |
| 81 | === Maximum size === |
| 82 | |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 83 | {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 562949819203584}}} |
| 84 | {"return": {}} |
| 85 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 86 | {"return": {}} |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 87 | |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 88 | image: TEST_IMG |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 89 | file format: IMGFMT |
| 90 | virtual size: 512T (562949819203584 bytes) |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 91 | cluster_size: 1048576 |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 92 | |
| 93 | === Invalid sizes === |
| 94 | |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 95 | {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 18446744073709551104}}} |
| 96 | {"return": {}} |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 97 | Job failed: Unsupported VDI image size (size is 0xfffffffffffffe00, max supported is 0x1fffff8000000) |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 98 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 99 | {"return": {}} |
Kevin Wolf | b7de077 | 2018-03-20 13:33:52 +0100 | [diff] [blame] | 100 | |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 101 | {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 9223372036854775808}}} |
| 102 | {"return": {}} |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 103 | Job failed: Unsupported VDI image size (size is 0x8000000000000000, max supported is 0x1fffff8000000) |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 104 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 105 | {"return": {}} |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 106 | |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 107 | {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 562949819203585}}} |
| 108 | {"return": {}} |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 109 | Job failed: Unsupported VDI image size (size is 0x1fffff8000001, max supported is 0x1fffff8000000) |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 110 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 111 | {"return": {}} |
Kevin Wolf | abbab72 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 112 | |