target/i386/hvf: add vmware-cpuid-freq cpu feature
[qemu/ar7.git] / tests / qemu-iotests / 257.out
bloba7ba512f4c1144b5a16c584cf76e3dec810edf93
2 === Mode bitmap; Bitmap Sync never with simulated failure ===
4 --- Preparing image & VM ---
6 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
7 {"return": {}}
9 --- Write #0 ---
11 write -P0x49 0x0000000 0x10000
12 {"return": ""}
13 write -P0x6c 0x0100000 0x10000
14 {"return": ""}
15 write -P0x6f 0x2000000 0x10000
16 {"return": ""}
17 write -P0x76 0x3ff0000 0x10000
18 {"return": ""}
20   "bitmaps": {}
23 --- Reference Backup #0 ---
26 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
27 {"return": {}}
30 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
31 {"return": {}}
33 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
34 {"return": {}}
35 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
37 --- Add Bitmap ---
39 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
40 {"return": {}}
42 --- Write #1 ---
44 write -P0x65 0x0000000 0x10000
45 {"return": ""}
46 write -P0x77 0x00f8000 0x10000
47 {"return": ""}
48 write -P0x72 0x2008000 0x10000
49 {"return": ""}
50 write -P0x69 0x3fe0000 0x10000
51 {"return": ""}
53   "bitmaps": {
54     "drive0": [
55       {
56         "busy": false,
57         "count": 393216,
58         "granularity": 65536,
59         "name": "bitmap0",
60         "persistent": false,
61         "recording": true,
62         "status": "active"
63       }
64     ]
65   }
68 = Checking Bitmap bitmap0 =
69 expecting 6 dirty sectors; have 6. OK!
71 --- Reference Backup #1 ---
74 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
75 {"return": {}}
78 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
79 {"return": {}}
81 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
82 {"return": {}}
83 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
85 --- Test Backup #1 ---
88 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
89 {"return": {}}
92 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
93 {"return": {}}
95 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
96 {"return": {}}
98 --- Write #2 ---
100 write -P0x74 0x0010000 0x10000
101 {"return": ""}
102 write -P0x69 0x00e8000 0x10000
103 {"return": ""}
104 write -P0x6e 0x2018000 0x10000
105 {"return": ""}
106 write -P0x67 0x3fe0000 0x20000
107 {"return": ""}
109   "bitmaps": {
110     "drive0": [
111       {
112         "busy": false,
113         "count": 0,
114         "granularity": 65536,
115         "persistent": false,
116         "recording": false,
117         "status": "disabled"
118       },
119       {
120         "busy": false,
121         "count": 458752,
122         "granularity": 65536,
123         "persistent": false,
124         "recording": true,
125         "status": "active"
126       },
127       {
128         "busy": true,
129         "count": 393216,
130         "granularity": 65536,
131         "name": "bitmap0",
132         "persistent": false,
133         "recording": true,
134         "status": "frozen"
135       }
136     ]
137   }
140 = Checking Bitmap bitmap0 =
141 expecting 6 dirty sectors; have 6. OK!
143 = Checking Bitmap (anonymous) =
144 expecting 7 dirty sectors; have 7. OK!
146 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
147 {"return": {}}
148 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
149 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
151   "bitmaps": {
152     "drive0": [
153       {
154         "busy": false,
155         "count": 655360,
156         "granularity": 65536,
157         "name": "bitmap0",
158         "persistent": false,
159         "recording": true,
160         "status": "active"
161       }
162     ]
163   }
166 = Checking Bitmap bitmap0 =
167 expecting 10 dirty sectors; have 10. OK!
169 --- Write #3 ---
171 write -P0xaa 0x0010000 0x30000
172 {"return": ""}
173 write -P0xbb 0x00d8000 0x10000
174 {"return": ""}
175 write -P0xcc 0x2028000 0x10000
176 {"return": ""}
177 write -P0xdd 0x3fc0000 0x10000
178 {"return": ""}
180   "bitmaps": {
181     "drive0": [
182       {
183         "busy": false,
184         "count": 983040,
185         "granularity": 65536,
186         "name": "bitmap0",
187         "persistent": false,
188         "recording": true,
189         "status": "active"
190       }
191     ]
192   }
195 = Checking Bitmap bitmap0 =
196 expecting 15 dirty sectors; have 15. OK!
198 --- Reference Backup #2 ---
201 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
202 {"return": {}}
205 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
206 {"return": {}}
208 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
209 {"return": {}}
210 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
212 --- Test Backup #2 ---
215 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
216 {"return": {}}
219 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
220 {"return": {}}
222 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
223 {"return": {}}
224 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
225 {"return": {}}
226 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
227 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
229   "bitmaps": {
230     "drive0": [
231       {
232         "busy": false,
233         "count": 983040,
234         "granularity": 65536,
235         "name": "bitmap0",
236         "persistent": false,
237         "recording": true,
238         "status": "active"
239       }
240     ]
241   }
244 = Checking Bitmap bitmap0 =
245 expecting 15 dirty sectors; have 15. OK!
247 --- Cleanup ---
249 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
250 {"return": {}}
252   "bitmaps": {}
255 --- Verification ---
257 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
258 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
259 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
262 === Mode bitmap; Bitmap Sync never with intermediate failure ===
264 --- Preparing image & VM ---
266 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "blkdebug", "image": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "inject-error": [{"errno": 5, "event": "read_aio", "immediately": false, "once": true, "state": 3}], "set-state": [{"event": "flush_to_disk", "new-state": 2, "state": 1}, {"event": "read_aio", "new-state": 3, "state": 2}]}, "node-name": "drive0"}}
267 {"return": {}}
269 --- Write #0 ---
271 write -P0x49 0x0000000 0x10000
272 {"return": ""}
273 write -P0x6c 0x0100000 0x10000
274 {"return": ""}
275 write -P0x6f 0x2000000 0x10000
276 {"return": ""}
277 write -P0x76 0x3ff0000 0x10000
278 {"return": ""}
280   "bitmaps": {}
283 --- Reference Backup #0 ---
286 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
287 {"return": {}}
290 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
291 {"return": {}}
293 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
294 {"return": {}}
295 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
297 --- Add Bitmap ---
299 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
300 {"return": {}}
302 --- Write #1 ---
304 write -P0x65 0x0000000 0x10000
305 {"return": ""}
306 write -P0x77 0x00f8000 0x10000
307 {"return": ""}
308 write -P0x72 0x2008000 0x10000
309 {"return": ""}
310 write -P0x69 0x3fe0000 0x10000
311 {"return": ""}
313   "bitmaps": {
314     "drive0": [
315       {
316         "busy": false,
317         "count": 393216,
318         "granularity": 65536,
319         "name": "bitmap0",
320         "persistent": false,
321         "recording": true,
322         "status": "active"
323       }
324     ]
325   }
328 = Checking Bitmap bitmap0 =
329 expecting 6 dirty sectors; have 6. OK!
331 --- Reference Backup #1 ---
334 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
335 {"return": {}}
338 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
339 {"return": {}}
341 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
342 {"return": {}}
343 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
345 {"return": ""}
347 --- Test Backup #1 ---
350 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
351 {"return": {}}
354 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
355 {"return": {}}
357 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
358 {"return": {}}
359 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
360 {"data": {"device": "backup_1", "error": "Input/output error", "len": 393216, "offset": 65536, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
362   "bitmaps": {
363     "drive0": [
364       {
365         "busy": false,
366         "count": 393216,
367         "granularity": 65536,
368         "name": "bitmap0",
369         "persistent": false,
370         "recording": true,
371         "status": "active"
372       }
373     ]
374   }
377 = Checking Bitmap bitmap0 =
378 expecting 6 dirty sectors; have 6. OK!
380 --- Write #3 ---
382 write -P0xaa 0x0010000 0x30000
383 {"return": ""}
384 write -P0xbb 0x00d8000 0x10000
385 {"return": ""}
386 write -P0xcc 0x2028000 0x10000
387 {"return": ""}
388 write -P0xdd 0x3fc0000 0x10000
389 {"return": ""}
391   "bitmaps": {
392     "drive0": [
393       {
394         "busy": false,
395         "count": 917504,
396         "granularity": 65536,
397         "name": "bitmap0",
398         "persistent": false,
399         "recording": true,
400         "status": "active"
401       }
402     ]
403   }
406 = Checking Bitmap bitmap0 =
407 expecting 14 dirty sectors; have 14. OK!
409 --- Reference Backup #2 ---
412 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
413 {"return": {}}
416 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
417 {"return": {}}
419 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
420 {"return": {}}
421 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
423 --- Test Backup #2 ---
426 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
427 {"return": {}}
430 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
431 {"return": {}}
433 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
434 {"return": {}}
435 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
436 {"return": {}}
437 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
438 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
440   "bitmaps": {
441     "drive0": [
442       {
443         "busy": false,
444         "count": 917504,
445         "granularity": 65536,
446         "name": "bitmap0",
447         "persistent": false,
448         "recording": true,
449         "status": "active"
450       }
451     ]
452   }
455 = Checking Bitmap bitmap0 =
456 expecting 14 dirty sectors; have 14. OK!
458 --- Cleanup ---
460 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
461 {"return": {}}
463   "bitmaps": {}
466 --- Verification ---
468 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
469 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
470 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
473 === Mode bitmap; Bitmap Sync never without failure ===
475 --- Preparing image & VM ---
477 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
478 {"return": {}}
480 --- Write #0 ---
482 write -P0x49 0x0000000 0x10000
483 {"return": ""}
484 write -P0x6c 0x0100000 0x10000
485 {"return": ""}
486 write -P0x6f 0x2000000 0x10000
487 {"return": ""}
488 write -P0x76 0x3ff0000 0x10000
489 {"return": ""}
491   "bitmaps": {}
494 --- Reference Backup #0 ---
497 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
498 {"return": {}}
501 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
502 {"return": {}}
504 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
505 {"return": {}}
506 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
508 --- Add Bitmap ---
510 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
511 {"return": {}}
513 --- Write #1 ---
515 write -P0x65 0x0000000 0x10000
516 {"return": ""}
517 write -P0x77 0x00f8000 0x10000
518 {"return": ""}
519 write -P0x72 0x2008000 0x10000
520 {"return": ""}
521 write -P0x69 0x3fe0000 0x10000
522 {"return": ""}
524   "bitmaps": {
525     "drive0": [
526       {
527         "busy": false,
528         "count": 393216,
529         "granularity": 65536,
530         "name": "bitmap0",
531         "persistent": false,
532         "recording": true,
533         "status": "active"
534       }
535     ]
536   }
539 = Checking Bitmap bitmap0 =
540 expecting 6 dirty sectors; have 6. OK!
542 --- Reference Backup #1 ---
545 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
546 {"return": {}}
549 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
550 {"return": {}}
552 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
553 {"return": {}}
554 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
556 --- Test Backup #1 ---
559 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
560 {"return": {}}
563 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
564 {"return": {}}
566 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
567 {"return": {}}
569 --- Write #2 ---
571 write -P0x74 0x0010000 0x10000
572 {"return": ""}
573 write -P0x69 0x00e8000 0x10000
574 {"return": ""}
575 write -P0x6e 0x2018000 0x10000
576 {"return": ""}
577 write -P0x67 0x3fe0000 0x20000
578 {"return": ""}
580   "bitmaps": {
581     "drive0": [
582       {
583         "busy": false,
584         "count": 0,
585         "granularity": 65536,
586         "persistent": false,
587         "recording": false,
588         "status": "disabled"
589       },
590       {
591         "busy": false,
592         "count": 458752,
593         "granularity": 65536,
594         "persistent": false,
595         "recording": true,
596         "status": "active"
597       },
598       {
599         "busy": true,
600         "count": 393216,
601         "granularity": 65536,
602         "name": "bitmap0",
603         "persistent": false,
604         "recording": true,
605         "status": "frozen"
606       }
607     ]
608   }
611 = Checking Bitmap bitmap0 =
612 expecting 6 dirty sectors; have 6. OK!
614 = Checking Bitmap (anonymous) =
615 expecting 7 dirty sectors; have 7. OK!
617 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
618 {"return": {}}
619 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
620 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
622   "bitmaps": {
623     "drive0": [
624       {
625         "busy": false,
626         "count": 655360,
627         "granularity": 65536,
628         "name": "bitmap0",
629         "persistent": false,
630         "recording": true,
631         "status": "active"
632       }
633     ]
634   }
637 = Checking Bitmap bitmap0 =
638 expecting 10 dirty sectors; have 10. OK!
640 --- Write #3 ---
642 write -P0xaa 0x0010000 0x30000
643 {"return": ""}
644 write -P0xbb 0x00d8000 0x10000
645 {"return": ""}
646 write -P0xcc 0x2028000 0x10000
647 {"return": ""}
648 write -P0xdd 0x3fc0000 0x10000
649 {"return": ""}
651   "bitmaps": {
652     "drive0": [
653       {
654         "busy": false,
655         "count": 983040,
656         "granularity": 65536,
657         "name": "bitmap0",
658         "persistent": false,
659         "recording": true,
660         "status": "active"
661       }
662     ]
663   }
666 = Checking Bitmap bitmap0 =
667 expecting 15 dirty sectors; have 15. OK!
669 --- Reference Backup #2 ---
672 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
673 {"return": {}}
676 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
677 {"return": {}}
679 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
680 {"return": {}}
681 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
683 --- Test Backup #2 ---
686 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
687 {"return": {}}
690 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
691 {"return": {}}
693 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
694 {"return": {}}
695 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
696 {"return": {}}
697 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
698 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
700   "bitmaps": {
701     "drive0": [
702       {
703         "busy": false,
704         "count": 983040,
705         "granularity": 65536,
706         "name": "bitmap0",
707         "persistent": false,
708         "recording": true,
709         "status": "active"
710       }
711     ]
712   }
715 = Checking Bitmap bitmap0 =
716 expecting 15 dirty sectors; have 15. OK!
718 --- Cleanup ---
720 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
721 {"return": {}}
723   "bitmaps": {}
726 --- Verification ---
728 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
729 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
730 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
733 === Mode bitmap; Bitmap Sync on-success with simulated failure ===
735 --- Preparing image & VM ---
737 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
738 {"return": {}}
740 --- Write #0 ---
742 write -P0x49 0x0000000 0x10000
743 {"return": ""}
744 write -P0x6c 0x0100000 0x10000
745 {"return": ""}
746 write -P0x6f 0x2000000 0x10000
747 {"return": ""}
748 write -P0x76 0x3ff0000 0x10000
749 {"return": ""}
751   "bitmaps": {}
754 --- Reference Backup #0 ---
757 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
758 {"return": {}}
761 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
762 {"return": {}}
764 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
765 {"return": {}}
766 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
768 --- Add Bitmap ---
770 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
771 {"return": {}}
773 --- Write #1 ---
775 write -P0x65 0x0000000 0x10000
776 {"return": ""}
777 write -P0x77 0x00f8000 0x10000
778 {"return": ""}
779 write -P0x72 0x2008000 0x10000
780 {"return": ""}
781 write -P0x69 0x3fe0000 0x10000
782 {"return": ""}
784   "bitmaps": {
785     "drive0": [
786       {
787         "busy": false,
788         "count": 393216,
789         "granularity": 65536,
790         "name": "bitmap0",
791         "persistent": false,
792         "recording": true,
793         "status": "active"
794       }
795     ]
796   }
799 = Checking Bitmap bitmap0 =
800 expecting 6 dirty sectors; have 6. OK!
802 --- Reference Backup #1 ---
805 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
806 {"return": {}}
809 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
810 {"return": {}}
812 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
813 {"return": {}}
814 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
816 --- Test Backup #1 ---
819 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
820 {"return": {}}
823 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
824 {"return": {}}
826 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
827 {"return": {}}
829 --- Write #2 ---
831 write -P0x74 0x0010000 0x10000
832 {"return": ""}
833 write -P0x69 0x00e8000 0x10000
834 {"return": ""}
835 write -P0x6e 0x2018000 0x10000
836 {"return": ""}
837 write -P0x67 0x3fe0000 0x20000
838 {"return": ""}
840   "bitmaps": {
841     "drive0": [
842       {
843         "busy": false,
844         "count": 0,
845         "granularity": 65536,
846         "persistent": false,
847         "recording": false,
848         "status": "disabled"
849       },
850       {
851         "busy": false,
852         "count": 458752,
853         "granularity": 65536,
854         "persistent": false,
855         "recording": true,
856         "status": "active"
857       },
858       {
859         "busy": true,
860         "count": 393216,
861         "granularity": 65536,
862         "name": "bitmap0",
863         "persistent": false,
864         "recording": true,
865         "status": "frozen"
866       }
867     ]
868   }
871 = Checking Bitmap bitmap0 =
872 expecting 6 dirty sectors; have 6. OK!
874 = Checking Bitmap (anonymous) =
875 expecting 7 dirty sectors; have 7. OK!
877 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
878 {"return": {}}
879 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
880 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
882   "bitmaps": {
883     "drive0": [
884       {
885         "busy": false,
886         "count": 655360,
887         "granularity": 65536,
888         "name": "bitmap0",
889         "persistent": false,
890         "recording": true,
891         "status": "active"
892       }
893     ]
894   }
897 = Checking Bitmap bitmap0 =
898 expecting 10 dirty sectors; have 10. OK!
900 --- Write #3 ---
902 write -P0xaa 0x0010000 0x30000
903 {"return": ""}
904 write -P0xbb 0x00d8000 0x10000
905 {"return": ""}
906 write -P0xcc 0x2028000 0x10000
907 {"return": ""}
908 write -P0xdd 0x3fc0000 0x10000
909 {"return": ""}
911   "bitmaps": {
912     "drive0": [
913       {
914         "busy": false,
915         "count": 983040,
916         "granularity": 65536,
917         "name": "bitmap0",
918         "persistent": false,
919         "recording": true,
920         "status": "active"
921       }
922     ]
923   }
926 = Checking Bitmap bitmap0 =
927 expecting 15 dirty sectors; have 15. OK!
929 --- Reference Backup #2 ---
932 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
933 {"return": {}}
936 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
937 {"return": {}}
939 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
940 {"return": {}}
941 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
943 --- Test Backup #2 ---
946 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
947 {"return": {}}
950 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
951 {"return": {}}
953 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
954 {"return": {}}
955 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
956 {"return": {}}
957 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
958 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
960   "bitmaps": {
961     "drive0": [
962       {
963         "busy": false,
964         "count": 0,
965         "granularity": 65536,
966         "name": "bitmap0",
967         "persistent": false,
968         "recording": true,
969         "status": "active"
970       }
971     ]
972   }
975 = Checking Bitmap bitmap0 =
976 expecting 0 dirty sectors; have 0. OK!
978 --- Cleanup ---
980 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
981 {"return": {}}
983   "bitmaps": {}
986 --- Verification ---
988 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
989 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
990 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
993 === Mode bitmap; Bitmap Sync on-success with intermediate failure ===
995 --- Preparing image & VM ---
997 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "blkdebug", "image": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "inject-error": [{"errno": 5, "event": "read_aio", "immediately": false, "once": true, "state": 3}], "set-state": [{"event": "flush_to_disk", "new-state": 2, "state": 1}, {"event": "read_aio", "new-state": 3, "state": 2}]}, "node-name": "drive0"}}
998 {"return": {}}
1000 --- Write #0 ---
1002 write -P0x49 0x0000000 0x10000
1003 {"return": ""}
1004 write -P0x6c 0x0100000 0x10000
1005 {"return": ""}
1006 write -P0x6f 0x2000000 0x10000
1007 {"return": ""}
1008 write -P0x76 0x3ff0000 0x10000
1009 {"return": ""}
1011   "bitmaps": {}
1014 --- Reference Backup #0 ---
1017 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1018 {"return": {}}
1021 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1022 {"return": {}}
1024 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
1025 {"return": {}}
1026 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1028 --- Add Bitmap ---
1030 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1031 {"return": {}}
1033 --- Write #1 ---
1035 write -P0x65 0x0000000 0x10000
1036 {"return": ""}
1037 write -P0x77 0x00f8000 0x10000
1038 {"return": ""}
1039 write -P0x72 0x2008000 0x10000
1040 {"return": ""}
1041 write -P0x69 0x3fe0000 0x10000
1042 {"return": ""}
1044   "bitmaps": {
1045     "drive0": [
1046       {
1047         "busy": false,
1048         "count": 393216,
1049         "granularity": 65536,
1050         "name": "bitmap0",
1051         "persistent": false,
1052         "recording": true,
1053         "status": "active"
1054       }
1055     ]
1056   }
1059 = Checking Bitmap bitmap0 =
1060 expecting 6 dirty sectors; have 6. OK!
1062 --- Reference Backup #1 ---
1065 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1066 {"return": {}}
1069 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1070 {"return": {}}
1072 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
1073 {"return": {}}
1074 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1076 {"return": ""}
1078 --- Test Backup #1 ---
1081 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1082 {"return": {}}
1085 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1086 {"return": {}}
1088 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
1089 {"return": {}}
1090 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1091 {"data": {"device": "backup_1", "error": "Input/output error", "len": 393216, "offset": 65536, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1093   "bitmaps": {
1094     "drive0": [
1095       {
1096         "busy": false,
1097         "count": 393216,
1098         "granularity": 65536,
1099         "name": "bitmap0",
1100         "persistent": false,
1101         "recording": true,
1102         "status": "active"
1103       }
1104     ]
1105   }
1108 = Checking Bitmap bitmap0 =
1109 expecting 6 dirty sectors; have 6. OK!
1111 --- Write #3 ---
1113 write -P0xaa 0x0010000 0x30000
1114 {"return": ""}
1115 write -P0xbb 0x00d8000 0x10000
1116 {"return": ""}
1117 write -P0xcc 0x2028000 0x10000
1118 {"return": ""}
1119 write -P0xdd 0x3fc0000 0x10000
1120 {"return": ""}
1122   "bitmaps": {
1123     "drive0": [
1124       {
1125         "busy": false,
1126         "count": 917504,
1127         "granularity": 65536,
1128         "name": "bitmap0",
1129         "persistent": false,
1130         "recording": true,
1131         "status": "active"
1132       }
1133     ]
1134   }
1137 = Checking Bitmap bitmap0 =
1138 expecting 14 dirty sectors; have 14. OK!
1140 --- Reference Backup #2 ---
1143 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1144 {"return": {}}
1147 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1148 {"return": {}}
1150 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
1151 {"return": {}}
1152 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1154 --- Test Backup #2 ---
1157 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1158 {"return": {}}
1161 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1162 {"return": {}}
1164 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
1165 {"return": {}}
1166 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
1167 {"return": {}}
1168 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1169 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1171   "bitmaps": {
1172     "drive0": [
1173       {
1174         "busy": false,
1175         "count": 0,
1176         "granularity": 65536,
1177         "name": "bitmap0",
1178         "persistent": false,
1179         "recording": true,
1180         "status": "active"
1181       }
1182     ]
1183   }
1186 = Checking Bitmap bitmap0 =
1187 expecting 0 dirty sectors; have 0. OK!
1189 --- Cleanup ---
1191 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1192 {"return": {}}
1194   "bitmaps": {}
1197 --- Verification ---
1199 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
1200 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1201 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1204 === Mode bitmap; Bitmap Sync on-success without failure ===
1206 --- Preparing image & VM ---
1208 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
1209 {"return": {}}
1211 --- Write #0 ---
1213 write -P0x49 0x0000000 0x10000
1214 {"return": ""}
1215 write -P0x6c 0x0100000 0x10000
1216 {"return": ""}
1217 write -P0x6f 0x2000000 0x10000
1218 {"return": ""}
1219 write -P0x76 0x3ff0000 0x10000
1220 {"return": ""}
1222   "bitmaps": {}
1225 --- Reference Backup #0 ---
1228 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1229 {"return": {}}
1232 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1233 {"return": {}}
1235 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
1236 {"return": {}}
1237 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1239 --- Add Bitmap ---
1241 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1242 {"return": {}}
1244 --- Write #1 ---
1246 write -P0x65 0x0000000 0x10000
1247 {"return": ""}
1248 write -P0x77 0x00f8000 0x10000
1249 {"return": ""}
1250 write -P0x72 0x2008000 0x10000
1251 {"return": ""}
1252 write -P0x69 0x3fe0000 0x10000
1253 {"return": ""}
1255   "bitmaps": {
1256     "drive0": [
1257       {
1258         "busy": false,
1259         "count": 393216,
1260         "granularity": 65536,
1261         "name": "bitmap0",
1262         "persistent": false,
1263         "recording": true,
1264         "status": "active"
1265       }
1266     ]
1267   }
1270 = Checking Bitmap bitmap0 =
1271 expecting 6 dirty sectors; have 6. OK!
1273 --- Reference Backup #1 ---
1276 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1277 {"return": {}}
1280 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1281 {"return": {}}
1283 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
1284 {"return": {}}
1285 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1287 --- Test Backup #1 ---
1290 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1291 {"return": {}}
1294 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1295 {"return": {}}
1297 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
1298 {"return": {}}
1300 --- Write #2 ---
1302 write -P0x74 0x0010000 0x10000
1303 {"return": ""}
1304 write -P0x69 0x00e8000 0x10000
1305 {"return": ""}
1306 write -P0x6e 0x2018000 0x10000
1307 {"return": ""}
1308 write -P0x67 0x3fe0000 0x20000
1309 {"return": ""}
1311   "bitmaps": {
1312     "drive0": [
1313       {
1314         "busy": false,
1315         "count": 0,
1316         "granularity": 65536,
1317         "persistent": false,
1318         "recording": false,
1319         "status": "disabled"
1320       },
1321       {
1322         "busy": false,
1323         "count": 458752,
1324         "granularity": 65536,
1325         "persistent": false,
1326         "recording": true,
1327         "status": "active"
1328       },
1329       {
1330         "busy": true,
1331         "count": 393216,
1332         "granularity": 65536,
1333         "name": "bitmap0",
1334         "persistent": false,
1335         "recording": true,
1336         "status": "frozen"
1337       }
1338     ]
1339   }
1342 = Checking Bitmap bitmap0 =
1343 expecting 6 dirty sectors; have 6. OK!
1345 = Checking Bitmap (anonymous) =
1346 expecting 7 dirty sectors; have 7. OK!
1348 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
1349 {"return": {}}
1350 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1351 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1353   "bitmaps": {
1354     "drive0": [
1355       {
1356         "busy": false,
1357         "count": 458752,
1358         "granularity": 65536,
1359         "name": "bitmap0",
1360         "persistent": false,
1361         "recording": true,
1362         "status": "active"
1363       }
1364     ]
1365   }
1368 = Checking Bitmap bitmap0 =
1369 expecting 7 dirty sectors; have 7. OK!
1371 --- Write #3 ---
1373 write -P0xaa 0x0010000 0x30000
1374 {"return": ""}
1375 write -P0xbb 0x00d8000 0x10000
1376 {"return": ""}
1377 write -P0xcc 0x2028000 0x10000
1378 {"return": ""}
1379 write -P0xdd 0x3fc0000 0x10000
1380 {"return": ""}
1382   "bitmaps": {
1383     "drive0": [
1384       {
1385         "busy": false,
1386         "count": 786432,
1387         "granularity": 65536,
1388         "name": "bitmap0",
1389         "persistent": false,
1390         "recording": true,
1391         "status": "active"
1392       }
1393     ]
1394   }
1397 = Checking Bitmap bitmap0 =
1398 expecting 12 dirty sectors; have 12. OK!
1400 --- Reference Backup #2 ---
1403 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1404 {"return": {}}
1407 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1408 {"return": {}}
1410 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
1411 {"return": {}}
1412 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1414 --- Test Backup #2 ---
1417 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1418 {"return": {}}
1421 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1422 {"return": {}}
1424 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
1425 {"return": {}}
1426 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
1427 {"return": {}}
1428 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1429 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1431   "bitmaps": {
1432     "drive0": [
1433       {
1434         "busy": false,
1435         "count": 0,
1436         "granularity": 65536,
1437         "name": "bitmap0",
1438         "persistent": false,
1439         "recording": true,
1440         "status": "active"
1441       }
1442     ]
1443   }
1446 = Checking Bitmap bitmap0 =
1447 expecting 0 dirty sectors; have 0. OK!
1449 --- Cleanup ---
1451 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1452 {"return": {}}
1454   "bitmaps": {}
1457 --- Verification ---
1459 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
1460 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1461 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1464 === Mode bitmap; Bitmap Sync always with simulated failure ===
1466 --- Preparing image & VM ---
1468 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
1469 {"return": {}}
1471 --- Write #0 ---
1473 write -P0x49 0x0000000 0x10000
1474 {"return": ""}
1475 write -P0x6c 0x0100000 0x10000
1476 {"return": ""}
1477 write -P0x6f 0x2000000 0x10000
1478 {"return": ""}
1479 write -P0x76 0x3ff0000 0x10000
1480 {"return": ""}
1482   "bitmaps": {}
1485 --- Reference Backup #0 ---
1488 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1489 {"return": {}}
1492 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1493 {"return": {}}
1495 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
1496 {"return": {}}
1497 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1499 --- Add Bitmap ---
1501 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1502 {"return": {}}
1504 --- Write #1 ---
1506 write -P0x65 0x0000000 0x10000
1507 {"return": ""}
1508 write -P0x77 0x00f8000 0x10000
1509 {"return": ""}
1510 write -P0x72 0x2008000 0x10000
1511 {"return": ""}
1512 write -P0x69 0x3fe0000 0x10000
1513 {"return": ""}
1515   "bitmaps": {
1516     "drive0": [
1517       {
1518         "busy": false,
1519         "count": 393216,
1520         "granularity": 65536,
1521         "name": "bitmap0",
1522         "persistent": false,
1523         "recording": true,
1524         "status": "active"
1525       }
1526     ]
1527   }
1530 = Checking Bitmap bitmap0 =
1531 expecting 6 dirty sectors; have 6. OK!
1533 --- Reference Backup #1 ---
1536 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1537 {"return": {}}
1540 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1541 {"return": {}}
1543 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
1544 {"return": {}}
1545 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1547 --- Test Backup #1 ---
1550 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1551 {"return": {}}
1554 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1555 {"return": {}}
1557 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
1558 {"return": {}}
1560 --- Write #2 ---
1562 write -P0x74 0x0010000 0x10000
1563 {"return": ""}
1564 write -P0x69 0x00e8000 0x10000
1565 {"return": ""}
1566 write -P0x6e 0x2018000 0x10000
1567 {"return": ""}
1568 write -P0x67 0x3fe0000 0x20000
1569 {"return": ""}
1571   "bitmaps": {
1572     "drive0": [
1573       {
1574         "busy": false,
1575         "count": 0,
1576         "granularity": 65536,
1577         "persistent": false,
1578         "recording": false,
1579         "status": "disabled"
1580       },
1581       {
1582         "busy": false,
1583         "count": 458752,
1584         "granularity": 65536,
1585         "persistent": false,
1586         "recording": true,
1587         "status": "active"
1588       },
1589       {
1590         "busy": true,
1591         "count": 393216,
1592         "granularity": 65536,
1593         "name": "bitmap0",
1594         "persistent": false,
1595         "recording": true,
1596         "status": "frozen"
1597       }
1598     ]
1599   }
1602 = Checking Bitmap bitmap0 =
1603 expecting 6 dirty sectors; have 6. OK!
1605 = Checking Bitmap (anonymous) =
1606 expecting 7 dirty sectors; have 7. OK!
1608 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
1609 {"return": {}}
1610 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1611 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1613   "bitmaps": {
1614     "drive0": [
1615       {
1616         "busy": false,
1617         "count": 458752,
1618         "granularity": 65536,
1619         "name": "bitmap0",
1620         "persistent": false,
1621         "recording": true,
1622         "status": "active"
1623       }
1624     ]
1625   }
1628 = Checking Bitmap bitmap0 =
1629 expecting 7 dirty sectors; have 7. OK!
1631 --- Write #3 ---
1633 write -P0xaa 0x0010000 0x30000
1634 {"return": ""}
1635 write -P0xbb 0x00d8000 0x10000
1636 {"return": ""}
1637 write -P0xcc 0x2028000 0x10000
1638 {"return": ""}
1639 write -P0xdd 0x3fc0000 0x10000
1640 {"return": ""}
1642   "bitmaps": {
1643     "drive0": [
1644       {
1645         "busy": false,
1646         "count": 786432,
1647         "granularity": 65536,
1648         "name": "bitmap0",
1649         "persistent": false,
1650         "recording": true,
1651         "status": "active"
1652       }
1653     ]
1654   }
1657 = Checking Bitmap bitmap0 =
1658 expecting 12 dirty sectors; have 12. OK!
1660 --- Reference Backup #2 ---
1663 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1664 {"return": {}}
1667 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1668 {"return": {}}
1670 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
1671 {"return": {}}
1672 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1674 --- Test Backup #2 ---
1677 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1678 {"return": {}}
1681 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1682 {"return": {}}
1684 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
1685 {"return": {}}
1686 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
1687 {"return": {}}
1688 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1689 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1691   "bitmaps": {
1692     "drive0": [
1693       {
1694         "busy": false,
1695         "count": 0,
1696         "granularity": 65536,
1697         "name": "bitmap0",
1698         "persistent": false,
1699         "recording": true,
1700         "status": "active"
1701       }
1702     ]
1703   }
1706 = Checking Bitmap bitmap0 =
1707 expecting 0 dirty sectors; have 0. OK!
1709 --- Cleanup ---
1711 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1712 {"return": {}}
1714   "bitmaps": {}
1717 --- Verification ---
1719 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
1720 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1721 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1724 === Mode bitmap; Bitmap Sync always with intermediate failure ===
1726 --- Preparing image & VM ---
1728 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "blkdebug", "image": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "inject-error": [{"errno": 5, "event": "read_aio", "immediately": false, "once": true, "state": 3}], "set-state": [{"event": "flush_to_disk", "new-state": 2, "state": 1}, {"event": "read_aio", "new-state": 3, "state": 2}]}, "node-name": "drive0"}}
1729 {"return": {}}
1731 --- Write #0 ---
1733 write -P0x49 0x0000000 0x10000
1734 {"return": ""}
1735 write -P0x6c 0x0100000 0x10000
1736 {"return": ""}
1737 write -P0x6f 0x2000000 0x10000
1738 {"return": ""}
1739 write -P0x76 0x3ff0000 0x10000
1740 {"return": ""}
1742   "bitmaps": {}
1745 --- Reference Backup #0 ---
1748 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1749 {"return": {}}
1752 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1753 {"return": {}}
1755 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
1756 {"return": {}}
1757 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1759 --- Add Bitmap ---
1761 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1762 {"return": {}}
1764 --- Write #1 ---
1766 write -P0x65 0x0000000 0x10000
1767 {"return": ""}
1768 write -P0x77 0x00f8000 0x10000
1769 {"return": ""}
1770 write -P0x72 0x2008000 0x10000
1771 {"return": ""}
1772 write -P0x69 0x3fe0000 0x10000
1773 {"return": ""}
1775   "bitmaps": {
1776     "drive0": [
1777       {
1778         "busy": false,
1779         "count": 393216,
1780         "granularity": 65536,
1781         "name": "bitmap0",
1782         "persistent": false,
1783         "recording": true,
1784         "status": "active"
1785       }
1786     ]
1787   }
1790 = Checking Bitmap bitmap0 =
1791 expecting 6 dirty sectors; have 6. OK!
1793 --- Reference Backup #1 ---
1796 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1797 {"return": {}}
1800 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1801 {"return": {}}
1803 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
1804 {"return": {}}
1805 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1807 {"return": ""}
1809 --- Test Backup #1 ---
1812 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1813 {"return": {}}
1816 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1817 {"return": {}}
1819 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
1820 {"return": {}}
1821 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1822 {"data": {"device": "backup_1", "error": "Input/output error", "len": 393216, "offset": 65536, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1824   "bitmaps": {
1825     "drive0": [
1826       {
1827         "busy": false,
1828         "count": 327680,
1829         "granularity": 65536,
1830         "name": "bitmap0",
1831         "persistent": false,
1832         "recording": true,
1833         "status": "active"
1834       }
1835     ]
1836   }
1839 = Checking Bitmap bitmap0 =
1840 expecting 5 dirty sectors; have 5. OK!
1842 --- Write #3 ---
1844 write -P0xaa 0x0010000 0x30000
1845 {"return": ""}
1846 write -P0xbb 0x00d8000 0x10000
1847 {"return": ""}
1848 write -P0xcc 0x2028000 0x10000
1849 {"return": ""}
1850 write -P0xdd 0x3fc0000 0x10000
1851 {"return": ""}
1853   "bitmaps": {
1854     "drive0": [
1855       {
1856         "busy": false,
1857         "count": 851968,
1858         "granularity": 65536,
1859         "name": "bitmap0",
1860         "persistent": false,
1861         "recording": true,
1862         "status": "active"
1863       }
1864     ]
1865   }
1868 = Checking Bitmap bitmap0 =
1869 expecting 13 dirty sectors; have 13. OK!
1871 --- Reference Backup #2 ---
1874 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1875 {"return": {}}
1878 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1879 {"return": {}}
1881 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
1882 {"return": {}}
1883 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1885 --- Test Backup #2 ---
1888 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1889 {"return": {}}
1892 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1893 {"return": {}}
1895 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
1896 {"return": {}}
1897 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
1898 {"return": {}}
1899 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1900 {"data": {"device": "backup_2", "len": 851968, "offset": 851968, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1902   "bitmaps": {
1903     "drive0": [
1904       {
1905         "busy": false,
1906         "count": 0,
1907         "granularity": 65536,
1908         "name": "bitmap0",
1909         "persistent": false,
1910         "recording": true,
1911         "status": "active"
1912       }
1913     ]
1914   }
1917 = Checking Bitmap bitmap0 =
1918 expecting 0 dirty sectors; have 0. OK!
1920 --- Cleanup ---
1922 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1923 {"return": {}}
1925   "bitmaps": {}
1928 --- Verification ---
1930 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
1931 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1932 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1935 === Mode bitmap; Bitmap Sync always without failure ===
1937 --- Preparing image & VM ---
1939 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
1940 {"return": {}}
1942 --- Write #0 ---
1944 write -P0x49 0x0000000 0x10000
1945 {"return": ""}
1946 write -P0x6c 0x0100000 0x10000
1947 {"return": ""}
1948 write -P0x6f 0x2000000 0x10000
1949 {"return": ""}
1950 write -P0x76 0x3ff0000 0x10000
1951 {"return": ""}
1953   "bitmaps": {}
1956 --- Reference Backup #0 ---
1959 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1960 {"return": {}}
1963 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1964 {"return": {}}
1966 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
1967 {"return": {}}
1968 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1970 --- Add Bitmap ---
1972 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1973 {"return": {}}
1975 --- Write #1 ---
1977 write -P0x65 0x0000000 0x10000
1978 {"return": ""}
1979 write -P0x77 0x00f8000 0x10000
1980 {"return": ""}
1981 write -P0x72 0x2008000 0x10000
1982 {"return": ""}
1983 write -P0x69 0x3fe0000 0x10000
1984 {"return": ""}
1986   "bitmaps": {
1987     "drive0": [
1988       {
1989         "busy": false,
1990         "count": 393216,
1991         "granularity": 65536,
1992         "name": "bitmap0",
1993         "persistent": false,
1994         "recording": true,
1995         "status": "active"
1996       }
1997     ]
1998   }
2001 = Checking Bitmap bitmap0 =
2002 expecting 6 dirty sectors; have 6. OK!
2004 --- Reference Backup #1 ---
2007 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2008 {"return": {}}
2011 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2012 {"return": {}}
2014 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
2015 {"return": {}}
2016 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2018 --- Test Backup #1 ---
2021 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2022 {"return": {}}
2025 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2026 {"return": {}}
2028 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
2029 {"return": {}}
2031 --- Write #2 ---
2033 write -P0x74 0x0010000 0x10000
2034 {"return": ""}
2035 write -P0x69 0x00e8000 0x10000
2036 {"return": ""}
2037 write -P0x6e 0x2018000 0x10000
2038 {"return": ""}
2039 write -P0x67 0x3fe0000 0x20000
2040 {"return": ""}
2042   "bitmaps": {
2043     "drive0": [
2044       {
2045         "busy": false,
2046         "count": 0,
2047         "granularity": 65536,
2048         "persistent": false,
2049         "recording": false,
2050         "status": "disabled"
2051       },
2052       {
2053         "busy": false,
2054         "count": 458752,
2055         "granularity": 65536,
2056         "persistent": false,
2057         "recording": true,
2058         "status": "active"
2059       },
2060       {
2061         "busy": true,
2062         "count": 393216,
2063         "granularity": 65536,
2064         "name": "bitmap0",
2065         "persistent": false,
2066         "recording": true,
2067         "status": "frozen"
2068       }
2069     ]
2070   }
2073 = Checking Bitmap bitmap0 =
2074 expecting 6 dirty sectors; have 6. OK!
2076 = Checking Bitmap (anonymous) =
2077 expecting 7 dirty sectors; have 7. OK!
2079 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
2080 {"return": {}}
2081 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2082 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2084   "bitmaps": {
2085     "drive0": [
2086       {
2087         "busy": false,
2088         "count": 458752,
2089         "granularity": 65536,
2090         "name": "bitmap0",
2091         "persistent": false,
2092         "recording": true,
2093         "status": "active"
2094       }
2095     ]
2096   }
2099 = Checking Bitmap bitmap0 =
2100 expecting 7 dirty sectors; have 7. OK!
2102 --- Write #3 ---
2104 write -P0xaa 0x0010000 0x30000
2105 {"return": ""}
2106 write -P0xbb 0x00d8000 0x10000
2107 {"return": ""}
2108 write -P0xcc 0x2028000 0x10000
2109 {"return": ""}
2110 write -P0xdd 0x3fc0000 0x10000
2111 {"return": ""}
2113   "bitmaps": {
2114     "drive0": [
2115       {
2116         "busy": false,
2117         "count": 786432,
2118         "granularity": 65536,
2119         "name": "bitmap0",
2120         "persistent": false,
2121         "recording": true,
2122         "status": "active"
2123       }
2124     ]
2125   }
2128 = Checking Bitmap bitmap0 =
2129 expecting 12 dirty sectors; have 12. OK!
2131 --- Reference Backup #2 ---
2134 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2135 {"return": {}}
2138 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2139 {"return": {}}
2141 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
2142 {"return": {}}
2143 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2145 --- Test Backup #2 ---
2148 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2149 {"return": {}}
2152 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2153 {"return": {}}
2155 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
2156 {"return": {}}
2157 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
2158 {"return": {}}
2159 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2160 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2162   "bitmaps": {
2163     "drive0": [
2164       {
2165         "busy": false,
2166         "count": 0,
2167         "granularity": 65536,
2168         "name": "bitmap0",
2169         "persistent": false,
2170         "recording": true,
2171         "status": "active"
2172       }
2173     ]
2174   }
2177 = Checking Bitmap bitmap0 =
2178 expecting 0 dirty sectors; have 0. OK!
2180 --- Cleanup ---
2182 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
2183 {"return": {}}
2185   "bitmaps": {}
2188 --- Verification ---
2190 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
2191 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2192 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2195 === Mode full; Bitmap Sync on-success with simulated failure ===
2197 --- Preparing image & VM ---
2199 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
2200 {"return": {}}
2202 --- Write #0 ---
2204 write -P0x49 0x0000000 0x10000
2205 {"return": ""}
2206 write -P0x6c 0x0100000 0x10000
2207 {"return": ""}
2208 write -P0x6f 0x2000000 0x10000
2209 {"return": ""}
2210 write -P0x76 0x3ff0000 0x10000
2211 {"return": ""}
2213   "bitmaps": {}
2216 --- Reference Backup #0 ---
2219 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2220 {"return": {}}
2223 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2224 {"return": {}}
2226 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
2227 {"return": {}}
2228 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2230 --- Add Bitmap ---
2232 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
2233 {"return": {}}
2235 --- Write #1 ---
2237 write -P0x65 0x0000000 0x10000
2238 {"return": ""}
2239 write -P0x77 0x00f8000 0x10000
2240 {"return": ""}
2241 write -P0x72 0x2008000 0x10000
2242 {"return": ""}
2243 write -P0x69 0x3fe0000 0x10000
2244 {"return": ""}
2246   "bitmaps": {
2247     "drive0": [
2248       {
2249         "busy": false,
2250         "count": 393216,
2251         "granularity": 65536,
2252         "name": "bitmap0",
2253         "persistent": false,
2254         "recording": true,
2255         "status": "active"
2256       }
2257     ]
2258   }
2261 = Checking Bitmap bitmap0 =
2262 expecting 6 dirty sectors; have 6. OK!
2264 --- Reference Backup #1 ---
2267 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2268 {"return": {}}
2271 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2272 {"return": {}}
2274 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
2275 {"return": {}}
2276 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2278 --- Test Backup #1 ---
2281 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2282 {"return": {}}
2285 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2286 {"return": {}}
2288 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "full", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
2289 {"return": {}}
2291 --- Write #2 ---
2293 write -P0x74 0x0010000 0x10000
2294 {"return": ""}
2295 write -P0x69 0x00e8000 0x10000
2296 {"return": ""}
2297 write -P0x6e 0x2018000 0x10000
2298 {"return": ""}
2299 write -P0x67 0x3fe0000 0x20000
2300 {"return": ""}
2302   "bitmaps": {
2303     "drive0": [
2304       {
2305         "busy": false,
2306         "count": 0,
2307         "granularity": 65536,
2308         "persistent": false,
2309         "recording": false,
2310         "status": "disabled"
2311       },
2312       {
2313         "busy": false,
2314         "count": 458752,
2315         "granularity": 65536,
2316         "persistent": false,
2317         "recording": true,
2318         "status": "active"
2319       },
2320       {
2321         "busy": true,
2322         "count": 393216,
2323         "granularity": 65536,
2324         "name": "bitmap0",
2325         "persistent": false,
2326         "recording": true,
2327         "status": "frozen"
2328       }
2329     ]
2330   }
2333 = Checking Bitmap bitmap0 =
2334 expecting 6 dirty sectors; have 6. OK!
2336 = Checking Bitmap (anonymous) =
2337 expecting 7 dirty sectors; have 7. OK!
2339 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
2340 {"return": {}}
2341 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2342 {"data": {"device": "backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2344   "bitmaps": {
2345     "drive0": [
2346       {
2347         "busy": false,
2348         "count": 655360,
2349         "granularity": 65536,
2350         "name": "bitmap0",
2351         "persistent": false,
2352         "recording": true,
2353         "status": "active"
2354       }
2355     ]
2356   }
2359 = Checking Bitmap bitmap0 =
2360 expecting 10 dirty sectors; have 10. OK!
2362 --- Write #3 ---
2364 write -P0xaa 0x0010000 0x30000
2365 {"return": ""}
2366 write -P0xbb 0x00d8000 0x10000
2367 {"return": ""}
2368 write -P0xcc 0x2028000 0x10000
2369 {"return": ""}
2370 write -P0xdd 0x3fc0000 0x10000
2371 {"return": ""}
2373   "bitmaps": {
2374     "drive0": [
2375       {
2376         "busy": false,
2377         "count": 983040,
2378         "granularity": 65536,
2379         "name": "bitmap0",
2380         "persistent": false,
2381         "recording": true,
2382         "status": "active"
2383       }
2384     ]
2385   }
2388 = Checking Bitmap bitmap0 =
2389 expecting 15 dirty sectors; have 15. OK!
2391 --- Reference Backup #2 ---
2394 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2395 {"return": {}}
2398 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2399 {"return": {}}
2401 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
2402 {"return": {}}
2403 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2405 --- Test Backup #2 ---
2408 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2409 {"return": {}}
2412 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2413 {"return": {}}
2415 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
2416 {"return": {}}
2417 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
2418 {"return": {}}
2419 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2420 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2422   "bitmaps": {
2423     "drive0": [
2424       {
2425         "busy": false,
2426         "count": 0,
2427         "granularity": 65536,
2428         "name": "bitmap0",
2429         "persistent": false,
2430         "recording": true,
2431         "status": "active"
2432       }
2433     ]
2434   }
2437 = Checking Bitmap bitmap0 =
2438 expecting 0 dirty sectors; have 0. OK!
2440 --- Cleanup ---
2442 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
2443 {"return": {}}
2445   "bitmaps": {}
2448 --- Verification ---
2450 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
2451 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2452 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2455 === Mode full; Bitmap Sync on-success with intermediate failure ===
2457 --- Preparing image & VM ---
2459 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "blkdebug", "image": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "inject-error": [{"errno": 5, "event": "read_aio", "immediately": false, "once": true, "state": 3}], "set-state": [{"event": "flush_to_disk", "new-state": 2, "state": 1}, {"event": "read_aio", "new-state": 3, "state": 2}]}, "node-name": "drive0"}}
2460 {"return": {}}
2462 --- Write #0 ---
2464 write -P0x49 0x0000000 0x10000
2465 {"return": ""}
2466 write -P0x6c 0x0100000 0x10000
2467 {"return": ""}
2468 write -P0x6f 0x2000000 0x10000
2469 {"return": ""}
2470 write -P0x76 0x3ff0000 0x10000
2471 {"return": ""}
2473   "bitmaps": {}
2476 --- Reference Backup #0 ---
2479 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2480 {"return": {}}
2483 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2484 {"return": {}}
2486 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
2487 {"return": {}}
2488 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2490 --- Add Bitmap ---
2492 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
2493 {"return": {}}
2495 --- Write #1 ---
2497 write -P0x65 0x0000000 0x10000
2498 {"return": ""}
2499 write -P0x77 0x00f8000 0x10000
2500 {"return": ""}
2501 write -P0x72 0x2008000 0x10000
2502 {"return": ""}
2503 write -P0x69 0x3fe0000 0x10000
2504 {"return": ""}
2506   "bitmaps": {
2507     "drive0": [
2508       {
2509         "busy": false,
2510         "count": 393216,
2511         "granularity": 65536,
2512         "name": "bitmap0",
2513         "persistent": false,
2514         "recording": true,
2515         "status": "active"
2516       }
2517     ]
2518   }
2521 = Checking Bitmap bitmap0 =
2522 expecting 6 dirty sectors; have 6. OK!
2524 --- Reference Backup #1 ---
2527 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2528 {"return": {}}
2531 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2532 {"return": {}}
2534 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
2535 {"return": {}}
2536 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2538 {"return": ""}
2540 --- Test Backup #1 ---
2543 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2544 {"return": {}}
2547 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2548 {"return": {}}
2550 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "full", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
2551 {"return": {}}
2552 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2553 {"data": {"device": "backup_1", "error": "Input/output error", "len": 67108864, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2555   "bitmaps": {
2556     "drive0": [
2557       {
2558         "busy": false,
2559         "count": 393216,
2560         "granularity": 65536,
2561         "name": "bitmap0",
2562         "persistent": false,
2563         "recording": true,
2564         "status": "active"
2565       }
2566     ]
2567   }
2570 = Checking Bitmap bitmap0 =
2571 expecting 6 dirty sectors; have 6. OK!
2573 --- Write #3 ---
2575 write -P0xaa 0x0010000 0x30000
2576 {"return": ""}
2577 write -P0xbb 0x00d8000 0x10000
2578 {"return": ""}
2579 write -P0xcc 0x2028000 0x10000
2580 {"return": ""}
2581 write -P0xdd 0x3fc0000 0x10000
2582 {"return": ""}
2584   "bitmaps": {
2585     "drive0": [
2586       {
2587         "busy": false,
2588         "count": 917504,
2589         "granularity": 65536,
2590         "name": "bitmap0",
2591         "persistent": false,
2592         "recording": true,
2593         "status": "active"
2594       }
2595     ]
2596   }
2599 = Checking Bitmap bitmap0 =
2600 expecting 14 dirty sectors; have 14. OK!
2602 --- Reference Backup #2 ---
2605 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2606 {"return": {}}
2609 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2610 {"return": {}}
2612 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
2613 {"return": {}}
2614 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2616 --- Test Backup #2 ---
2619 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2620 {"return": {}}
2623 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2624 {"return": {}}
2626 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
2627 {"return": {}}
2628 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
2629 {"return": {}}
2630 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2631 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2633   "bitmaps": {
2634     "drive0": [
2635       {
2636         "busy": false,
2637         "count": 0,
2638         "granularity": 65536,
2639         "name": "bitmap0",
2640         "persistent": false,
2641         "recording": true,
2642         "status": "active"
2643       }
2644     ]
2645   }
2648 = Checking Bitmap bitmap0 =
2649 expecting 0 dirty sectors; have 0. OK!
2651 --- Cleanup ---
2653 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
2654 {"return": {}}
2656   "bitmaps": {}
2659 --- Verification ---
2661 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
2662 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2663 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2666 === Mode full; Bitmap Sync on-success without failure ===
2668 --- Preparing image & VM ---
2670 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
2671 {"return": {}}
2673 --- Write #0 ---
2675 write -P0x49 0x0000000 0x10000
2676 {"return": ""}
2677 write -P0x6c 0x0100000 0x10000
2678 {"return": ""}
2679 write -P0x6f 0x2000000 0x10000
2680 {"return": ""}
2681 write -P0x76 0x3ff0000 0x10000
2682 {"return": ""}
2684   "bitmaps": {}
2687 --- Reference Backup #0 ---
2690 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2691 {"return": {}}
2694 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2695 {"return": {}}
2697 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
2698 {"return": {}}
2699 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2701 --- Add Bitmap ---
2703 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
2704 {"return": {}}
2706 --- Write #1 ---
2708 write -P0x65 0x0000000 0x10000
2709 {"return": ""}
2710 write -P0x77 0x00f8000 0x10000
2711 {"return": ""}
2712 write -P0x72 0x2008000 0x10000
2713 {"return": ""}
2714 write -P0x69 0x3fe0000 0x10000
2715 {"return": ""}
2717   "bitmaps": {
2718     "drive0": [
2719       {
2720         "busy": false,
2721         "count": 393216,
2722         "granularity": 65536,
2723         "name": "bitmap0",
2724         "persistent": false,
2725         "recording": true,
2726         "status": "active"
2727       }
2728     ]
2729   }
2732 = Checking Bitmap bitmap0 =
2733 expecting 6 dirty sectors; have 6. OK!
2735 --- Reference Backup #1 ---
2738 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2739 {"return": {}}
2742 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2743 {"return": {}}
2745 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
2746 {"return": {}}
2747 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2749 --- Test Backup #1 ---
2752 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2753 {"return": {}}
2756 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2757 {"return": {}}
2759 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "full", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
2760 {"return": {}}
2762 --- Write #2 ---
2764 write -P0x74 0x0010000 0x10000
2765 {"return": ""}
2766 write -P0x69 0x00e8000 0x10000
2767 {"return": ""}
2768 write -P0x6e 0x2018000 0x10000
2769 {"return": ""}
2770 write -P0x67 0x3fe0000 0x20000
2771 {"return": ""}
2773   "bitmaps": {
2774     "drive0": [
2775       {
2776         "busy": false,
2777         "count": 0,
2778         "granularity": 65536,
2779         "persistent": false,
2780         "recording": false,
2781         "status": "disabled"
2782       },
2783       {
2784         "busy": false,
2785         "count": 458752,
2786         "granularity": 65536,
2787         "persistent": false,
2788         "recording": true,
2789         "status": "active"
2790       },
2791       {
2792         "busy": true,
2793         "count": 393216,
2794         "granularity": 65536,
2795         "name": "bitmap0",
2796         "persistent": false,
2797         "recording": true,
2798         "status": "frozen"
2799       }
2800     ]
2801   }
2804 = Checking Bitmap bitmap0 =
2805 expecting 6 dirty sectors; have 6. OK!
2807 = Checking Bitmap (anonymous) =
2808 expecting 7 dirty sectors; have 7. OK!
2810 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
2811 {"return": {}}
2812 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2813 {"data": {"device": "backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2815   "bitmaps": {
2816     "drive0": [
2817       {
2818         "busy": false,
2819         "count": 458752,
2820         "granularity": 65536,
2821         "name": "bitmap0",
2822         "persistent": false,
2823         "recording": true,
2824         "status": "active"
2825       }
2826     ]
2827   }
2830 = Checking Bitmap bitmap0 =
2831 expecting 7 dirty sectors; have 7. OK!
2833 --- Write #3 ---
2835 write -P0xaa 0x0010000 0x30000
2836 {"return": ""}
2837 write -P0xbb 0x00d8000 0x10000
2838 {"return": ""}
2839 write -P0xcc 0x2028000 0x10000
2840 {"return": ""}
2841 write -P0xdd 0x3fc0000 0x10000
2842 {"return": ""}
2844   "bitmaps": {
2845     "drive0": [
2846       {
2847         "busy": false,
2848         "count": 786432,
2849         "granularity": 65536,
2850         "name": "bitmap0",
2851         "persistent": false,
2852         "recording": true,
2853         "status": "active"
2854       }
2855     ]
2856   }
2859 = Checking Bitmap bitmap0 =
2860 expecting 12 dirty sectors; have 12. OK!
2862 --- Reference Backup #2 ---
2865 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2866 {"return": {}}
2869 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2870 {"return": {}}
2872 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
2873 {"return": {}}
2874 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2876 --- Test Backup #2 ---
2879 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2880 {"return": {}}
2883 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2884 {"return": {}}
2886 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
2887 {"return": {}}
2888 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
2889 {"return": {}}
2890 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2891 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2893   "bitmaps": {
2894     "drive0": [
2895       {
2896         "busy": false,
2897         "count": 0,
2898         "granularity": 65536,
2899         "name": "bitmap0",
2900         "persistent": false,
2901         "recording": true,
2902         "status": "active"
2903       }
2904     ]
2905   }
2908 = Checking Bitmap bitmap0 =
2909 expecting 0 dirty sectors; have 0. OK!
2911 --- Cleanup ---
2913 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
2914 {"return": {}}
2916   "bitmaps": {}
2919 --- Verification ---
2921 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
2922 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2923 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2926 === Mode full; Bitmap Sync always with simulated failure ===
2928 --- Preparing image & VM ---
2930 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
2931 {"return": {}}
2933 --- Write #0 ---
2935 write -P0x49 0x0000000 0x10000
2936 {"return": ""}
2937 write -P0x6c 0x0100000 0x10000
2938 {"return": ""}
2939 write -P0x6f 0x2000000 0x10000
2940 {"return": ""}
2941 write -P0x76 0x3ff0000 0x10000
2942 {"return": ""}
2944   "bitmaps": {}
2947 --- Reference Backup #0 ---
2950 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2951 {"return": {}}
2954 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2955 {"return": {}}
2957 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
2958 {"return": {}}
2959 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2961 --- Add Bitmap ---
2963 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
2964 {"return": {}}
2966 --- Write #1 ---
2968 write -P0x65 0x0000000 0x10000
2969 {"return": ""}
2970 write -P0x77 0x00f8000 0x10000
2971 {"return": ""}
2972 write -P0x72 0x2008000 0x10000
2973 {"return": ""}
2974 write -P0x69 0x3fe0000 0x10000
2975 {"return": ""}
2977   "bitmaps": {
2978     "drive0": [
2979       {
2980         "busy": false,
2981         "count": 393216,
2982         "granularity": 65536,
2983         "name": "bitmap0",
2984         "persistent": false,
2985         "recording": true,
2986         "status": "active"
2987       }
2988     ]
2989   }
2992 = Checking Bitmap bitmap0 =
2993 expecting 6 dirty sectors; have 6. OK!
2995 --- Reference Backup #1 ---
2998 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2999 {"return": {}}
3002 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3003 {"return": {}}
3005 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
3006 {"return": {}}
3007 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3009 --- Test Backup #1 ---
3012 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3013 {"return": {}}
3016 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3017 {"return": {}}
3019 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "full", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
3020 {"return": {}}
3022 --- Write #2 ---
3024 write -P0x74 0x0010000 0x10000
3025 {"return": ""}
3026 write -P0x69 0x00e8000 0x10000
3027 {"return": ""}
3028 write -P0x6e 0x2018000 0x10000
3029 {"return": ""}
3030 write -P0x67 0x3fe0000 0x20000
3031 {"return": ""}
3033   "bitmaps": {
3034     "drive0": [
3035       {
3036         "busy": false,
3037         "count": 0,
3038         "granularity": 65536,
3039         "persistent": false,
3040         "recording": false,
3041         "status": "disabled"
3042       },
3043       {
3044         "busy": false,
3045         "count": 458752,
3046         "granularity": 65536,
3047         "persistent": false,
3048         "recording": true,
3049         "status": "active"
3050       },
3051       {
3052         "busy": true,
3053         "count": 393216,
3054         "granularity": 65536,
3055         "name": "bitmap0",
3056         "persistent": false,
3057         "recording": true,
3058         "status": "frozen"
3059       }
3060     ]
3061   }
3064 = Checking Bitmap bitmap0 =
3065 expecting 6 dirty sectors; have 6. OK!
3067 = Checking Bitmap (anonymous) =
3068 expecting 7 dirty sectors; have 7. OK!
3070 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
3071 {"return": {}}
3072 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3073 {"data": {"device": "backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3075   "bitmaps": {
3076     "drive0": [
3077       {
3078         "busy": false,
3079         "count": 458752,
3080         "granularity": 65536,
3081         "name": "bitmap0",
3082         "persistent": false,
3083         "recording": true,
3084         "status": "active"
3085       }
3086     ]
3087   }
3090 = Checking Bitmap bitmap0 =
3091 expecting 7 dirty sectors; have 7. OK!
3093 --- Write #3 ---
3095 write -P0xaa 0x0010000 0x30000
3096 {"return": ""}
3097 write -P0xbb 0x00d8000 0x10000
3098 {"return": ""}
3099 write -P0xcc 0x2028000 0x10000
3100 {"return": ""}
3101 write -P0xdd 0x3fc0000 0x10000
3102 {"return": ""}
3104   "bitmaps": {
3105     "drive0": [
3106       {
3107         "busy": false,
3108         "count": 786432,
3109         "granularity": 65536,
3110         "name": "bitmap0",
3111         "persistent": false,
3112         "recording": true,
3113         "status": "active"
3114       }
3115     ]
3116   }
3119 = Checking Bitmap bitmap0 =
3120 expecting 12 dirty sectors; have 12. OK!
3122 --- Reference Backup #2 ---
3125 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3126 {"return": {}}
3129 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3130 {"return": {}}
3132 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
3133 {"return": {}}
3134 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3136 --- Test Backup #2 ---
3139 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3140 {"return": {}}
3143 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3144 {"return": {}}
3146 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
3147 {"return": {}}
3148 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3149 {"return": {}}
3150 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3151 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3153   "bitmaps": {
3154     "drive0": [
3155       {
3156         "busy": false,
3157         "count": 0,
3158         "granularity": 65536,
3159         "name": "bitmap0",
3160         "persistent": false,
3161         "recording": true,
3162         "status": "active"
3163       }
3164     ]
3165   }
3168 = Checking Bitmap bitmap0 =
3169 expecting 0 dirty sectors; have 0. OK!
3171 --- Cleanup ---
3173 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
3174 {"return": {}}
3176   "bitmaps": {}
3179 --- Verification ---
3181 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
3182 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3183 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3186 === Mode full; Bitmap Sync always with intermediate failure ===
3188 --- Preparing image & VM ---
3190 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "blkdebug", "image": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "inject-error": [{"errno": 5, "event": "read_aio", "immediately": false, "once": true, "state": 3}], "set-state": [{"event": "flush_to_disk", "new-state": 2, "state": 1}, {"event": "read_aio", "new-state": 3, "state": 2}]}, "node-name": "drive0"}}
3191 {"return": {}}
3193 --- Write #0 ---
3195 write -P0x49 0x0000000 0x10000
3196 {"return": ""}
3197 write -P0x6c 0x0100000 0x10000
3198 {"return": ""}
3199 write -P0x6f 0x2000000 0x10000
3200 {"return": ""}
3201 write -P0x76 0x3ff0000 0x10000
3202 {"return": ""}
3204   "bitmaps": {}
3207 --- Reference Backup #0 ---
3210 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3211 {"return": {}}
3214 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3215 {"return": {}}
3217 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
3218 {"return": {}}
3219 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3221 --- Add Bitmap ---
3223 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
3224 {"return": {}}
3226 --- Write #1 ---
3228 write -P0x65 0x0000000 0x10000
3229 {"return": ""}
3230 write -P0x77 0x00f8000 0x10000
3231 {"return": ""}
3232 write -P0x72 0x2008000 0x10000
3233 {"return": ""}
3234 write -P0x69 0x3fe0000 0x10000
3235 {"return": ""}
3237   "bitmaps": {
3238     "drive0": [
3239       {
3240         "busy": false,
3241         "count": 393216,
3242         "granularity": 65536,
3243         "name": "bitmap0",
3244         "persistent": false,
3245         "recording": true,
3246         "status": "active"
3247       }
3248     ]
3249   }
3252 = Checking Bitmap bitmap0 =
3253 expecting 6 dirty sectors; have 6. OK!
3255 --- Reference Backup #1 ---
3258 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3259 {"return": {}}
3262 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3263 {"return": {}}
3265 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
3266 {"return": {}}
3267 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3269 {"return": ""}
3271 --- Test Backup #1 ---
3274 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3275 {"return": {}}
3278 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3279 {"return": {}}
3281 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "full", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
3282 {"return": {}}
3283 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3284 {"data": {"device": "backup_1", "error": "Input/output error", "len": 67108864, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3286   "bitmaps": {
3287     "drive0": [
3288       {
3289         "busy": false,
3290         "count": 66125824,
3291         "granularity": 65536,
3292         "name": "bitmap0",
3293         "persistent": false,
3294         "recording": true,
3295         "status": "active"
3296       }
3297     ]
3298   }
3301 = Checking Bitmap bitmap0 =
3302 expecting 1009 dirty sectors; have 1009. OK!
3304 --- Write #3 ---
3306 write -P0xaa 0x0010000 0x30000
3307 {"return": ""}
3308 write -P0xbb 0x00d8000 0x10000
3309 {"return": ""}
3310 write -P0xcc 0x2028000 0x10000
3311 {"return": ""}
3312 write -P0xdd 0x3fc0000 0x10000
3313 {"return": ""}
3315   "bitmaps": {
3316     "drive0": [
3317       {
3318         "busy": false,
3319         "count": 66453504,
3320         "granularity": 65536,
3321         "name": "bitmap0",
3322         "persistent": false,
3323         "recording": true,
3324         "status": "active"
3325       }
3326     ]
3327   }
3330 = Checking Bitmap bitmap0 =
3331 expecting 1014 dirty sectors; have 1014. OK!
3333 --- Reference Backup #2 ---
3336 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3337 {"return": {}}
3340 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3341 {"return": {}}
3343 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
3344 {"return": {}}
3345 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3347 --- Test Backup #2 ---
3350 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3351 {"return": {}}
3354 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3355 {"return": {}}
3357 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
3358 {"return": {}}
3359 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3360 {"return": {}}
3361 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3362 {"data": {"device": "backup_2", "len": 66453504, "offset": 66453504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3364   "bitmaps": {
3365     "drive0": [
3366       {
3367         "busy": false,
3368         "count": 0,
3369         "granularity": 65536,
3370         "name": "bitmap0",
3371         "persistent": false,
3372         "recording": true,
3373         "status": "active"
3374       }
3375     ]
3376   }
3379 = Checking Bitmap bitmap0 =
3380 expecting 0 dirty sectors; have 0. OK!
3382 --- Cleanup ---
3384 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
3385 {"return": {}}
3387   "bitmaps": {}
3390 --- Verification ---
3392 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
3393 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3394 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3397 === Mode full; Bitmap Sync always without failure ===
3399 --- Preparing image & VM ---
3401 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
3402 {"return": {}}
3404 --- Write #0 ---
3406 write -P0x49 0x0000000 0x10000
3407 {"return": ""}
3408 write -P0x6c 0x0100000 0x10000
3409 {"return": ""}
3410 write -P0x6f 0x2000000 0x10000
3411 {"return": ""}
3412 write -P0x76 0x3ff0000 0x10000
3413 {"return": ""}
3415   "bitmaps": {}
3418 --- Reference Backup #0 ---
3421 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3422 {"return": {}}
3425 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3426 {"return": {}}
3428 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
3429 {"return": {}}
3430 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3432 --- Add Bitmap ---
3434 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
3435 {"return": {}}
3437 --- Write #1 ---
3439 write -P0x65 0x0000000 0x10000
3440 {"return": ""}
3441 write -P0x77 0x00f8000 0x10000
3442 {"return": ""}
3443 write -P0x72 0x2008000 0x10000
3444 {"return": ""}
3445 write -P0x69 0x3fe0000 0x10000
3446 {"return": ""}
3448   "bitmaps": {
3449     "drive0": [
3450       {
3451         "busy": false,
3452         "count": 393216,
3453         "granularity": 65536,
3454         "name": "bitmap0",
3455         "persistent": false,
3456         "recording": true,
3457         "status": "active"
3458       }
3459     ]
3460   }
3463 = Checking Bitmap bitmap0 =
3464 expecting 6 dirty sectors; have 6. OK!
3466 --- Reference Backup #1 ---
3469 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3470 {"return": {}}
3473 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3474 {"return": {}}
3476 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
3477 {"return": {}}
3478 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3480 --- Test Backup #1 ---
3483 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3484 {"return": {}}
3487 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3488 {"return": {}}
3490 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "full", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
3491 {"return": {}}
3493 --- Write #2 ---
3495 write -P0x74 0x0010000 0x10000
3496 {"return": ""}
3497 write -P0x69 0x00e8000 0x10000
3498 {"return": ""}
3499 write -P0x6e 0x2018000 0x10000
3500 {"return": ""}
3501 write -P0x67 0x3fe0000 0x20000
3502 {"return": ""}
3504   "bitmaps": {
3505     "drive0": [
3506       {
3507         "busy": false,
3508         "count": 0,
3509         "granularity": 65536,
3510         "persistent": false,
3511         "recording": false,
3512         "status": "disabled"
3513       },
3514       {
3515         "busy": false,
3516         "count": 458752,
3517         "granularity": 65536,
3518         "persistent": false,
3519         "recording": true,
3520         "status": "active"
3521       },
3522       {
3523         "busy": true,
3524         "count": 393216,
3525         "granularity": 65536,
3526         "name": "bitmap0",
3527         "persistent": false,
3528         "recording": true,
3529         "status": "frozen"
3530       }
3531     ]
3532   }
3535 = Checking Bitmap bitmap0 =
3536 expecting 6 dirty sectors; have 6. OK!
3538 = Checking Bitmap (anonymous) =
3539 expecting 7 dirty sectors; have 7. OK!
3541 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
3542 {"return": {}}
3543 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3544 {"data": {"device": "backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3546   "bitmaps": {
3547     "drive0": [
3548       {
3549         "busy": false,
3550         "count": 458752,
3551         "granularity": 65536,
3552         "name": "bitmap0",
3553         "persistent": false,
3554         "recording": true,
3555         "status": "active"
3556       }
3557     ]
3558   }
3561 = Checking Bitmap bitmap0 =
3562 expecting 7 dirty sectors; have 7. OK!
3564 --- Write #3 ---
3566 write -P0xaa 0x0010000 0x30000
3567 {"return": ""}
3568 write -P0xbb 0x00d8000 0x10000
3569 {"return": ""}
3570 write -P0xcc 0x2028000 0x10000
3571 {"return": ""}
3572 write -P0xdd 0x3fc0000 0x10000
3573 {"return": ""}
3575   "bitmaps": {
3576     "drive0": [
3577       {
3578         "busy": false,
3579         "count": 786432,
3580         "granularity": 65536,
3581         "name": "bitmap0",
3582         "persistent": false,
3583         "recording": true,
3584         "status": "active"
3585       }
3586     ]
3587   }
3590 = Checking Bitmap bitmap0 =
3591 expecting 12 dirty sectors; have 12. OK!
3593 --- Reference Backup #2 ---
3596 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3597 {"return": {}}
3600 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3601 {"return": {}}
3603 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
3604 {"return": {}}
3605 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3607 --- Test Backup #2 ---
3610 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3611 {"return": {}}
3614 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3615 {"return": {}}
3617 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
3618 {"return": {}}
3619 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3620 {"return": {}}
3621 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3622 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3624   "bitmaps": {
3625     "drive0": [
3626       {
3627         "busy": false,
3628         "count": 0,
3629         "granularity": 65536,
3630         "name": "bitmap0",
3631         "persistent": false,
3632         "recording": true,
3633         "status": "active"
3634       }
3635     ]
3636   }
3639 = Checking Bitmap bitmap0 =
3640 expecting 0 dirty sectors; have 0. OK!
3642 --- Cleanup ---
3644 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
3645 {"return": {}}
3647   "bitmaps": {}
3650 --- Verification ---
3652 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
3653 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3654 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3657 === Mode top; Bitmap Sync on-success with simulated failure ===
3659 --- Preparing image & VM ---
3661 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
3662 {"return": {}}
3664 --- Write #0 ---
3666 write -P0x49 0x0000000 0x10000
3667 {"return": ""}
3668 write -P0x6c 0x0100000 0x10000
3669 {"return": ""}
3670 write -P0x6f 0x2000000 0x10000
3671 {"return": ""}
3672 write -P0x76 0x3ff0000 0x10000
3673 {"return": ""}
3675   "bitmaps": {}
3678 --- Reference Backup #0 ---
3681 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3682 {"return": {}}
3685 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3686 {"return": {}}
3688 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
3689 {"return": {}}
3690 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3692 --- Add Bitmap ---
3694 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
3695 {"return": {}}
3697 --- Write #1 ---
3699 write -P0x65 0x0000000 0x10000
3700 {"return": ""}
3701 write -P0x77 0x00f8000 0x10000
3702 {"return": ""}
3703 write -P0x72 0x2008000 0x10000
3704 {"return": ""}
3705 write -P0x69 0x3fe0000 0x10000
3706 {"return": ""}
3708   "bitmaps": {
3709     "drive0": [
3710       {
3711         "busy": false,
3712         "count": 393216,
3713         "granularity": 65536,
3714         "name": "bitmap0",
3715         "persistent": false,
3716         "recording": true,
3717         "status": "active"
3718       }
3719     ]
3720   }
3723 = Checking Bitmap bitmap0 =
3724 expecting 6 dirty sectors; have 6. OK!
3726 --- Reference Backup #1 ---
3729 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3730 {"return": {}}
3733 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3734 {"return": {}}
3736 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
3737 {"return": {}}
3738 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3740 --- Test Backup #1 ---
3743 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3744 {"return": {}}
3747 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3748 {"return": {}}
3750 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "top", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
3751 {"return": {}}
3753 --- Write #2 ---
3755 write -P0x74 0x0010000 0x10000
3756 {"return": ""}
3757 write -P0x69 0x00e8000 0x10000
3758 {"return": ""}
3759 write -P0x6e 0x2018000 0x10000
3760 {"return": ""}
3761 write -P0x67 0x3fe0000 0x20000
3762 {"return": ""}
3764   "bitmaps": {
3765     "drive0": [
3766       {
3767         "busy": false,
3768         "count": 0,
3769         "granularity": 65536,
3770         "persistent": false,
3771         "recording": false,
3772         "status": "disabled"
3773       },
3774       {
3775         "busy": false,
3776         "count": 458752,
3777         "granularity": 65536,
3778         "persistent": false,
3779         "recording": true,
3780         "status": "active"
3781       },
3782       {
3783         "busy": true,
3784         "count": 393216,
3785         "granularity": 65536,
3786         "name": "bitmap0",
3787         "persistent": false,
3788         "recording": true,
3789         "status": "frozen"
3790       }
3791     ]
3792   }
3795 = Checking Bitmap bitmap0 =
3796 expecting 6 dirty sectors; have 6. OK!
3798 = Checking Bitmap (anonymous) =
3799 expecting 7 dirty sectors; have 7. OK!
3801 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
3802 {"return": {}}
3803 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3804 {"data": {"device": "backup_1", "len": 458752, "offset": 458752, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3806   "bitmaps": {
3807     "drive0": [
3808       {
3809         "busy": false,
3810         "count": 655360,
3811         "granularity": 65536,
3812         "name": "bitmap0",
3813         "persistent": false,
3814         "recording": true,
3815         "status": "active"
3816       }
3817     ]
3818   }
3821 = Checking Bitmap bitmap0 =
3822 expecting 10 dirty sectors; have 10. OK!
3824 --- Write #3 ---
3826 write -P0xaa 0x0010000 0x30000
3827 {"return": ""}
3828 write -P0xbb 0x00d8000 0x10000
3829 {"return": ""}
3830 write -P0xcc 0x2028000 0x10000
3831 {"return": ""}
3832 write -P0xdd 0x3fc0000 0x10000
3833 {"return": ""}
3835   "bitmaps": {
3836     "drive0": [
3837       {
3838         "busy": false,
3839         "count": 983040,
3840         "granularity": 65536,
3841         "name": "bitmap0",
3842         "persistent": false,
3843         "recording": true,
3844         "status": "active"
3845       }
3846     ]
3847   }
3850 = Checking Bitmap bitmap0 =
3851 expecting 15 dirty sectors; have 15. OK!
3853 --- Reference Backup #2 ---
3856 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3857 {"return": {}}
3860 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3861 {"return": {}}
3863 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
3864 {"return": {}}
3865 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3867 --- Test Backup #2 ---
3870 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3871 {"return": {}}
3874 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3875 {"return": {}}
3877 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
3878 {"return": {}}
3879 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3880 {"return": {}}
3881 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3882 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3884   "bitmaps": {
3885     "drive0": [
3886       {
3887         "busy": false,
3888         "count": 0,
3889         "granularity": 65536,
3890         "name": "bitmap0",
3891         "persistent": false,
3892         "recording": true,
3893         "status": "active"
3894       }
3895     ]
3896   }
3899 = Checking Bitmap bitmap0 =
3900 expecting 0 dirty sectors; have 0. OK!
3902 --- Cleanup ---
3904 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
3905 {"return": {}}
3907   "bitmaps": {}
3910 --- Verification ---
3912 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
3913 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3914 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3917 === Mode top; Bitmap Sync on-success with intermediate failure ===
3919 --- Preparing image & VM ---
3921 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "blkdebug", "image": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "inject-error": [{"errno": 5, "event": "read_aio", "immediately": false, "once": true, "state": 3}], "set-state": [{"event": "flush_to_disk", "new-state": 2, "state": 1}, {"event": "read_aio", "new-state": 3, "state": 2}]}, "node-name": "drive0"}}
3922 {"return": {}}
3924 --- Write #0 ---
3926 write -P0x49 0x0000000 0x10000
3927 {"return": ""}
3928 write -P0x6c 0x0100000 0x10000
3929 {"return": ""}
3930 write -P0x6f 0x2000000 0x10000
3931 {"return": ""}
3932 write -P0x76 0x3ff0000 0x10000
3933 {"return": ""}
3935   "bitmaps": {}
3938 --- Reference Backup #0 ---
3941 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3942 {"return": {}}
3945 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3946 {"return": {}}
3948 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
3949 {"return": {}}
3950 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3952 --- Add Bitmap ---
3954 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
3955 {"return": {}}
3957 --- Write #1 ---
3959 write -P0x65 0x0000000 0x10000
3960 {"return": ""}
3961 write -P0x77 0x00f8000 0x10000
3962 {"return": ""}
3963 write -P0x72 0x2008000 0x10000
3964 {"return": ""}
3965 write -P0x69 0x3fe0000 0x10000
3966 {"return": ""}
3968   "bitmaps": {
3969     "drive0": [
3970       {
3971         "busy": false,
3972         "count": 393216,
3973         "granularity": 65536,
3974         "name": "bitmap0",
3975         "persistent": false,
3976         "recording": true,
3977         "status": "active"
3978       }
3979     ]
3980   }
3983 = Checking Bitmap bitmap0 =
3984 expecting 6 dirty sectors; have 6. OK!
3986 --- Reference Backup #1 ---
3989 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3990 {"return": {}}
3993 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3994 {"return": {}}
3996 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
3997 {"return": {}}
3998 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4000 {"return": ""}
4002 --- Test Backup #1 ---
4005 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4006 {"return": {}}
4009 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4010 {"return": {}}
4012 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "top", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
4013 {"return": {}}
4014 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4015 {"data": {"device": "backup_1", "error": "Input/output error", "len": 458752, "offset": 65536, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4017   "bitmaps": {
4018     "drive0": [
4019       {
4020         "busy": false,
4021         "count": 393216,
4022         "granularity": 65536,
4023         "name": "bitmap0",
4024         "persistent": false,
4025         "recording": true,
4026         "status": "active"
4027       }
4028     ]
4029   }
4032 = Checking Bitmap bitmap0 =
4033 expecting 6 dirty sectors; have 6. OK!
4035 --- Write #3 ---
4037 write -P0xaa 0x0010000 0x30000
4038 {"return": ""}
4039 write -P0xbb 0x00d8000 0x10000
4040 {"return": ""}
4041 write -P0xcc 0x2028000 0x10000
4042 {"return": ""}
4043 write -P0xdd 0x3fc0000 0x10000
4044 {"return": ""}
4046   "bitmaps": {
4047     "drive0": [
4048       {
4049         "busy": false,
4050         "count": 917504,
4051         "granularity": 65536,
4052         "name": "bitmap0",
4053         "persistent": false,
4054         "recording": true,
4055         "status": "active"
4056       }
4057     ]
4058   }
4061 = Checking Bitmap bitmap0 =
4062 expecting 14 dirty sectors; have 14. OK!
4064 --- Reference Backup #2 ---
4067 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4068 {"return": {}}
4071 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4072 {"return": {}}
4074 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
4075 {"return": {}}
4076 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4078 --- Test Backup #2 ---
4081 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4082 {"return": {}}
4085 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4086 {"return": {}}
4088 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
4089 {"return": {}}
4090 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
4091 {"return": {}}
4092 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4093 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4095   "bitmaps": {
4096     "drive0": [
4097       {
4098         "busy": false,
4099         "count": 0,
4100         "granularity": 65536,
4101         "name": "bitmap0",
4102         "persistent": false,
4103         "recording": true,
4104         "status": "active"
4105       }
4106     ]
4107   }
4110 = Checking Bitmap bitmap0 =
4111 expecting 0 dirty sectors; have 0. OK!
4113 --- Cleanup ---
4115 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4116 {"return": {}}
4118   "bitmaps": {}
4121 --- Verification ---
4123 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
4124 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4125 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4128 === Mode top; Bitmap Sync on-success without failure ===
4130 --- Preparing image & VM ---
4132 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
4133 {"return": {}}
4135 --- Write #0 ---
4137 write -P0x49 0x0000000 0x10000
4138 {"return": ""}
4139 write -P0x6c 0x0100000 0x10000
4140 {"return": ""}
4141 write -P0x6f 0x2000000 0x10000
4142 {"return": ""}
4143 write -P0x76 0x3ff0000 0x10000
4144 {"return": ""}
4146   "bitmaps": {}
4149 --- Reference Backup #0 ---
4152 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4153 {"return": {}}
4156 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4157 {"return": {}}
4159 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
4160 {"return": {}}
4161 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4163 --- Add Bitmap ---
4165 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4166 {"return": {}}
4168 --- Write #1 ---
4170 write -P0x65 0x0000000 0x10000
4171 {"return": ""}
4172 write -P0x77 0x00f8000 0x10000
4173 {"return": ""}
4174 write -P0x72 0x2008000 0x10000
4175 {"return": ""}
4176 write -P0x69 0x3fe0000 0x10000
4177 {"return": ""}
4179   "bitmaps": {
4180     "drive0": [
4181       {
4182         "busy": false,
4183         "count": 393216,
4184         "granularity": 65536,
4185         "name": "bitmap0",
4186         "persistent": false,
4187         "recording": true,
4188         "status": "active"
4189       }
4190     ]
4191   }
4194 = Checking Bitmap bitmap0 =
4195 expecting 6 dirty sectors; have 6. OK!
4197 --- Reference Backup #1 ---
4200 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4201 {"return": {}}
4204 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4205 {"return": {}}
4207 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
4208 {"return": {}}
4209 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4211 --- Test Backup #1 ---
4214 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4215 {"return": {}}
4218 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4219 {"return": {}}
4221 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "top", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
4222 {"return": {}}
4224 --- Write #2 ---
4226 write -P0x74 0x0010000 0x10000
4227 {"return": ""}
4228 write -P0x69 0x00e8000 0x10000
4229 {"return": ""}
4230 write -P0x6e 0x2018000 0x10000
4231 {"return": ""}
4232 write -P0x67 0x3fe0000 0x20000
4233 {"return": ""}
4235   "bitmaps": {
4236     "drive0": [
4237       {
4238         "busy": false,
4239         "count": 0,
4240         "granularity": 65536,
4241         "persistent": false,
4242         "recording": false,
4243         "status": "disabled"
4244       },
4245       {
4246         "busy": false,
4247         "count": 458752,
4248         "granularity": 65536,
4249         "persistent": false,
4250         "recording": true,
4251         "status": "active"
4252       },
4253       {
4254         "busy": true,
4255         "count": 393216,
4256         "granularity": 65536,
4257         "name": "bitmap0",
4258         "persistent": false,
4259         "recording": true,
4260         "status": "frozen"
4261       }
4262     ]
4263   }
4266 = Checking Bitmap bitmap0 =
4267 expecting 6 dirty sectors; have 6. OK!
4269 = Checking Bitmap (anonymous) =
4270 expecting 7 dirty sectors; have 7. OK!
4272 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
4273 {"return": {}}
4274 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4275 {"data": {"device": "backup_1", "len": 458752, "offset": 458752, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4277   "bitmaps": {
4278     "drive0": [
4279       {
4280         "busy": false,
4281         "count": 458752,
4282         "granularity": 65536,
4283         "name": "bitmap0",
4284         "persistent": false,
4285         "recording": true,
4286         "status": "active"
4287       }
4288     ]
4289   }
4292 = Checking Bitmap bitmap0 =
4293 expecting 7 dirty sectors; have 7. OK!
4295 --- Write #3 ---
4297 write -P0xaa 0x0010000 0x30000
4298 {"return": ""}
4299 write -P0xbb 0x00d8000 0x10000
4300 {"return": ""}
4301 write -P0xcc 0x2028000 0x10000
4302 {"return": ""}
4303 write -P0xdd 0x3fc0000 0x10000
4304 {"return": ""}
4306   "bitmaps": {
4307     "drive0": [
4308       {
4309         "busy": false,
4310         "count": 786432,
4311         "granularity": 65536,
4312         "name": "bitmap0",
4313         "persistent": false,
4314         "recording": true,
4315         "status": "active"
4316       }
4317     ]
4318   }
4321 = Checking Bitmap bitmap0 =
4322 expecting 12 dirty sectors; have 12. OK!
4324 --- Reference Backup #2 ---
4327 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4328 {"return": {}}
4331 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4332 {"return": {}}
4334 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
4335 {"return": {}}
4336 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4338 --- Test Backup #2 ---
4341 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4342 {"return": {}}
4345 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4346 {"return": {}}
4348 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
4349 {"return": {}}
4350 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
4351 {"return": {}}
4352 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4353 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4355   "bitmaps": {
4356     "drive0": [
4357       {
4358         "busy": false,
4359         "count": 0,
4360         "granularity": 65536,
4361         "name": "bitmap0",
4362         "persistent": false,
4363         "recording": true,
4364         "status": "active"
4365       }
4366     ]
4367   }
4370 = Checking Bitmap bitmap0 =
4371 expecting 0 dirty sectors; have 0. OK!
4373 --- Cleanup ---
4375 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4376 {"return": {}}
4378   "bitmaps": {}
4381 --- Verification ---
4383 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
4384 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4385 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4388 === Mode top; Bitmap Sync always with simulated failure ===
4390 --- Preparing image & VM ---
4392 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
4393 {"return": {}}
4395 --- Write #0 ---
4397 write -P0x49 0x0000000 0x10000
4398 {"return": ""}
4399 write -P0x6c 0x0100000 0x10000
4400 {"return": ""}
4401 write -P0x6f 0x2000000 0x10000
4402 {"return": ""}
4403 write -P0x76 0x3ff0000 0x10000
4404 {"return": ""}
4406   "bitmaps": {}
4409 --- Reference Backup #0 ---
4412 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4413 {"return": {}}
4416 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4417 {"return": {}}
4419 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
4420 {"return": {}}
4421 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4423 --- Add Bitmap ---
4425 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4426 {"return": {}}
4428 --- Write #1 ---
4430 write -P0x65 0x0000000 0x10000
4431 {"return": ""}
4432 write -P0x77 0x00f8000 0x10000
4433 {"return": ""}
4434 write -P0x72 0x2008000 0x10000
4435 {"return": ""}
4436 write -P0x69 0x3fe0000 0x10000
4437 {"return": ""}
4439   "bitmaps": {
4440     "drive0": [
4441       {
4442         "busy": false,
4443         "count": 393216,
4444         "granularity": 65536,
4445         "name": "bitmap0",
4446         "persistent": false,
4447         "recording": true,
4448         "status": "active"
4449       }
4450     ]
4451   }
4454 = Checking Bitmap bitmap0 =
4455 expecting 6 dirty sectors; have 6. OK!
4457 --- Reference Backup #1 ---
4460 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4461 {"return": {}}
4464 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4465 {"return": {}}
4467 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
4468 {"return": {}}
4469 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4471 --- Test Backup #1 ---
4474 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4475 {"return": {}}
4478 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4479 {"return": {}}
4481 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "top", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
4482 {"return": {}}
4484 --- Write #2 ---
4486 write -P0x74 0x0010000 0x10000
4487 {"return": ""}
4488 write -P0x69 0x00e8000 0x10000
4489 {"return": ""}
4490 write -P0x6e 0x2018000 0x10000
4491 {"return": ""}
4492 write -P0x67 0x3fe0000 0x20000
4493 {"return": ""}
4495   "bitmaps": {
4496     "drive0": [
4497       {
4498         "busy": false,
4499         "count": 0,
4500         "granularity": 65536,
4501         "persistent": false,
4502         "recording": false,
4503         "status": "disabled"
4504       },
4505       {
4506         "busy": false,
4507         "count": 458752,
4508         "granularity": 65536,
4509         "persistent": false,
4510         "recording": true,
4511         "status": "active"
4512       },
4513       {
4514         "busy": true,
4515         "count": 393216,
4516         "granularity": 65536,
4517         "name": "bitmap0",
4518         "persistent": false,
4519         "recording": true,
4520         "status": "frozen"
4521       }
4522     ]
4523   }
4526 = Checking Bitmap bitmap0 =
4527 expecting 6 dirty sectors; have 6. OK!
4529 = Checking Bitmap (anonymous) =
4530 expecting 7 dirty sectors; have 7. OK!
4532 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
4533 {"return": {}}
4534 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4535 {"data": {"device": "backup_1", "len": 458752, "offset": 458752, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4537   "bitmaps": {
4538     "drive0": [
4539       {
4540         "busy": false,
4541         "count": 458752,
4542         "granularity": 65536,
4543         "name": "bitmap0",
4544         "persistent": false,
4545         "recording": true,
4546         "status": "active"
4547       }
4548     ]
4549   }
4552 = Checking Bitmap bitmap0 =
4553 expecting 7 dirty sectors; have 7. OK!
4555 --- Write #3 ---
4557 write -P0xaa 0x0010000 0x30000
4558 {"return": ""}
4559 write -P0xbb 0x00d8000 0x10000
4560 {"return": ""}
4561 write -P0xcc 0x2028000 0x10000
4562 {"return": ""}
4563 write -P0xdd 0x3fc0000 0x10000
4564 {"return": ""}
4566   "bitmaps": {
4567     "drive0": [
4568       {
4569         "busy": false,
4570         "count": 786432,
4571         "granularity": 65536,
4572         "name": "bitmap0",
4573         "persistent": false,
4574         "recording": true,
4575         "status": "active"
4576       }
4577     ]
4578   }
4581 = Checking Bitmap bitmap0 =
4582 expecting 12 dirty sectors; have 12. OK!
4584 --- Reference Backup #2 ---
4587 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4588 {"return": {}}
4591 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4592 {"return": {}}
4594 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
4595 {"return": {}}
4596 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4598 --- Test Backup #2 ---
4601 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4602 {"return": {}}
4605 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4606 {"return": {}}
4608 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
4609 {"return": {}}
4610 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
4611 {"return": {}}
4612 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4613 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4615   "bitmaps": {
4616     "drive0": [
4617       {
4618         "busy": false,
4619         "count": 0,
4620         "granularity": 65536,
4621         "name": "bitmap0",
4622         "persistent": false,
4623         "recording": true,
4624         "status": "active"
4625       }
4626     ]
4627   }
4630 = Checking Bitmap bitmap0 =
4631 expecting 0 dirty sectors; have 0. OK!
4633 --- Cleanup ---
4635 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4636 {"return": {}}
4638   "bitmaps": {}
4641 --- Verification ---
4643 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
4644 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4645 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4648 === Mode top; Bitmap Sync always with intermediate failure ===
4650 --- Preparing image & VM ---
4652 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "blkdebug", "image": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "inject-error": [{"errno": 5, "event": "read_aio", "immediately": false, "once": true, "state": 3}], "set-state": [{"event": "flush_to_disk", "new-state": 2, "state": 1}, {"event": "read_aio", "new-state": 3, "state": 2}]}, "node-name": "drive0"}}
4653 {"return": {}}
4655 --- Write #0 ---
4657 write -P0x49 0x0000000 0x10000
4658 {"return": ""}
4659 write -P0x6c 0x0100000 0x10000
4660 {"return": ""}
4661 write -P0x6f 0x2000000 0x10000
4662 {"return": ""}
4663 write -P0x76 0x3ff0000 0x10000
4664 {"return": ""}
4666   "bitmaps": {}
4669 --- Reference Backup #0 ---
4672 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4673 {"return": {}}
4676 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4677 {"return": {}}
4679 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
4680 {"return": {}}
4681 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4683 --- Add Bitmap ---
4685 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4686 {"return": {}}
4688 --- Write #1 ---
4690 write -P0x65 0x0000000 0x10000
4691 {"return": ""}
4692 write -P0x77 0x00f8000 0x10000
4693 {"return": ""}
4694 write -P0x72 0x2008000 0x10000
4695 {"return": ""}
4696 write -P0x69 0x3fe0000 0x10000
4697 {"return": ""}
4699   "bitmaps": {
4700     "drive0": [
4701       {
4702         "busy": false,
4703         "count": 393216,
4704         "granularity": 65536,
4705         "name": "bitmap0",
4706         "persistent": false,
4707         "recording": true,
4708         "status": "active"
4709       }
4710     ]
4711   }
4714 = Checking Bitmap bitmap0 =
4715 expecting 6 dirty sectors; have 6. OK!
4717 --- Reference Backup #1 ---
4720 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4721 {"return": {}}
4724 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4725 {"return": {}}
4727 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
4728 {"return": {}}
4729 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4731 {"return": ""}
4733 --- Test Backup #1 ---
4736 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4737 {"return": {}}
4740 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4741 {"return": {}}
4743 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "top", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
4744 {"return": {}}
4745 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4746 {"data": {"device": "backup_1", "error": "Input/output error", "len": 458752, "offset": 65536, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4748   "bitmaps": {
4749     "drive0": [
4750       {
4751         "busy": false,
4752         "count": 393216,
4753         "granularity": 65536,
4754         "name": "bitmap0",
4755         "persistent": false,
4756         "recording": true,
4757         "status": "active"
4758       }
4759     ]
4760   }
4763 = Checking Bitmap bitmap0 =
4764 expecting 6 dirty sectors; have 6. OK!
4766 --- Write #3 ---
4768 write -P0xaa 0x0010000 0x30000
4769 {"return": ""}
4770 write -P0xbb 0x00d8000 0x10000
4771 {"return": ""}
4772 write -P0xcc 0x2028000 0x10000
4773 {"return": ""}
4774 write -P0xdd 0x3fc0000 0x10000
4775 {"return": ""}
4777   "bitmaps": {
4778     "drive0": [
4779       {
4780         "busy": false,
4781         "count": 917504,
4782         "granularity": 65536,
4783         "name": "bitmap0",
4784         "persistent": false,
4785         "recording": true,
4786         "status": "active"
4787       }
4788     ]
4789   }
4792 = Checking Bitmap bitmap0 =
4793 expecting 14 dirty sectors; have 14. OK!
4795 --- Reference Backup #2 ---
4798 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4799 {"return": {}}
4802 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4803 {"return": {}}
4805 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
4806 {"return": {}}
4807 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4809 --- Test Backup #2 ---
4812 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4813 {"return": {}}
4816 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4817 {"return": {}}
4819 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
4820 {"return": {}}
4821 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
4822 {"return": {}}
4823 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4824 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4826   "bitmaps": {
4827     "drive0": [
4828       {
4829         "busy": false,
4830         "count": 0,
4831         "granularity": 65536,
4832         "name": "bitmap0",
4833         "persistent": false,
4834         "recording": true,
4835         "status": "active"
4836       }
4837     ]
4838   }
4841 = Checking Bitmap bitmap0 =
4842 expecting 0 dirty sectors; have 0. OK!
4844 --- Cleanup ---
4846 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4847 {"return": {}}
4849   "bitmaps": {}
4852 --- Verification ---
4854 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
4855 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4856 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4859 === Mode top; Bitmap Sync always without failure ===
4861 --- Preparing image & VM ---
4863 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
4864 {"return": {}}
4866 --- Write #0 ---
4868 write -P0x49 0x0000000 0x10000
4869 {"return": ""}
4870 write -P0x6c 0x0100000 0x10000
4871 {"return": ""}
4872 write -P0x6f 0x2000000 0x10000
4873 {"return": ""}
4874 write -P0x76 0x3ff0000 0x10000
4875 {"return": ""}
4877   "bitmaps": {}
4880 --- Reference Backup #0 ---
4883 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4884 {"return": {}}
4887 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4888 {"return": {}}
4890 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
4891 {"return": {}}
4892 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4894 --- Add Bitmap ---
4896 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4897 {"return": {}}
4899 --- Write #1 ---
4901 write -P0x65 0x0000000 0x10000
4902 {"return": ""}
4903 write -P0x77 0x00f8000 0x10000
4904 {"return": ""}
4905 write -P0x72 0x2008000 0x10000
4906 {"return": ""}
4907 write -P0x69 0x3fe0000 0x10000
4908 {"return": ""}
4910   "bitmaps": {
4911     "drive0": [
4912       {
4913         "busy": false,
4914         "count": 393216,
4915         "granularity": 65536,
4916         "name": "bitmap0",
4917         "persistent": false,
4918         "recording": true,
4919         "status": "active"
4920       }
4921     ]
4922   }
4925 = Checking Bitmap bitmap0 =
4926 expecting 6 dirty sectors; have 6. OK!
4928 --- Reference Backup #1 ---
4931 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4932 {"return": {}}
4935 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4936 {"return": {}}
4938 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
4939 {"return": {}}
4940 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4942 --- Test Backup #1 ---
4945 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4946 {"return": {}}
4949 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4950 {"return": {}}
4952 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_1", "sync": "top", "target": "backup_target_1", "x-perf": {"max-workers": 1}}}
4953 {"return": {}}
4955 --- Write #2 ---
4957 write -P0x74 0x0010000 0x10000
4958 {"return": ""}
4959 write -P0x69 0x00e8000 0x10000
4960 {"return": ""}
4961 write -P0x6e 0x2018000 0x10000
4962 {"return": ""}
4963 write -P0x67 0x3fe0000 0x20000
4964 {"return": ""}
4966   "bitmaps": {
4967     "drive0": [
4968       {
4969         "busy": false,
4970         "count": 0,
4971         "granularity": 65536,
4972         "persistent": false,
4973         "recording": false,
4974         "status": "disabled"
4975       },
4976       {
4977         "busy": false,
4978         "count": 458752,
4979         "granularity": 65536,
4980         "persistent": false,
4981         "recording": true,
4982         "status": "active"
4983       },
4984       {
4985         "busy": true,
4986         "count": 393216,
4987         "granularity": 65536,
4988         "name": "bitmap0",
4989         "persistent": false,
4990         "recording": true,
4991         "status": "frozen"
4992       }
4993     ]
4994   }
4997 = Checking Bitmap bitmap0 =
4998 expecting 6 dirty sectors; have 6. OK!
5000 = Checking Bitmap (anonymous) =
5001 expecting 7 dirty sectors; have 7. OK!
5003 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
5004 {"return": {}}
5005 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
5006 {"data": {"device": "backup_1", "len": 458752, "offset": 458752, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
5008   "bitmaps": {
5009     "drive0": [
5010       {
5011         "busy": false,
5012         "count": 458752,
5013         "granularity": 65536,
5014         "name": "bitmap0",
5015         "persistent": false,
5016         "recording": true,
5017         "status": "active"
5018       }
5019     ]
5020   }
5023 = Checking Bitmap bitmap0 =
5024 expecting 7 dirty sectors; have 7. OK!
5026 --- Write #3 ---
5028 write -P0xaa 0x0010000 0x30000
5029 {"return": ""}
5030 write -P0xbb 0x00d8000 0x10000
5031 {"return": ""}
5032 write -P0xcc 0x2028000 0x10000
5033 {"return": ""}
5034 write -P0xdd 0x3fc0000 0x10000
5035 {"return": ""}
5037   "bitmaps": {
5038     "drive0": [
5039       {
5040         "busy": false,
5041         "count": 786432,
5042         "granularity": 65536,
5043         "name": "bitmap0",
5044         "persistent": false,
5045         "recording": true,
5046         "status": "active"
5047       }
5048     ]
5049   }
5052 = Checking Bitmap bitmap0 =
5053 expecting 12 dirty sectors; have 12. OK!
5055 --- Reference Backup #2 ---
5058 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
5059 {"return": {}}
5062 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
5063 {"return": {}}
5065 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
5066 {"return": {}}
5067 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
5069 --- Test Backup #2 ---
5072 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
5073 {"return": {}}
5076 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
5077 {"return": {}}
5079 {"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backup_target_2", "x-perf": {"max-workers": 1}}}
5080 {"return": {}}
5081 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
5082 {"return": {}}
5083 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
5084 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
5086   "bitmaps": {
5087     "drive0": [
5088       {
5089         "busy": false,
5090         "count": 0,
5091         "granularity": 65536,
5092         "name": "bitmap0",
5093         "persistent": false,
5094         "recording": true,
5095         "status": "active"
5096       }
5097     ]
5098   }
5101 = Checking Bitmap bitmap0 =
5102 expecting 0 dirty sectors; have 0. OK!
5104 --- Cleanup ---
5106 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
5107 {"return": {}}
5109   "bitmaps": {}
5112 --- Verification ---
5114 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
5115 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
5116 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
5119 === API failure tests ===
5121 --- Preparing image & VM ---
5123 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
5124 {"return": {}}
5127 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
5128 {"return": {}}
5131 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
5132 {"return": {}}
5135 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
5136 {"return": {}}
5138 -- Testing invalid QMP commands --
5140 -- Sync mode incremental tests --
5142 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "incremental", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5143 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'incremental' sync mode"}}
5145 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "incremental", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5146 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'incremental' sync mode"}}
5148 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "incremental", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5149 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'incremental' sync mode"}}
5151 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "incremental", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5152 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'incremental' sync mode"}}
5154 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "incremental", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5155 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5157 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "incremental", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5158 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-success' when using sync mode 'incremental'"}}
5160 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "incremental", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5161 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-success' when using sync mode 'incremental'"}}
5163 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "incremental", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5164 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5166 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "incremental", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5167 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-success' when using sync mode 'incremental'"}}
5169 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "incremental", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5170 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-success' when using sync mode 'incremental'"}}
5172 -- Sync mode bitmap tests --
5174 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "bitmap", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5175 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'bitmap' sync mode"}}
5177 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "bitmap", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5178 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'bitmap' sync mode"}}
5180 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "bitmap", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5181 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'bitmap' sync mode"}}
5183 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "bitmap", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5184 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'bitmap' sync mode"}}
5186 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "bitmap", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5187 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5189 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "bitmap", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5190 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5192 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "bitmap", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5193 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5195 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "bitmap", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5196 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5198 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "bitmap", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5199 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be given when providing a bitmap"}}
5201 -- Sync mode full tests --
5203 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "full", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5204 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5206 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "full", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5207 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5209 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "full", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5210 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5212 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "full", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5213 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5215 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "full", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5216 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5218 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "full", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5219 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5221 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "full", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5222 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5224 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "full", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5225 {"error": {"class": "GenericError", "desc": "Bitmap sync mode 'never' has no meaningful effect when combined with sync mode 'full'"}}
5227 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "full", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5228 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be given when providing a bitmap"}}
5230 -- Sync mode top tests --
5232 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "top", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5233 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5235 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "top", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5236 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5238 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "top", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5239 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5241 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "top", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5242 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5244 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "top", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5245 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5247 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "top", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5248 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5250 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "top", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5251 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5253 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "top", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5254 {"error": {"class": "GenericError", "desc": "Bitmap sync mode 'never' has no meaningful effect when combined with sync mode 'top'"}}
5256 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "top", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5257 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be given when providing a bitmap"}}
5259 -- Sync mode none tests --
5261 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "none", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5262 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5264 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "none", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5265 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5267 {"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "none", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5268 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5270 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "none", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5271 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5273 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "none", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5274 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5276 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "none", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5277 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5279 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "none", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5280 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5282 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "none", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5283 {"error": {"class": "GenericError", "desc": "sync mode 'none' does not produce meaningful bitmap outputs"}}
5285 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "none", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5286 {"error": {"class": "GenericError", "desc": "sync mode 'none' does not produce meaningful bitmap outputs"}}
5288 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "none", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5289 {"error": {"class": "GenericError", "desc": "sync mode 'none' does not produce meaningful bitmap outputs"}}
5291 {"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": "none", "target": "backup_target", "x-perf": {"max-workers": 1}}}
5292 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be given when providing a bitmap"}}