xref: /openbmc/qemu/tests/qemu-iotests/307.out (revision 719f0f60)
1wrote 4096/4096 bytes at offset 0
24 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
3
4=== Launch VM ===
5{"execute": "nbd-server-start", "arguments": {"addr": {"data": {"path": "SOCK_DIR/PID-socket"}, "type": "unix"}}}
6{"return": {}}
7{"execute": "query-block-exports", "arguments": {}}
8{"return": []}
9
10=== Create a read-only NBD export ===
11{"execute": "block-export-add", "arguments": {"id": "export0", "node-name": "fmt", "type": "nbd"}}
12{"return": {}}
13{"execute": "query-block-exports", "arguments": {}}
14{"return": [{"id": "export0", "node-name": "fmt", "shutting-down": false, "type": "nbd"}]}
15exports available: 1
16 export: 'fmt'
17  size:  67108864
18  flags: 0x58f ( readonly flush fua df multi cache )
19  min block: XXX
20  opt block: XXX
21  max block: XXX
22  available meta contexts: 1
23   base:allocation
24
25
26=== Try a few invalid things ===
27{"execute": "block-export-add", "arguments": {"id": "#invalid", "node-name": "fmt", "type": "nbd"}}
28{"error": {"class": "GenericError", "desc": "Invalid block export id"}}
29{"execute": "block-export-add", "arguments": {"id": "export0", "node-name": "fmt", "type": "nbd"}}
30{"error": {"class": "GenericError", "desc": "Block export id 'export0' is already in use"}}
31{"execute": "block-export-add", "arguments": {"id": "export1", "node-name": "ro", "type": "nbd", "writable": true}}
32{"error": {"class": "GenericError", "desc": "Cannot export read-only node as writable"}}
33{"execute": "block-export-del", "arguments": {"id": "export1"}}
34{"error": {"class": "GenericError", "desc": "Export 'export1' is not found"}}
35{"execute": "query-block-exports", "arguments": {}}
36{"return": [{"id": "export0", "node-name": "fmt", "shutting-down": false, "type": "nbd"}]}
37
38=== Move export to an iothread ===
39{"execute": "device_add", "arguments": {"drive": "fmt", "driver": "scsi-hd", "id": "sda"}}
40{"return": {}}
41{"execute": "query-block-exports", "arguments": {}}
42{"return": [{"id": "export0", "node-name": "fmt", "shutting-down": false, "type": "nbd"}]}
43exports available: 1
44 export: 'fmt'
45  size:  67108864
46  flags: 0x58f ( readonly flush fua df multi cache )
47  min block: XXX
48  opt block: XXX
49  max block: XXX
50  available meta contexts: 1
51   base:allocation
52
53
54=== Add a writable export ===
55{"execute": "block-export-add", "arguments": {"description": "This is the writable second export", "id": "export1", "name": "export1", "node-name": "fmt", "type": "nbd", "writable": true, "writethrough": true}}
56{"error": {"class": "GenericError", "desc": "Permission conflict on node 'fmt': permissions 'write' are both required by an unnamed block device (uses node 'fmt' as 'root' child) and unshared by block device 'sda' (uses node 'fmt' as 'root' child)."}}
57{"execute": "device_del", "arguments": {"id": "sda"}}
58{"return": {}}
59{"data": {"device": "sda", "path": "/machine/peripheral/sda"}, "event": "DEVICE_DELETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
60{"execute": "device_add", "arguments": {"drive": "fmt", "driver": "scsi-hd", "id": "sda", "share-rw": true}}
61{"return": {}}
62{"execute": "block-export-add", "arguments": {"description": "This is the writable second export", "id": "export1", "name": "export1", "node-name": "fmt", "type": "nbd", "writable": true, "writethrough": true}}
63{"return": {}}
64{"execute": "query-block-exports", "arguments": {}}
65{"return": [{"id": "export1", "node-name": "fmt", "shutting-down": false, "type": "nbd"}, {"id": "export0", "node-name": "fmt", "shutting-down": false, "type": "nbd"}]}
66exports available: 2
67 export: 'fmt'
68  size:  67108864
69  flags: 0x58f ( readonly flush fua df multi cache )
70  min block: XXX
71  opt block: XXX
72  max block: XXX
73  available meta contexts: 1
74   base:allocation
75 export: 'export1'
76  description: This is the writable second export
77  size:  67108864
78  flags: 0xced ( flush fua trim zeroes df cache fast-zero )
79  min block: XXX
80  opt block: XXX
81  max block: XXX
82  available meta contexts: 1
83   base:allocation
84
85
86=== Connect qemu-io to export1, try removing exports ===
87read 4096/4096 bytes at offset 0
884 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
89
90wrote 4096/4096 bytes at offset 4096
914 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
92
93{"execute": "block-export-del", "arguments": {"id": "export1"}}
94{"error": {"class": "GenericError", "desc": "export 'export1' still in use"}}
95{"execute": "block-export-del", "arguments": {"id": "export0"}}
96{"return": {}}
97[{"data": {"id": "export0"}, "event": "BLOCK_EXPORT_DELETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}]
98{"execute": "query-block-exports", "arguments": {}}
99{"return": [{"id": "export1", "node-name": "fmt", "shutting-down": false, "type": "nbd"}]}
100exports available: 1
101 export: 'export1'
102  description: This is the writable second export
103  size:  67108864
104  flags: 0xced ( flush fua trim zeroes df cache fast-zero )
105  min block: XXX
106  opt block: XXX
107  max block: XXX
108  available meta contexts: 1
109   base:allocation
110
111
112=== Connect qemu-io again, try force removing ===
113{"execute": "block-export-del", "arguments": {"id": "export1"}}
114{"error": {"class": "GenericError", "desc": "export 'export1' still in use"}}
115{"execute": "block-export-del", "arguments": {"id": "export1", "mode": "hard"}}
116{"return": {}}
117read failed: Input/output error
118
119{"execute": "query-block-exports", "arguments": {}}
120{"return": []}
121exports available: 0
122
123
124=== Shut down QEMU ===
125