target/mips: Use an exception for semihosting
[qemu/kevin.git] / tests / qemu-iotests / 257.out
blobaa76131ca91b91c6ab6bdda82b3bd5991131bfd6
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       }
63     ]
64   }
67 = Checking Bitmap bitmap0 =
68 expecting 6 dirty sectors; have 6. OK!
70 --- Reference Backup #1 ---
73 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
74 {"return": {}}
77 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
78 {"return": {}}
80 {"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}}}
81 {"return": {}}
82 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
84 --- Test Backup #1 ---
87 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
88 {"return": {}}
91 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
92 {"return": {}}
94 {"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}}}
95 {"return": {}}
97 --- Write #2 ---
99 write -P0x74 0x0010000 0x10000
100 {"return": ""}
101 write -P0x69 0x00e8000 0x10000
102 {"return": ""}
103 write -P0x6e 0x2018000 0x10000
104 {"return": ""}
105 write -P0x67 0x3fe0000 0x20000
106 {"return": ""}
108   "bitmaps": {
109     "backup-top": [
110       {
111         "busy": false,
112         "count": 67108864,
113         "granularity": 65536,
114         "persistent": false,
115         "recording": false
116       },
117       {
118         "busy": false,
119         "count": 458752,
120         "granularity": 65536,
121         "persistent": false,
122         "recording": false
123       }
124     ],
125     "drive0": [
126       {
127         "busy": false,
128         "count": 0,
129         "granularity": 65536,
130         "persistent": false,
131         "recording": false
132       },
133       {
134         "busy": false,
135         "count": 458752,
136         "granularity": 65536,
137         "persistent": false,
138         "recording": true
139       },
140       {
141         "busy": true,
142         "count": 393216,
143         "granularity": 65536,
144         "name": "bitmap0",
145         "persistent": false,
146         "recording": true
147       }
148     ]
149   }
152 = Checking Bitmap bitmap0 =
153 expecting 6 dirty sectors; have 6. OK!
155 = Checking Bitmap (anonymous) =
156 expecting 7 dirty sectors; have 7. OK!
158 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
159 {"return": {}}
160 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
161 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
163   "bitmaps": {
164     "drive0": [
165       {
166         "busy": false,
167         "count": 655360,
168         "granularity": 65536,
169         "name": "bitmap0",
170         "persistent": false,
171         "recording": true
172       }
173     ]
174   }
177 = Checking Bitmap bitmap0 =
178 expecting 10 dirty sectors; have 10. OK!
180 --- Write #3 ---
182 write -P0xaa 0x0010000 0x30000
183 {"return": ""}
184 write -P0xbb 0x00d8000 0x10000
185 {"return": ""}
186 write -P0xcc 0x2028000 0x10000
187 {"return": ""}
188 write -P0xdd 0x3fc0000 0x10000
189 {"return": ""}
191   "bitmaps": {
192     "drive0": [
193       {
194         "busy": false,
195         "count": 983040,
196         "granularity": 65536,
197         "name": "bitmap0",
198         "persistent": false,
199         "recording": true
200       }
201     ]
202   }
205 = Checking Bitmap bitmap0 =
206 expecting 15 dirty sectors; have 15. OK!
208 --- Reference Backup #2 ---
211 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
212 {"return": {}}
215 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
216 {"return": {}}
218 {"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}}}
219 {"return": {}}
220 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
222 --- Test Backup #2 ---
225 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
226 {"return": {}}
229 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
230 {"return": {}}
232 {"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}}}
233 {"return": {}}
234 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
235 {"return": {}}
236 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
237 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
239   "bitmaps": {
240     "drive0": [
241       {
242         "busy": false,
243         "count": 983040,
244         "granularity": 65536,
245         "name": "bitmap0",
246         "persistent": false,
247         "recording": true
248       }
249     ]
250   }
253 = Checking Bitmap bitmap0 =
254 expecting 15 dirty sectors; have 15. OK!
256 --- Cleanup ---
258 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
259 {"return": {}}
261   "bitmaps": {}
264 --- Verification ---
266 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
267 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
268 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
271 === Mode bitmap; Bitmap Sync never with intermediate failure ===
273 --- Preparing image & VM ---
275 {"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"}}
276 {"return": {}}
278 --- Write #0 ---
280 write -P0x49 0x0000000 0x10000
281 {"return": ""}
282 write -P0x6c 0x0100000 0x10000
283 {"return": ""}
284 write -P0x6f 0x2000000 0x10000
285 {"return": ""}
286 write -P0x76 0x3ff0000 0x10000
287 {"return": ""}
289   "bitmaps": {}
292 --- Reference Backup #0 ---
295 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
296 {"return": {}}
299 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
300 {"return": {}}
302 {"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}}}
303 {"return": {}}
304 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
306 --- Add Bitmap ---
308 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
309 {"return": {}}
311 --- Write #1 ---
313 write -P0x65 0x0000000 0x10000
314 {"return": ""}
315 write -P0x77 0x00f8000 0x10000
316 {"return": ""}
317 write -P0x72 0x2008000 0x10000
318 {"return": ""}
319 write -P0x69 0x3fe0000 0x10000
320 {"return": ""}
322   "bitmaps": {
323     "drive0": [
324       {
325         "busy": false,
326         "count": 393216,
327         "granularity": 65536,
328         "name": "bitmap0",
329         "persistent": false,
330         "recording": true
331       }
332     ]
333   }
336 = Checking Bitmap bitmap0 =
337 expecting 6 dirty sectors; have 6. OK!
339 --- Reference Backup #1 ---
342 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
343 {"return": {}}
346 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
347 {"return": {}}
349 {"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}}}
350 {"return": {}}
351 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
353 {"return": ""}
355 --- Test Backup #1 ---
358 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
359 {"return": {}}
362 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
363 {"return": {}}
365 {"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}}}
366 {"return": {}}
367 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
368 {"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"}}
370   "bitmaps": {
371     "drive0": [
372       {
373         "busy": false,
374         "count": 393216,
375         "granularity": 65536,
376         "name": "bitmap0",
377         "persistent": false,
378         "recording": true
379       }
380     ]
381   }
384 = Checking Bitmap bitmap0 =
385 expecting 6 dirty sectors; have 6. OK!
387 --- Write #3 ---
389 write -P0xaa 0x0010000 0x30000
390 {"return": ""}
391 write -P0xbb 0x00d8000 0x10000
392 {"return": ""}
393 write -P0xcc 0x2028000 0x10000
394 {"return": ""}
395 write -P0xdd 0x3fc0000 0x10000
396 {"return": ""}
398   "bitmaps": {
399     "drive0": [
400       {
401         "busy": false,
402         "count": 917504,
403         "granularity": 65536,
404         "name": "bitmap0",
405         "persistent": false,
406         "recording": true
407       }
408     ]
409   }
412 = Checking Bitmap bitmap0 =
413 expecting 14 dirty sectors; have 14. OK!
415 --- Reference Backup #2 ---
418 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
419 {"return": {}}
422 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
423 {"return": {}}
425 {"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}}}
426 {"return": {}}
427 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
429 --- Test Backup #2 ---
432 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
433 {"return": {}}
436 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
437 {"return": {}}
439 {"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}}}
440 {"return": {}}
441 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
442 {"return": {}}
443 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
444 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
446   "bitmaps": {
447     "drive0": [
448       {
449         "busy": false,
450         "count": 917504,
451         "granularity": 65536,
452         "name": "bitmap0",
453         "persistent": false,
454         "recording": true
455       }
456     ]
457   }
460 = Checking Bitmap bitmap0 =
461 expecting 14 dirty sectors; have 14. OK!
463 --- Cleanup ---
465 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
466 {"return": {}}
468   "bitmaps": {}
471 --- Verification ---
473 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
474 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
475 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
478 === Mode bitmap; Bitmap Sync never without failure ===
480 --- Preparing image & VM ---
482 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
483 {"return": {}}
485 --- Write #0 ---
487 write -P0x49 0x0000000 0x10000
488 {"return": ""}
489 write -P0x6c 0x0100000 0x10000
490 {"return": ""}
491 write -P0x6f 0x2000000 0x10000
492 {"return": ""}
493 write -P0x76 0x3ff0000 0x10000
494 {"return": ""}
496   "bitmaps": {}
499 --- Reference Backup #0 ---
502 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
503 {"return": {}}
506 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
507 {"return": {}}
509 {"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}}}
510 {"return": {}}
511 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
513 --- Add Bitmap ---
515 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
516 {"return": {}}
518 --- Write #1 ---
520 write -P0x65 0x0000000 0x10000
521 {"return": ""}
522 write -P0x77 0x00f8000 0x10000
523 {"return": ""}
524 write -P0x72 0x2008000 0x10000
525 {"return": ""}
526 write -P0x69 0x3fe0000 0x10000
527 {"return": ""}
529   "bitmaps": {
530     "drive0": [
531       {
532         "busy": false,
533         "count": 393216,
534         "granularity": 65536,
535         "name": "bitmap0",
536         "persistent": false,
537         "recording": true
538       }
539     ]
540   }
543 = Checking Bitmap bitmap0 =
544 expecting 6 dirty sectors; have 6. OK!
546 --- Reference Backup #1 ---
549 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
550 {"return": {}}
553 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
554 {"return": {}}
556 {"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}}}
557 {"return": {}}
558 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
560 --- Test Backup #1 ---
563 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
564 {"return": {}}
567 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
568 {"return": {}}
570 {"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}}}
571 {"return": {}}
573 --- Write #2 ---
575 write -P0x74 0x0010000 0x10000
576 {"return": ""}
577 write -P0x69 0x00e8000 0x10000
578 {"return": ""}
579 write -P0x6e 0x2018000 0x10000
580 {"return": ""}
581 write -P0x67 0x3fe0000 0x20000
582 {"return": ""}
584   "bitmaps": {
585     "backup-top": [
586       {
587         "busy": false,
588         "count": 67108864,
589         "granularity": 65536,
590         "persistent": false,
591         "recording": false
592       },
593       {
594         "busy": false,
595         "count": 458752,
596         "granularity": 65536,
597         "persistent": false,
598         "recording": false
599       }
600     ],
601     "drive0": [
602       {
603         "busy": false,
604         "count": 0,
605         "granularity": 65536,
606         "persistent": false,
607         "recording": false
608       },
609       {
610         "busy": false,
611         "count": 458752,
612         "granularity": 65536,
613         "persistent": false,
614         "recording": true
615       },
616       {
617         "busy": true,
618         "count": 393216,
619         "granularity": 65536,
620         "name": "bitmap0",
621         "persistent": false,
622         "recording": true
623       }
624     ]
625   }
628 = Checking Bitmap bitmap0 =
629 expecting 6 dirty sectors; have 6. OK!
631 = Checking Bitmap (anonymous) =
632 expecting 7 dirty sectors; have 7. OK!
634 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
635 {"return": {}}
636 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
637 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
639   "bitmaps": {
640     "drive0": [
641       {
642         "busy": false,
643         "count": 655360,
644         "granularity": 65536,
645         "name": "bitmap0",
646         "persistent": false,
647         "recording": true
648       }
649     ]
650   }
653 = Checking Bitmap bitmap0 =
654 expecting 10 dirty sectors; have 10. OK!
656 --- Write #3 ---
658 write -P0xaa 0x0010000 0x30000
659 {"return": ""}
660 write -P0xbb 0x00d8000 0x10000
661 {"return": ""}
662 write -P0xcc 0x2028000 0x10000
663 {"return": ""}
664 write -P0xdd 0x3fc0000 0x10000
665 {"return": ""}
667   "bitmaps": {
668     "drive0": [
669       {
670         "busy": false,
671         "count": 983040,
672         "granularity": 65536,
673         "name": "bitmap0",
674         "persistent": false,
675         "recording": true
676       }
677     ]
678   }
681 = Checking Bitmap bitmap0 =
682 expecting 15 dirty sectors; have 15. OK!
684 --- Reference Backup #2 ---
687 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
688 {"return": {}}
691 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
692 {"return": {}}
694 {"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}}}
695 {"return": {}}
696 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
698 --- Test Backup #2 ---
701 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
702 {"return": {}}
705 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
706 {"return": {}}
708 {"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}}}
709 {"return": {}}
710 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
711 {"return": {}}
712 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
713 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
715   "bitmaps": {
716     "drive0": [
717       {
718         "busy": false,
719         "count": 983040,
720         "granularity": 65536,
721         "name": "bitmap0",
722         "persistent": false,
723         "recording": true
724       }
725     ]
726   }
729 = Checking Bitmap bitmap0 =
730 expecting 15 dirty sectors; have 15. OK!
732 --- Cleanup ---
734 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
735 {"return": {}}
737   "bitmaps": {}
740 --- Verification ---
742 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
743 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
744 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
747 === Mode bitmap; Bitmap Sync on-success with simulated failure ===
749 --- Preparing image & VM ---
751 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
752 {"return": {}}
754 --- Write #0 ---
756 write -P0x49 0x0000000 0x10000
757 {"return": ""}
758 write -P0x6c 0x0100000 0x10000
759 {"return": ""}
760 write -P0x6f 0x2000000 0x10000
761 {"return": ""}
762 write -P0x76 0x3ff0000 0x10000
763 {"return": ""}
765   "bitmaps": {}
768 --- Reference Backup #0 ---
771 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
772 {"return": {}}
775 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
776 {"return": {}}
778 {"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}}}
779 {"return": {}}
780 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
782 --- Add Bitmap ---
784 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
785 {"return": {}}
787 --- Write #1 ---
789 write -P0x65 0x0000000 0x10000
790 {"return": ""}
791 write -P0x77 0x00f8000 0x10000
792 {"return": ""}
793 write -P0x72 0x2008000 0x10000
794 {"return": ""}
795 write -P0x69 0x3fe0000 0x10000
796 {"return": ""}
798   "bitmaps": {
799     "drive0": [
800       {
801         "busy": false,
802         "count": 393216,
803         "granularity": 65536,
804         "name": "bitmap0",
805         "persistent": false,
806         "recording": true
807       }
808     ]
809   }
812 = Checking Bitmap bitmap0 =
813 expecting 6 dirty sectors; have 6. OK!
815 --- Reference Backup #1 ---
818 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
819 {"return": {}}
822 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
823 {"return": {}}
825 {"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}}}
826 {"return": {}}
827 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
829 --- Test Backup #1 ---
832 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
833 {"return": {}}
836 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
837 {"return": {}}
839 {"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}}}
840 {"return": {}}
842 --- Write #2 ---
844 write -P0x74 0x0010000 0x10000
845 {"return": ""}
846 write -P0x69 0x00e8000 0x10000
847 {"return": ""}
848 write -P0x6e 0x2018000 0x10000
849 {"return": ""}
850 write -P0x67 0x3fe0000 0x20000
851 {"return": ""}
853   "bitmaps": {
854     "backup-top": [
855       {
856         "busy": false,
857         "count": 67108864,
858         "granularity": 65536,
859         "persistent": false,
860         "recording": false
861       },
862       {
863         "busy": false,
864         "count": 458752,
865         "granularity": 65536,
866         "persistent": false,
867         "recording": false
868       }
869     ],
870     "drive0": [
871       {
872         "busy": false,
873         "count": 0,
874         "granularity": 65536,
875         "persistent": false,
876         "recording": false
877       },
878       {
879         "busy": false,
880         "count": 458752,
881         "granularity": 65536,
882         "persistent": false,
883         "recording": true
884       },
885       {
886         "busy": true,
887         "count": 393216,
888         "granularity": 65536,
889         "name": "bitmap0",
890         "persistent": false,
891         "recording": true
892       }
893     ]
894   }
897 = Checking Bitmap bitmap0 =
898 expecting 6 dirty sectors; have 6. OK!
900 = Checking Bitmap (anonymous) =
901 expecting 7 dirty sectors; have 7. OK!
903 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
904 {"return": {}}
905 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
906 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
908   "bitmaps": {
909     "drive0": [
910       {
911         "busy": false,
912         "count": 655360,
913         "granularity": 65536,
914         "name": "bitmap0",
915         "persistent": false,
916         "recording": true
917       }
918     ]
919   }
922 = Checking Bitmap bitmap0 =
923 expecting 10 dirty sectors; have 10. OK!
925 --- Write #3 ---
927 write -P0xaa 0x0010000 0x30000
928 {"return": ""}
929 write -P0xbb 0x00d8000 0x10000
930 {"return": ""}
931 write -P0xcc 0x2028000 0x10000
932 {"return": ""}
933 write -P0xdd 0x3fc0000 0x10000
934 {"return": ""}
936   "bitmaps": {
937     "drive0": [
938       {
939         "busy": false,
940         "count": 983040,
941         "granularity": 65536,
942         "name": "bitmap0",
943         "persistent": false,
944         "recording": true
945       }
946     ]
947   }
950 = Checking Bitmap bitmap0 =
951 expecting 15 dirty sectors; have 15. OK!
953 --- Reference Backup #2 ---
956 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
957 {"return": {}}
960 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
961 {"return": {}}
963 {"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}}}
964 {"return": {}}
965 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
967 --- Test Backup #2 ---
970 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
971 {"return": {}}
974 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
975 {"return": {}}
977 {"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}}}
978 {"return": {}}
979 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
980 {"return": {}}
981 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
982 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
984   "bitmaps": {
985     "drive0": [
986       {
987         "busy": false,
988         "count": 0,
989         "granularity": 65536,
990         "name": "bitmap0",
991         "persistent": false,
992         "recording": true
993       }
994     ]
995   }
998 = Checking Bitmap bitmap0 =
999 expecting 0 dirty sectors; have 0. OK!
1001 --- Cleanup ---
1003 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1004 {"return": {}}
1006   "bitmaps": {}
1009 --- Verification ---
1011 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
1012 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1013 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1016 === Mode bitmap; Bitmap Sync on-success with intermediate failure ===
1018 --- Preparing image & VM ---
1020 {"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"}}
1021 {"return": {}}
1023 --- Write #0 ---
1025 write -P0x49 0x0000000 0x10000
1026 {"return": ""}
1027 write -P0x6c 0x0100000 0x10000
1028 {"return": ""}
1029 write -P0x6f 0x2000000 0x10000
1030 {"return": ""}
1031 write -P0x76 0x3ff0000 0x10000
1032 {"return": ""}
1034   "bitmaps": {}
1037 --- Reference Backup #0 ---
1040 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1041 {"return": {}}
1044 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1045 {"return": {}}
1047 {"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}}}
1048 {"return": {}}
1049 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1051 --- Add Bitmap ---
1053 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1054 {"return": {}}
1056 --- Write #1 ---
1058 write -P0x65 0x0000000 0x10000
1059 {"return": ""}
1060 write -P0x77 0x00f8000 0x10000
1061 {"return": ""}
1062 write -P0x72 0x2008000 0x10000
1063 {"return": ""}
1064 write -P0x69 0x3fe0000 0x10000
1065 {"return": ""}
1067   "bitmaps": {
1068     "drive0": [
1069       {
1070         "busy": false,
1071         "count": 393216,
1072         "granularity": 65536,
1073         "name": "bitmap0",
1074         "persistent": false,
1075         "recording": true
1076       }
1077     ]
1078   }
1081 = Checking Bitmap bitmap0 =
1082 expecting 6 dirty sectors; have 6. OK!
1084 --- Reference Backup #1 ---
1087 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1088 {"return": {}}
1091 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1092 {"return": {}}
1094 {"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}}}
1095 {"return": {}}
1096 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1098 {"return": ""}
1100 --- Test Backup #1 ---
1103 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1104 {"return": {}}
1107 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1108 {"return": {}}
1110 {"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}}}
1111 {"return": {}}
1112 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1113 {"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"}}
1115   "bitmaps": {
1116     "drive0": [
1117       {
1118         "busy": false,
1119         "count": 393216,
1120         "granularity": 65536,
1121         "name": "bitmap0",
1122         "persistent": false,
1123         "recording": true
1124       }
1125     ]
1126   }
1129 = Checking Bitmap bitmap0 =
1130 expecting 6 dirty sectors; have 6. OK!
1132 --- Write #3 ---
1134 write -P0xaa 0x0010000 0x30000
1135 {"return": ""}
1136 write -P0xbb 0x00d8000 0x10000
1137 {"return": ""}
1138 write -P0xcc 0x2028000 0x10000
1139 {"return": ""}
1140 write -P0xdd 0x3fc0000 0x10000
1141 {"return": ""}
1143   "bitmaps": {
1144     "drive0": [
1145       {
1146         "busy": false,
1147         "count": 917504,
1148         "granularity": 65536,
1149         "name": "bitmap0",
1150         "persistent": false,
1151         "recording": true
1152       }
1153     ]
1154   }
1157 = Checking Bitmap bitmap0 =
1158 expecting 14 dirty sectors; have 14. OK!
1160 --- Reference Backup #2 ---
1163 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1164 {"return": {}}
1167 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1168 {"return": {}}
1170 {"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}}}
1171 {"return": {}}
1172 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1174 --- Test Backup #2 ---
1177 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1178 {"return": {}}
1181 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1182 {"return": {}}
1184 {"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}}}
1185 {"return": {}}
1186 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
1187 {"return": {}}
1188 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1189 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1191   "bitmaps": {
1192     "drive0": [
1193       {
1194         "busy": false,
1195         "count": 0,
1196         "granularity": 65536,
1197         "name": "bitmap0",
1198         "persistent": false,
1199         "recording": true
1200       }
1201     ]
1202   }
1205 = Checking Bitmap bitmap0 =
1206 expecting 0 dirty sectors; have 0. OK!
1208 --- Cleanup ---
1210 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1211 {"return": {}}
1213   "bitmaps": {}
1216 --- Verification ---
1218 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
1219 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1220 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1223 === Mode bitmap; Bitmap Sync on-success without failure ===
1225 --- Preparing image & VM ---
1227 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
1228 {"return": {}}
1230 --- Write #0 ---
1232 write -P0x49 0x0000000 0x10000
1233 {"return": ""}
1234 write -P0x6c 0x0100000 0x10000
1235 {"return": ""}
1236 write -P0x6f 0x2000000 0x10000
1237 {"return": ""}
1238 write -P0x76 0x3ff0000 0x10000
1239 {"return": ""}
1241   "bitmaps": {}
1244 --- Reference Backup #0 ---
1247 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1248 {"return": {}}
1251 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1252 {"return": {}}
1254 {"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}}}
1255 {"return": {}}
1256 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1258 --- Add Bitmap ---
1260 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1261 {"return": {}}
1263 --- Write #1 ---
1265 write -P0x65 0x0000000 0x10000
1266 {"return": ""}
1267 write -P0x77 0x00f8000 0x10000
1268 {"return": ""}
1269 write -P0x72 0x2008000 0x10000
1270 {"return": ""}
1271 write -P0x69 0x3fe0000 0x10000
1272 {"return": ""}
1274   "bitmaps": {
1275     "drive0": [
1276       {
1277         "busy": false,
1278         "count": 393216,
1279         "granularity": 65536,
1280         "name": "bitmap0",
1281         "persistent": false,
1282         "recording": true
1283       }
1284     ]
1285   }
1288 = Checking Bitmap bitmap0 =
1289 expecting 6 dirty sectors; have 6. OK!
1291 --- Reference Backup #1 ---
1294 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1295 {"return": {}}
1298 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1299 {"return": {}}
1301 {"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}}}
1302 {"return": {}}
1303 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1305 --- Test Backup #1 ---
1308 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1309 {"return": {}}
1312 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1313 {"return": {}}
1315 {"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}}}
1316 {"return": {}}
1318 --- Write #2 ---
1320 write -P0x74 0x0010000 0x10000
1321 {"return": ""}
1322 write -P0x69 0x00e8000 0x10000
1323 {"return": ""}
1324 write -P0x6e 0x2018000 0x10000
1325 {"return": ""}
1326 write -P0x67 0x3fe0000 0x20000
1327 {"return": ""}
1329   "bitmaps": {
1330     "backup-top": [
1331       {
1332         "busy": false,
1333         "count": 67108864,
1334         "granularity": 65536,
1335         "persistent": false,
1336         "recording": false
1337       },
1338       {
1339         "busy": false,
1340         "count": 458752,
1341         "granularity": 65536,
1342         "persistent": false,
1343         "recording": false
1344       }
1345     ],
1346     "drive0": [
1347       {
1348         "busy": false,
1349         "count": 0,
1350         "granularity": 65536,
1351         "persistent": false,
1352         "recording": false
1353       },
1354       {
1355         "busy": false,
1356         "count": 458752,
1357         "granularity": 65536,
1358         "persistent": false,
1359         "recording": true
1360       },
1361       {
1362         "busy": true,
1363         "count": 393216,
1364         "granularity": 65536,
1365         "name": "bitmap0",
1366         "persistent": false,
1367         "recording": true
1368       }
1369     ]
1370   }
1373 = Checking Bitmap bitmap0 =
1374 expecting 6 dirty sectors; have 6. OK!
1376 = Checking Bitmap (anonymous) =
1377 expecting 7 dirty sectors; have 7. OK!
1379 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
1380 {"return": {}}
1381 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1382 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1384   "bitmaps": {
1385     "drive0": [
1386       {
1387         "busy": false,
1388         "count": 458752,
1389         "granularity": 65536,
1390         "name": "bitmap0",
1391         "persistent": false,
1392         "recording": true
1393       }
1394     ]
1395   }
1398 = Checking Bitmap bitmap0 =
1399 expecting 7 dirty sectors; have 7. OK!
1401 --- Write #3 ---
1403 write -P0xaa 0x0010000 0x30000
1404 {"return": ""}
1405 write -P0xbb 0x00d8000 0x10000
1406 {"return": ""}
1407 write -P0xcc 0x2028000 0x10000
1408 {"return": ""}
1409 write -P0xdd 0x3fc0000 0x10000
1410 {"return": ""}
1412   "bitmaps": {
1413     "drive0": [
1414       {
1415         "busy": false,
1416         "count": 786432,
1417         "granularity": 65536,
1418         "name": "bitmap0",
1419         "persistent": false,
1420         "recording": true
1421       }
1422     ]
1423   }
1426 = Checking Bitmap bitmap0 =
1427 expecting 12 dirty sectors; have 12. OK!
1429 --- Reference Backup #2 ---
1432 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1433 {"return": {}}
1436 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1437 {"return": {}}
1439 {"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}}}
1440 {"return": {}}
1441 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1443 --- Test Backup #2 ---
1446 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1447 {"return": {}}
1450 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1451 {"return": {}}
1453 {"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}}}
1454 {"return": {}}
1455 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
1456 {"return": {}}
1457 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1458 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1460   "bitmaps": {
1461     "drive0": [
1462       {
1463         "busy": false,
1464         "count": 0,
1465         "granularity": 65536,
1466         "name": "bitmap0",
1467         "persistent": false,
1468         "recording": true
1469       }
1470     ]
1471   }
1474 = Checking Bitmap bitmap0 =
1475 expecting 0 dirty sectors; have 0. OK!
1477 --- Cleanup ---
1479 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1480 {"return": {}}
1482   "bitmaps": {}
1485 --- Verification ---
1487 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
1488 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1489 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1492 === Mode bitmap; Bitmap Sync always with simulated failure ===
1494 --- Preparing image & VM ---
1496 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
1497 {"return": {}}
1499 --- Write #0 ---
1501 write -P0x49 0x0000000 0x10000
1502 {"return": ""}
1503 write -P0x6c 0x0100000 0x10000
1504 {"return": ""}
1505 write -P0x6f 0x2000000 0x10000
1506 {"return": ""}
1507 write -P0x76 0x3ff0000 0x10000
1508 {"return": ""}
1510   "bitmaps": {}
1513 --- Reference Backup #0 ---
1516 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1517 {"return": {}}
1520 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1521 {"return": {}}
1523 {"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}}}
1524 {"return": {}}
1525 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1527 --- Add Bitmap ---
1529 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1530 {"return": {}}
1532 --- Write #1 ---
1534 write -P0x65 0x0000000 0x10000
1535 {"return": ""}
1536 write -P0x77 0x00f8000 0x10000
1537 {"return": ""}
1538 write -P0x72 0x2008000 0x10000
1539 {"return": ""}
1540 write -P0x69 0x3fe0000 0x10000
1541 {"return": ""}
1543   "bitmaps": {
1544     "drive0": [
1545       {
1546         "busy": false,
1547         "count": 393216,
1548         "granularity": 65536,
1549         "name": "bitmap0",
1550         "persistent": false,
1551         "recording": true
1552       }
1553     ]
1554   }
1557 = Checking Bitmap bitmap0 =
1558 expecting 6 dirty sectors; have 6. OK!
1560 --- Reference Backup #1 ---
1563 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1564 {"return": {}}
1567 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1568 {"return": {}}
1570 {"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}}}
1571 {"return": {}}
1572 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1574 --- Test Backup #1 ---
1577 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1578 {"return": {}}
1581 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1582 {"return": {}}
1584 {"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}}}
1585 {"return": {}}
1587 --- Write #2 ---
1589 write -P0x74 0x0010000 0x10000
1590 {"return": ""}
1591 write -P0x69 0x00e8000 0x10000
1592 {"return": ""}
1593 write -P0x6e 0x2018000 0x10000
1594 {"return": ""}
1595 write -P0x67 0x3fe0000 0x20000
1596 {"return": ""}
1598   "bitmaps": {
1599     "backup-top": [
1600       {
1601         "busy": false,
1602         "count": 67108864,
1603         "granularity": 65536,
1604         "persistent": false,
1605         "recording": false
1606       },
1607       {
1608         "busy": false,
1609         "count": 458752,
1610         "granularity": 65536,
1611         "persistent": false,
1612         "recording": false
1613       }
1614     ],
1615     "drive0": [
1616       {
1617         "busy": false,
1618         "count": 0,
1619         "granularity": 65536,
1620         "persistent": false,
1621         "recording": false
1622       },
1623       {
1624         "busy": false,
1625         "count": 458752,
1626         "granularity": 65536,
1627         "persistent": false,
1628         "recording": true
1629       },
1630       {
1631         "busy": true,
1632         "count": 393216,
1633         "granularity": 65536,
1634         "name": "bitmap0",
1635         "persistent": false,
1636         "recording": true
1637       }
1638     ]
1639   }
1642 = Checking Bitmap bitmap0 =
1643 expecting 6 dirty sectors; have 6. OK!
1645 = Checking Bitmap (anonymous) =
1646 expecting 7 dirty sectors; have 7. OK!
1648 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
1649 {"return": {}}
1650 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1651 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1653   "bitmaps": {
1654     "drive0": [
1655       {
1656         "busy": false,
1657         "count": 458752,
1658         "granularity": 65536,
1659         "name": "bitmap0",
1660         "persistent": false,
1661         "recording": true
1662       }
1663     ]
1664   }
1667 = Checking Bitmap bitmap0 =
1668 expecting 7 dirty sectors; have 7. OK!
1670 --- Write #3 ---
1672 write -P0xaa 0x0010000 0x30000
1673 {"return": ""}
1674 write -P0xbb 0x00d8000 0x10000
1675 {"return": ""}
1676 write -P0xcc 0x2028000 0x10000
1677 {"return": ""}
1678 write -P0xdd 0x3fc0000 0x10000
1679 {"return": ""}
1681   "bitmaps": {
1682     "drive0": [
1683       {
1684         "busy": false,
1685         "count": 786432,
1686         "granularity": 65536,
1687         "name": "bitmap0",
1688         "persistent": false,
1689         "recording": true
1690       }
1691     ]
1692   }
1695 = Checking Bitmap bitmap0 =
1696 expecting 12 dirty sectors; have 12. OK!
1698 --- Reference Backup #2 ---
1701 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1702 {"return": {}}
1705 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1706 {"return": {}}
1708 {"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}}}
1709 {"return": {}}
1710 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1712 --- Test Backup #2 ---
1715 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1716 {"return": {}}
1719 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1720 {"return": {}}
1722 {"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}}}
1723 {"return": {}}
1724 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
1725 {"return": {}}
1726 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1727 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1729   "bitmaps": {
1730     "drive0": [
1731       {
1732         "busy": false,
1733         "count": 0,
1734         "granularity": 65536,
1735         "name": "bitmap0",
1736         "persistent": false,
1737         "recording": true
1738       }
1739     ]
1740   }
1743 = Checking Bitmap bitmap0 =
1744 expecting 0 dirty sectors; have 0. OK!
1746 --- Cleanup ---
1748 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1749 {"return": {}}
1751   "bitmaps": {}
1754 --- Verification ---
1756 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
1757 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1758 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1761 === Mode bitmap; Bitmap Sync always with intermediate failure ===
1763 --- Preparing image & VM ---
1765 {"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"}}
1766 {"return": {}}
1768 --- Write #0 ---
1770 write -P0x49 0x0000000 0x10000
1771 {"return": ""}
1772 write -P0x6c 0x0100000 0x10000
1773 {"return": ""}
1774 write -P0x6f 0x2000000 0x10000
1775 {"return": ""}
1776 write -P0x76 0x3ff0000 0x10000
1777 {"return": ""}
1779   "bitmaps": {}
1782 --- Reference Backup #0 ---
1785 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1786 {"return": {}}
1789 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1790 {"return": {}}
1792 {"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}}}
1793 {"return": {}}
1794 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1796 --- Add Bitmap ---
1798 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1799 {"return": {}}
1801 --- Write #1 ---
1803 write -P0x65 0x0000000 0x10000
1804 {"return": ""}
1805 write -P0x77 0x00f8000 0x10000
1806 {"return": ""}
1807 write -P0x72 0x2008000 0x10000
1808 {"return": ""}
1809 write -P0x69 0x3fe0000 0x10000
1810 {"return": ""}
1812   "bitmaps": {
1813     "drive0": [
1814       {
1815         "busy": false,
1816         "count": 393216,
1817         "granularity": 65536,
1818         "name": "bitmap0",
1819         "persistent": false,
1820         "recording": true
1821       }
1822     ]
1823   }
1826 = Checking Bitmap bitmap0 =
1827 expecting 6 dirty sectors; have 6. OK!
1829 --- Reference Backup #1 ---
1832 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1833 {"return": {}}
1836 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1837 {"return": {}}
1839 {"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}}}
1840 {"return": {}}
1841 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1843 {"return": ""}
1845 --- Test Backup #1 ---
1848 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1849 {"return": {}}
1852 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1853 {"return": {}}
1855 {"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}}}
1856 {"return": {}}
1857 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1858 {"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"}}
1860   "bitmaps": {
1861     "drive0": [
1862       {
1863         "busy": false,
1864         "count": 327680,
1865         "granularity": 65536,
1866         "name": "bitmap0",
1867         "persistent": false,
1868         "recording": true
1869       }
1870     ]
1871   }
1874 = Checking Bitmap bitmap0 =
1875 expecting 5 dirty sectors; have 5. OK!
1877 --- Write #3 ---
1879 write -P0xaa 0x0010000 0x30000
1880 {"return": ""}
1881 write -P0xbb 0x00d8000 0x10000
1882 {"return": ""}
1883 write -P0xcc 0x2028000 0x10000
1884 {"return": ""}
1885 write -P0xdd 0x3fc0000 0x10000
1886 {"return": ""}
1888   "bitmaps": {
1889     "drive0": [
1890       {
1891         "busy": false,
1892         "count": 851968,
1893         "granularity": 65536,
1894         "name": "bitmap0",
1895         "persistent": false,
1896         "recording": true
1897       }
1898     ]
1899   }
1902 = Checking Bitmap bitmap0 =
1903 expecting 13 dirty sectors; have 13. OK!
1905 --- Reference Backup #2 ---
1908 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1909 {"return": {}}
1912 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1913 {"return": {}}
1915 {"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}}}
1916 {"return": {}}
1917 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1919 --- Test Backup #2 ---
1922 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1923 {"return": {}}
1926 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1927 {"return": {}}
1929 {"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}}}
1930 {"return": {}}
1931 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
1932 {"return": {}}
1933 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1934 {"data": {"device": "backup_2", "len": 851968, "offset": 851968, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1936   "bitmaps": {
1937     "drive0": [
1938       {
1939         "busy": false,
1940         "count": 0,
1941         "granularity": 65536,
1942         "name": "bitmap0",
1943         "persistent": false,
1944         "recording": true
1945       }
1946     ]
1947   }
1950 = Checking Bitmap bitmap0 =
1951 expecting 0 dirty sectors; have 0. OK!
1953 --- Cleanup ---
1955 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1956 {"return": {}}
1958   "bitmaps": {}
1961 --- Verification ---
1963 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
1964 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1965 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1968 === Mode bitmap; Bitmap Sync always without failure ===
1970 --- Preparing image & VM ---
1972 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
1973 {"return": {}}
1975 --- Write #0 ---
1977 write -P0x49 0x0000000 0x10000
1978 {"return": ""}
1979 write -P0x6c 0x0100000 0x10000
1980 {"return": ""}
1981 write -P0x6f 0x2000000 0x10000
1982 {"return": ""}
1983 write -P0x76 0x3ff0000 0x10000
1984 {"return": ""}
1986   "bitmaps": {}
1989 --- Reference Backup #0 ---
1992 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1993 {"return": {}}
1996 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1997 {"return": {}}
1999 {"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}}}
2000 {"return": {}}
2001 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2003 --- Add Bitmap ---
2005 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
2006 {"return": {}}
2008 --- Write #1 ---
2010 write -P0x65 0x0000000 0x10000
2011 {"return": ""}
2012 write -P0x77 0x00f8000 0x10000
2013 {"return": ""}
2014 write -P0x72 0x2008000 0x10000
2015 {"return": ""}
2016 write -P0x69 0x3fe0000 0x10000
2017 {"return": ""}
2019   "bitmaps": {
2020     "drive0": [
2021       {
2022         "busy": false,
2023         "count": 393216,
2024         "granularity": 65536,
2025         "name": "bitmap0",
2026         "persistent": false,
2027         "recording": true
2028       }
2029     ]
2030   }
2033 = Checking Bitmap bitmap0 =
2034 expecting 6 dirty sectors; have 6. OK!
2036 --- Reference Backup #1 ---
2039 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2040 {"return": {}}
2043 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2044 {"return": {}}
2046 {"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}}}
2047 {"return": {}}
2048 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2050 --- Test Backup #1 ---
2053 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2054 {"return": {}}
2057 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2058 {"return": {}}
2060 {"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}}}
2061 {"return": {}}
2063 --- Write #2 ---
2065 write -P0x74 0x0010000 0x10000
2066 {"return": ""}
2067 write -P0x69 0x00e8000 0x10000
2068 {"return": ""}
2069 write -P0x6e 0x2018000 0x10000
2070 {"return": ""}
2071 write -P0x67 0x3fe0000 0x20000
2072 {"return": ""}
2074   "bitmaps": {
2075     "backup-top": [
2076       {
2077         "busy": false,
2078         "count": 67108864,
2079         "granularity": 65536,
2080         "persistent": false,
2081         "recording": false
2082       },
2083       {
2084         "busy": false,
2085         "count": 458752,
2086         "granularity": 65536,
2087         "persistent": false,
2088         "recording": false
2089       }
2090     ],
2091     "drive0": [
2092       {
2093         "busy": false,
2094         "count": 0,
2095         "granularity": 65536,
2096         "persistent": false,
2097         "recording": false
2098       },
2099       {
2100         "busy": false,
2101         "count": 458752,
2102         "granularity": 65536,
2103         "persistent": false,
2104         "recording": true
2105       },
2106       {
2107         "busy": true,
2108         "count": 393216,
2109         "granularity": 65536,
2110         "name": "bitmap0",
2111         "persistent": false,
2112         "recording": true
2113       }
2114     ]
2115   }
2118 = Checking Bitmap bitmap0 =
2119 expecting 6 dirty sectors; have 6. OK!
2121 = Checking Bitmap (anonymous) =
2122 expecting 7 dirty sectors; have 7. OK!
2124 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
2125 {"return": {}}
2126 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2127 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2129   "bitmaps": {
2130     "drive0": [
2131       {
2132         "busy": false,
2133         "count": 458752,
2134         "granularity": 65536,
2135         "name": "bitmap0",
2136         "persistent": false,
2137         "recording": true
2138       }
2139     ]
2140   }
2143 = Checking Bitmap bitmap0 =
2144 expecting 7 dirty sectors; have 7. OK!
2146 --- Write #3 ---
2148 write -P0xaa 0x0010000 0x30000
2149 {"return": ""}
2150 write -P0xbb 0x00d8000 0x10000
2151 {"return": ""}
2152 write -P0xcc 0x2028000 0x10000
2153 {"return": ""}
2154 write -P0xdd 0x3fc0000 0x10000
2155 {"return": ""}
2157   "bitmaps": {
2158     "drive0": [
2159       {
2160         "busy": false,
2161         "count": 786432,
2162         "granularity": 65536,
2163         "name": "bitmap0",
2164         "persistent": false,
2165         "recording": true
2166       }
2167     ]
2168   }
2171 = Checking Bitmap bitmap0 =
2172 expecting 12 dirty sectors; have 12. OK!
2174 --- Reference Backup #2 ---
2177 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2178 {"return": {}}
2181 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2182 {"return": {}}
2184 {"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}}}
2185 {"return": {}}
2186 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2188 --- Test Backup #2 ---
2191 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2192 {"return": {}}
2195 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2196 {"return": {}}
2198 {"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}}}
2199 {"return": {}}
2200 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
2201 {"return": {}}
2202 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2203 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2205   "bitmaps": {
2206     "drive0": [
2207       {
2208         "busy": false,
2209         "count": 0,
2210         "granularity": 65536,
2211         "name": "bitmap0",
2212         "persistent": false,
2213         "recording": true
2214       }
2215     ]
2216   }
2219 = Checking Bitmap bitmap0 =
2220 expecting 0 dirty sectors; have 0. OK!
2222 --- Cleanup ---
2224 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
2225 {"return": {}}
2227   "bitmaps": {}
2230 --- Verification ---
2232 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
2233 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2234 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2237 === Mode full; Bitmap Sync on-success with simulated failure ===
2239 --- Preparing image & VM ---
2241 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
2242 {"return": {}}
2244 --- Write #0 ---
2246 write -P0x49 0x0000000 0x10000
2247 {"return": ""}
2248 write -P0x6c 0x0100000 0x10000
2249 {"return": ""}
2250 write -P0x6f 0x2000000 0x10000
2251 {"return": ""}
2252 write -P0x76 0x3ff0000 0x10000
2253 {"return": ""}
2255   "bitmaps": {}
2258 --- Reference Backup #0 ---
2261 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2262 {"return": {}}
2265 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2266 {"return": {}}
2268 {"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}}}
2269 {"return": {}}
2270 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2272 --- Add Bitmap ---
2274 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
2275 {"return": {}}
2277 --- Write #1 ---
2279 write -P0x65 0x0000000 0x10000
2280 {"return": ""}
2281 write -P0x77 0x00f8000 0x10000
2282 {"return": ""}
2283 write -P0x72 0x2008000 0x10000
2284 {"return": ""}
2285 write -P0x69 0x3fe0000 0x10000
2286 {"return": ""}
2288   "bitmaps": {
2289     "drive0": [
2290       {
2291         "busy": false,
2292         "count": 393216,
2293         "granularity": 65536,
2294         "name": "bitmap0",
2295         "persistent": false,
2296         "recording": true
2297       }
2298     ]
2299   }
2302 = Checking Bitmap bitmap0 =
2303 expecting 6 dirty sectors; have 6. OK!
2305 --- Reference Backup #1 ---
2308 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2309 {"return": {}}
2312 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2313 {"return": {}}
2315 {"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}}}
2316 {"return": {}}
2317 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2319 --- Test Backup #1 ---
2322 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2323 {"return": {}}
2326 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2327 {"return": {}}
2329 {"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}}}
2330 {"return": {}}
2332 --- Write #2 ---
2334 write -P0x74 0x0010000 0x10000
2335 {"return": ""}
2336 write -P0x69 0x00e8000 0x10000
2337 {"return": ""}
2338 write -P0x6e 0x2018000 0x10000
2339 {"return": ""}
2340 write -P0x67 0x3fe0000 0x20000
2341 {"return": ""}
2343   "bitmaps": {
2344     "backup-top": [
2345       {
2346         "busy": false,
2347         "count": 67108864,
2348         "granularity": 65536,
2349         "persistent": false,
2350         "recording": false
2351       },
2352       {
2353         "busy": false,
2354         "count": 458752,
2355         "granularity": 65536,
2356         "persistent": false,
2357         "recording": false
2358       }
2359     ],
2360     "drive0": [
2361       {
2362         "busy": false,
2363         "count": 0,
2364         "granularity": 65536,
2365         "persistent": false,
2366         "recording": false
2367       },
2368       {
2369         "busy": false,
2370         "count": 458752,
2371         "granularity": 65536,
2372         "persistent": false,
2373         "recording": true
2374       },
2375       {
2376         "busy": true,
2377         "count": 393216,
2378         "granularity": 65536,
2379         "name": "bitmap0",
2380         "persistent": false,
2381         "recording": true
2382       }
2383     ]
2384   }
2387 = Checking Bitmap bitmap0 =
2388 expecting 6 dirty sectors; have 6. OK!
2390 = Checking Bitmap (anonymous) =
2391 expecting 7 dirty sectors; have 7. OK!
2393 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
2394 {"return": {}}
2395 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2396 {"data": {"device": "backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2398   "bitmaps": {
2399     "drive0": [
2400       {
2401         "busy": false,
2402         "count": 655360,
2403         "granularity": 65536,
2404         "name": "bitmap0",
2405         "persistent": false,
2406         "recording": true
2407       }
2408     ]
2409   }
2412 = Checking Bitmap bitmap0 =
2413 expecting 10 dirty sectors; have 10. OK!
2415 --- Write #3 ---
2417 write -P0xaa 0x0010000 0x30000
2418 {"return": ""}
2419 write -P0xbb 0x00d8000 0x10000
2420 {"return": ""}
2421 write -P0xcc 0x2028000 0x10000
2422 {"return": ""}
2423 write -P0xdd 0x3fc0000 0x10000
2424 {"return": ""}
2426   "bitmaps": {
2427     "drive0": [
2428       {
2429         "busy": false,
2430         "count": 983040,
2431         "granularity": 65536,
2432         "name": "bitmap0",
2433         "persistent": false,
2434         "recording": true
2435       }
2436     ]
2437   }
2440 = Checking Bitmap bitmap0 =
2441 expecting 15 dirty sectors; have 15. OK!
2443 --- Reference Backup #2 ---
2446 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2447 {"return": {}}
2450 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2451 {"return": {}}
2453 {"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}}}
2454 {"return": {}}
2455 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2457 --- Test Backup #2 ---
2460 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2461 {"return": {}}
2464 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2465 {"return": {}}
2467 {"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}}}
2468 {"return": {}}
2469 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
2470 {"return": {}}
2471 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2472 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2474   "bitmaps": {
2475     "drive0": [
2476       {
2477         "busy": false,
2478         "count": 0,
2479         "granularity": 65536,
2480         "name": "bitmap0",
2481         "persistent": false,
2482         "recording": true
2483       }
2484     ]
2485   }
2488 = Checking Bitmap bitmap0 =
2489 expecting 0 dirty sectors; have 0. OK!
2491 --- Cleanup ---
2493 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
2494 {"return": {}}
2496   "bitmaps": {}
2499 --- Verification ---
2501 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
2502 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2503 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2506 === Mode full; Bitmap Sync on-success with intermediate failure ===
2508 --- Preparing image & VM ---
2510 {"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"}}
2511 {"return": {}}
2513 --- Write #0 ---
2515 write -P0x49 0x0000000 0x10000
2516 {"return": ""}
2517 write -P0x6c 0x0100000 0x10000
2518 {"return": ""}
2519 write -P0x6f 0x2000000 0x10000
2520 {"return": ""}
2521 write -P0x76 0x3ff0000 0x10000
2522 {"return": ""}
2524   "bitmaps": {}
2527 --- Reference Backup #0 ---
2530 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2531 {"return": {}}
2534 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2535 {"return": {}}
2537 {"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}}}
2538 {"return": {}}
2539 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2541 --- Add Bitmap ---
2543 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
2544 {"return": {}}
2546 --- Write #1 ---
2548 write -P0x65 0x0000000 0x10000
2549 {"return": ""}
2550 write -P0x77 0x00f8000 0x10000
2551 {"return": ""}
2552 write -P0x72 0x2008000 0x10000
2553 {"return": ""}
2554 write -P0x69 0x3fe0000 0x10000
2555 {"return": ""}
2557   "bitmaps": {
2558     "drive0": [
2559       {
2560         "busy": false,
2561         "count": 393216,
2562         "granularity": 65536,
2563         "name": "bitmap0",
2564         "persistent": false,
2565         "recording": true
2566       }
2567     ]
2568   }
2571 = Checking Bitmap bitmap0 =
2572 expecting 6 dirty sectors; have 6. OK!
2574 --- Reference Backup #1 ---
2577 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2578 {"return": {}}
2581 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2582 {"return": {}}
2584 {"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}}}
2585 {"return": {}}
2586 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2588 {"return": ""}
2590 --- Test Backup #1 ---
2593 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2594 {"return": {}}
2597 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2598 {"return": {}}
2600 {"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}}}
2601 {"return": {}}
2602 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2603 {"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"}}
2605   "bitmaps": {
2606     "drive0": [
2607       {
2608         "busy": false,
2609         "count": 393216,
2610         "granularity": 65536,
2611         "name": "bitmap0",
2612         "persistent": false,
2613         "recording": true
2614       }
2615     ]
2616   }
2619 = Checking Bitmap bitmap0 =
2620 expecting 6 dirty sectors; have 6. OK!
2622 --- Write #3 ---
2624 write -P0xaa 0x0010000 0x30000
2625 {"return": ""}
2626 write -P0xbb 0x00d8000 0x10000
2627 {"return": ""}
2628 write -P0xcc 0x2028000 0x10000
2629 {"return": ""}
2630 write -P0xdd 0x3fc0000 0x10000
2631 {"return": ""}
2633   "bitmaps": {
2634     "drive0": [
2635       {
2636         "busy": false,
2637         "count": 917504,
2638         "granularity": 65536,
2639         "name": "bitmap0",
2640         "persistent": false,
2641         "recording": true
2642       }
2643     ]
2644   }
2647 = Checking Bitmap bitmap0 =
2648 expecting 14 dirty sectors; have 14. OK!
2650 --- Reference Backup #2 ---
2653 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2654 {"return": {}}
2657 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2658 {"return": {}}
2660 {"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}}}
2661 {"return": {}}
2662 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2664 --- Test Backup #2 ---
2667 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2668 {"return": {}}
2671 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2672 {"return": {}}
2674 {"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}}}
2675 {"return": {}}
2676 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
2677 {"return": {}}
2678 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2679 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2681   "bitmaps": {
2682     "drive0": [
2683       {
2684         "busy": false,
2685         "count": 0,
2686         "granularity": 65536,
2687         "name": "bitmap0",
2688         "persistent": false,
2689         "recording": true
2690       }
2691     ]
2692   }
2695 = Checking Bitmap bitmap0 =
2696 expecting 0 dirty sectors; have 0. OK!
2698 --- Cleanup ---
2700 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
2701 {"return": {}}
2703   "bitmaps": {}
2706 --- Verification ---
2708 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
2709 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2710 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2713 === Mode full; Bitmap Sync on-success without failure ===
2715 --- Preparing image & VM ---
2717 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
2718 {"return": {}}
2720 --- Write #0 ---
2722 write -P0x49 0x0000000 0x10000
2723 {"return": ""}
2724 write -P0x6c 0x0100000 0x10000
2725 {"return": ""}
2726 write -P0x6f 0x2000000 0x10000
2727 {"return": ""}
2728 write -P0x76 0x3ff0000 0x10000
2729 {"return": ""}
2731   "bitmaps": {}
2734 --- Reference Backup #0 ---
2737 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2738 {"return": {}}
2741 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2742 {"return": {}}
2744 {"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}}}
2745 {"return": {}}
2746 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2748 --- Add Bitmap ---
2750 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
2751 {"return": {}}
2753 --- Write #1 ---
2755 write -P0x65 0x0000000 0x10000
2756 {"return": ""}
2757 write -P0x77 0x00f8000 0x10000
2758 {"return": ""}
2759 write -P0x72 0x2008000 0x10000
2760 {"return": ""}
2761 write -P0x69 0x3fe0000 0x10000
2762 {"return": ""}
2764   "bitmaps": {
2765     "drive0": [
2766       {
2767         "busy": false,
2768         "count": 393216,
2769         "granularity": 65536,
2770         "name": "bitmap0",
2771         "persistent": false,
2772         "recording": true
2773       }
2774     ]
2775   }
2778 = Checking Bitmap bitmap0 =
2779 expecting 6 dirty sectors; have 6. OK!
2781 --- Reference Backup #1 ---
2784 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2785 {"return": {}}
2788 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2789 {"return": {}}
2791 {"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}}}
2792 {"return": {}}
2793 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2795 --- Test Backup #1 ---
2798 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2799 {"return": {}}
2802 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2803 {"return": {}}
2805 {"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}}}
2806 {"return": {}}
2808 --- Write #2 ---
2810 write -P0x74 0x0010000 0x10000
2811 {"return": ""}
2812 write -P0x69 0x00e8000 0x10000
2813 {"return": ""}
2814 write -P0x6e 0x2018000 0x10000
2815 {"return": ""}
2816 write -P0x67 0x3fe0000 0x20000
2817 {"return": ""}
2819   "bitmaps": {
2820     "backup-top": [
2821       {
2822         "busy": false,
2823         "count": 67108864,
2824         "granularity": 65536,
2825         "persistent": false,
2826         "recording": false
2827       },
2828       {
2829         "busy": false,
2830         "count": 458752,
2831         "granularity": 65536,
2832         "persistent": false,
2833         "recording": false
2834       }
2835     ],
2836     "drive0": [
2837       {
2838         "busy": false,
2839         "count": 0,
2840         "granularity": 65536,
2841         "persistent": false,
2842         "recording": false
2843       },
2844       {
2845         "busy": false,
2846         "count": 458752,
2847         "granularity": 65536,
2848         "persistent": false,
2849         "recording": true
2850       },
2851       {
2852         "busy": true,
2853         "count": 393216,
2854         "granularity": 65536,
2855         "name": "bitmap0",
2856         "persistent": false,
2857         "recording": true
2858       }
2859     ]
2860   }
2863 = Checking Bitmap bitmap0 =
2864 expecting 6 dirty sectors; have 6. OK!
2866 = Checking Bitmap (anonymous) =
2867 expecting 7 dirty sectors; have 7. OK!
2869 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
2870 {"return": {}}
2871 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2872 {"data": {"device": "backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2874   "bitmaps": {
2875     "drive0": [
2876       {
2877         "busy": false,
2878         "count": 458752,
2879         "granularity": 65536,
2880         "name": "bitmap0",
2881         "persistent": false,
2882         "recording": true
2883       }
2884     ]
2885   }
2888 = Checking Bitmap bitmap0 =
2889 expecting 7 dirty sectors; have 7. OK!
2891 --- Write #3 ---
2893 write -P0xaa 0x0010000 0x30000
2894 {"return": ""}
2895 write -P0xbb 0x00d8000 0x10000
2896 {"return": ""}
2897 write -P0xcc 0x2028000 0x10000
2898 {"return": ""}
2899 write -P0xdd 0x3fc0000 0x10000
2900 {"return": ""}
2902   "bitmaps": {
2903     "drive0": [
2904       {
2905         "busy": false,
2906         "count": 786432,
2907         "granularity": 65536,
2908         "name": "bitmap0",
2909         "persistent": false,
2910         "recording": true
2911       }
2912     ]
2913   }
2916 = Checking Bitmap bitmap0 =
2917 expecting 12 dirty sectors; have 12. OK!
2919 --- Reference Backup #2 ---
2922 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2923 {"return": {}}
2926 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2927 {"return": {}}
2929 {"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}}}
2930 {"return": {}}
2931 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2933 --- Test Backup #2 ---
2936 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2937 {"return": {}}
2940 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2941 {"return": {}}
2943 {"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}}}
2944 {"return": {}}
2945 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
2946 {"return": {}}
2947 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2948 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2950   "bitmaps": {
2951     "drive0": [
2952       {
2953         "busy": false,
2954         "count": 0,
2955         "granularity": 65536,
2956         "name": "bitmap0",
2957         "persistent": false,
2958         "recording": true
2959       }
2960     ]
2961   }
2964 = Checking Bitmap bitmap0 =
2965 expecting 0 dirty sectors; have 0. OK!
2967 --- Cleanup ---
2969 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
2970 {"return": {}}
2972   "bitmaps": {}
2975 --- Verification ---
2977 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
2978 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2979 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2982 === Mode full; Bitmap Sync always with simulated failure ===
2984 --- Preparing image & VM ---
2986 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
2987 {"return": {}}
2989 --- Write #0 ---
2991 write -P0x49 0x0000000 0x10000
2992 {"return": ""}
2993 write -P0x6c 0x0100000 0x10000
2994 {"return": ""}
2995 write -P0x6f 0x2000000 0x10000
2996 {"return": ""}
2997 write -P0x76 0x3ff0000 0x10000
2998 {"return": ""}
3000   "bitmaps": {}
3003 --- Reference Backup #0 ---
3006 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3007 {"return": {}}
3010 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3011 {"return": {}}
3013 {"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}}}
3014 {"return": {}}
3015 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3017 --- Add Bitmap ---
3019 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
3020 {"return": {}}
3022 --- Write #1 ---
3024 write -P0x65 0x0000000 0x10000
3025 {"return": ""}
3026 write -P0x77 0x00f8000 0x10000
3027 {"return": ""}
3028 write -P0x72 0x2008000 0x10000
3029 {"return": ""}
3030 write -P0x69 0x3fe0000 0x10000
3031 {"return": ""}
3033   "bitmaps": {
3034     "drive0": [
3035       {
3036         "busy": false,
3037         "count": 393216,
3038         "granularity": 65536,
3039         "name": "bitmap0",
3040         "persistent": false,
3041         "recording": true
3042       }
3043     ]
3044   }
3047 = Checking Bitmap bitmap0 =
3048 expecting 6 dirty sectors; have 6. OK!
3050 --- Reference Backup #1 ---
3053 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3054 {"return": {}}
3057 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3058 {"return": {}}
3060 {"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}}}
3061 {"return": {}}
3062 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3064 --- Test Backup #1 ---
3067 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3068 {"return": {}}
3071 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3072 {"return": {}}
3074 {"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}}}
3075 {"return": {}}
3077 --- Write #2 ---
3079 write -P0x74 0x0010000 0x10000
3080 {"return": ""}
3081 write -P0x69 0x00e8000 0x10000
3082 {"return": ""}
3083 write -P0x6e 0x2018000 0x10000
3084 {"return": ""}
3085 write -P0x67 0x3fe0000 0x20000
3086 {"return": ""}
3088   "bitmaps": {
3089     "backup-top": [
3090       {
3091         "busy": false,
3092         "count": 67108864,
3093         "granularity": 65536,
3094         "persistent": false,
3095         "recording": false
3096       },
3097       {
3098         "busy": false,
3099         "count": 458752,
3100         "granularity": 65536,
3101         "persistent": false,
3102         "recording": false
3103       }
3104     ],
3105     "drive0": [
3106       {
3107         "busy": false,
3108         "count": 0,
3109         "granularity": 65536,
3110         "persistent": false,
3111         "recording": false
3112       },
3113       {
3114         "busy": false,
3115         "count": 458752,
3116         "granularity": 65536,
3117         "persistent": false,
3118         "recording": true
3119       },
3120       {
3121         "busy": true,
3122         "count": 393216,
3123         "granularity": 65536,
3124         "name": "bitmap0",
3125         "persistent": false,
3126         "recording": true
3127       }
3128     ]
3129   }
3132 = Checking Bitmap bitmap0 =
3133 expecting 6 dirty sectors; have 6. OK!
3135 = Checking Bitmap (anonymous) =
3136 expecting 7 dirty sectors; have 7. OK!
3138 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
3139 {"return": {}}
3140 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3141 {"data": {"device": "backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3143   "bitmaps": {
3144     "drive0": [
3145       {
3146         "busy": false,
3147         "count": 458752,
3148         "granularity": 65536,
3149         "name": "bitmap0",
3150         "persistent": false,
3151         "recording": true
3152       }
3153     ]
3154   }
3157 = Checking Bitmap bitmap0 =
3158 expecting 7 dirty sectors; have 7. OK!
3160 --- Write #3 ---
3162 write -P0xaa 0x0010000 0x30000
3163 {"return": ""}
3164 write -P0xbb 0x00d8000 0x10000
3165 {"return": ""}
3166 write -P0xcc 0x2028000 0x10000
3167 {"return": ""}
3168 write -P0xdd 0x3fc0000 0x10000
3169 {"return": ""}
3171   "bitmaps": {
3172     "drive0": [
3173       {
3174         "busy": false,
3175         "count": 786432,
3176         "granularity": 65536,
3177         "name": "bitmap0",
3178         "persistent": false,
3179         "recording": true
3180       }
3181     ]
3182   }
3185 = Checking Bitmap bitmap0 =
3186 expecting 12 dirty sectors; have 12. OK!
3188 --- Reference Backup #2 ---
3191 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3192 {"return": {}}
3195 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3196 {"return": {}}
3198 {"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}}}
3199 {"return": {}}
3200 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3202 --- Test Backup #2 ---
3205 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3206 {"return": {}}
3209 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3210 {"return": {}}
3212 {"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}}}
3213 {"return": {}}
3214 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3215 {"return": {}}
3216 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3217 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3219   "bitmaps": {
3220     "drive0": [
3221       {
3222         "busy": false,
3223         "count": 0,
3224         "granularity": 65536,
3225         "name": "bitmap0",
3226         "persistent": false,
3227         "recording": true
3228       }
3229     ]
3230   }
3233 = Checking Bitmap bitmap0 =
3234 expecting 0 dirty sectors; have 0. OK!
3236 --- Cleanup ---
3238 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
3239 {"return": {}}
3241   "bitmaps": {}
3244 --- Verification ---
3246 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
3247 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3248 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3251 === Mode full; Bitmap Sync always with intermediate failure ===
3253 --- Preparing image & VM ---
3255 {"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"}}
3256 {"return": {}}
3258 --- Write #0 ---
3260 write -P0x49 0x0000000 0x10000
3261 {"return": ""}
3262 write -P0x6c 0x0100000 0x10000
3263 {"return": ""}
3264 write -P0x6f 0x2000000 0x10000
3265 {"return": ""}
3266 write -P0x76 0x3ff0000 0x10000
3267 {"return": ""}
3269   "bitmaps": {}
3272 --- Reference Backup #0 ---
3275 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3276 {"return": {}}
3279 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3280 {"return": {}}
3282 {"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}}}
3283 {"return": {}}
3284 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3286 --- Add Bitmap ---
3288 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
3289 {"return": {}}
3291 --- Write #1 ---
3293 write -P0x65 0x0000000 0x10000
3294 {"return": ""}
3295 write -P0x77 0x00f8000 0x10000
3296 {"return": ""}
3297 write -P0x72 0x2008000 0x10000
3298 {"return": ""}
3299 write -P0x69 0x3fe0000 0x10000
3300 {"return": ""}
3302   "bitmaps": {
3303     "drive0": [
3304       {
3305         "busy": false,
3306         "count": 393216,
3307         "granularity": 65536,
3308         "name": "bitmap0",
3309         "persistent": false,
3310         "recording": true
3311       }
3312     ]
3313   }
3316 = Checking Bitmap bitmap0 =
3317 expecting 6 dirty sectors; have 6. OK!
3319 --- Reference Backup #1 ---
3322 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3323 {"return": {}}
3326 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3327 {"return": {}}
3329 {"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}}}
3330 {"return": {}}
3331 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3333 {"return": ""}
3335 --- Test Backup #1 ---
3338 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3339 {"return": {}}
3342 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3343 {"return": {}}
3345 {"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}}}
3346 {"return": {}}
3347 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3348 {"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"}}
3350   "bitmaps": {
3351     "drive0": [
3352       {
3353         "busy": false,
3354         "count": 66125824,
3355         "granularity": 65536,
3356         "name": "bitmap0",
3357         "persistent": false,
3358         "recording": true
3359       }
3360     ]
3361   }
3364 = Checking Bitmap bitmap0 =
3365 expecting 1009 dirty sectors; have 1009. OK!
3367 --- Write #3 ---
3369 write -P0xaa 0x0010000 0x30000
3370 {"return": ""}
3371 write -P0xbb 0x00d8000 0x10000
3372 {"return": ""}
3373 write -P0xcc 0x2028000 0x10000
3374 {"return": ""}
3375 write -P0xdd 0x3fc0000 0x10000
3376 {"return": ""}
3378   "bitmaps": {
3379     "drive0": [
3380       {
3381         "busy": false,
3382         "count": 66453504,
3383         "granularity": 65536,
3384         "name": "bitmap0",
3385         "persistent": false,
3386         "recording": true
3387       }
3388     ]
3389   }
3392 = Checking Bitmap bitmap0 =
3393 expecting 1014 dirty sectors; have 1014. OK!
3395 --- Reference Backup #2 ---
3398 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3399 {"return": {}}
3402 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3403 {"return": {}}
3405 {"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}}}
3406 {"return": {}}
3407 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3409 --- Test Backup #2 ---
3412 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3413 {"return": {}}
3416 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3417 {"return": {}}
3419 {"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}}}
3420 {"return": {}}
3421 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3422 {"return": {}}
3423 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3424 {"data": {"device": "backup_2", "len": 66453504, "offset": 66453504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3426   "bitmaps": {
3427     "drive0": [
3428       {
3429         "busy": false,
3430         "count": 0,
3431         "granularity": 65536,
3432         "name": "bitmap0",
3433         "persistent": false,
3434         "recording": true
3435       }
3436     ]
3437   }
3440 = Checking Bitmap bitmap0 =
3441 expecting 0 dirty sectors; have 0. OK!
3443 --- Cleanup ---
3445 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
3446 {"return": {}}
3448   "bitmaps": {}
3451 --- Verification ---
3453 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
3454 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3455 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3458 === Mode full; Bitmap Sync always without failure ===
3460 --- Preparing image & VM ---
3462 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
3463 {"return": {}}
3465 --- Write #0 ---
3467 write -P0x49 0x0000000 0x10000
3468 {"return": ""}
3469 write -P0x6c 0x0100000 0x10000
3470 {"return": ""}
3471 write -P0x6f 0x2000000 0x10000
3472 {"return": ""}
3473 write -P0x76 0x3ff0000 0x10000
3474 {"return": ""}
3476   "bitmaps": {}
3479 --- Reference Backup #0 ---
3482 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3483 {"return": {}}
3486 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3487 {"return": {}}
3489 {"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}}}
3490 {"return": {}}
3491 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3493 --- Add Bitmap ---
3495 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
3496 {"return": {}}
3498 --- Write #1 ---
3500 write -P0x65 0x0000000 0x10000
3501 {"return": ""}
3502 write -P0x77 0x00f8000 0x10000
3503 {"return": ""}
3504 write -P0x72 0x2008000 0x10000
3505 {"return": ""}
3506 write -P0x69 0x3fe0000 0x10000
3507 {"return": ""}
3509   "bitmaps": {
3510     "drive0": [
3511       {
3512         "busy": false,
3513         "count": 393216,
3514         "granularity": 65536,
3515         "name": "bitmap0",
3516         "persistent": false,
3517         "recording": true
3518       }
3519     ]
3520   }
3523 = Checking Bitmap bitmap0 =
3524 expecting 6 dirty sectors; have 6. OK!
3526 --- Reference Backup #1 ---
3529 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3530 {"return": {}}
3533 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3534 {"return": {}}
3536 {"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}}}
3537 {"return": {}}
3538 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3540 --- Test Backup #1 ---
3543 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3544 {"return": {}}
3547 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3548 {"return": {}}
3550 {"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}}}
3551 {"return": {}}
3553 --- Write #2 ---
3555 write -P0x74 0x0010000 0x10000
3556 {"return": ""}
3557 write -P0x69 0x00e8000 0x10000
3558 {"return": ""}
3559 write -P0x6e 0x2018000 0x10000
3560 {"return": ""}
3561 write -P0x67 0x3fe0000 0x20000
3562 {"return": ""}
3564   "bitmaps": {
3565     "backup-top": [
3566       {
3567         "busy": false,
3568         "count": 67108864,
3569         "granularity": 65536,
3570         "persistent": false,
3571         "recording": false
3572       },
3573       {
3574         "busy": false,
3575         "count": 458752,
3576         "granularity": 65536,
3577         "persistent": false,
3578         "recording": false
3579       }
3580     ],
3581     "drive0": [
3582       {
3583         "busy": false,
3584         "count": 0,
3585         "granularity": 65536,
3586         "persistent": false,
3587         "recording": false
3588       },
3589       {
3590         "busy": false,
3591         "count": 458752,
3592         "granularity": 65536,
3593         "persistent": false,
3594         "recording": true
3595       },
3596       {
3597         "busy": true,
3598         "count": 393216,
3599         "granularity": 65536,
3600         "name": "bitmap0",
3601         "persistent": false,
3602         "recording": true
3603       }
3604     ]
3605   }
3608 = Checking Bitmap bitmap0 =
3609 expecting 6 dirty sectors; have 6. OK!
3611 = Checking Bitmap (anonymous) =
3612 expecting 7 dirty sectors; have 7. OK!
3614 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
3615 {"return": {}}
3616 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3617 {"data": {"device": "backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3619   "bitmaps": {
3620     "drive0": [
3621       {
3622         "busy": false,
3623         "count": 458752,
3624         "granularity": 65536,
3625         "name": "bitmap0",
3626         "persistent": false,
3627         "recording": true
3628       }
3629     ]
3630   }
3633 = Checking Bitmap bitmap0 =
3634 expecting 7 dirty sectors; have 7. OK!
3636 --- Write #3 ---
3638 write -P0xaa 0x0010000 0x30000
3639 {"return": ""}
3640 write -P0xbb 0x00d8000 0x10000
3641 {"return": ""}
3642 write -P0xcc 0x2028000 0x10000
3643 {"return": ""}
3644 write -P0xdd 0x3fc0000 0x10000
3645 {"return": ""}
3647   "bitmaps": {
3648     "drive0": [
3649       {
3650         "busy": false,
3651         "count": 786432,
3652         "granularity": 65536,
3653         "name": "bitmap0",
3654         "persistent": false,
3655         "recording": true
3656       }
3657     ]
3658   }
3661 = Checking Bitmap bitmap0 =
3662 expecting 12 dirty sectors; have 12. OK!
3664 --- Reference Backup #2 ---
3667 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3668 {"return": {}}
3671 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3672 {"return": {}}
3674 {"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}}}
3675 {"return": {}}
3676 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3678 --- Test Backup #2 ---
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": {"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}}}
3689 {"return": {}}
3690 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3691 {"return": {}}
3692 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3693 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3695   "bitmaps": {
3696     "drive0": [
3697       {
3698         "busy": false,
3699         "count": 0,
3700         "granularity": 65536,
3701         "name": "bitmap0",
3702         "persistent": false,
3703         "recording": true
3704       }
3705     ]
3706   }
3709 = Checking Bitmap bitmap0 =
3710 expecting 0 dirty sectors; have 0. OK!
3712 --- Cleanup ---
3714 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
3715 {"return": {}}
3717   "bitmaps": {}
3720 --- Verification ---
3722 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
3723 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3724 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3727 === Mode top; Bitmap Sync on-success with simulated failure ===
3729 --- Preparing image & VM ---
3731 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
3732 {"return": {}}
3734 --- Write #0 ---
3736 write -P0x49 0x0000000 0x10000
3737 {"return": ""}
3738 write -P0x6c 0x0100000 0x10000
3739 {"return": ""}
3740 write -P0x6f 0x2000000 0x10000
3741 {"return": ""}
3742 write -P0x76 0x3ff0000 0x10000
3743 {"return": ""}
3745   "bitmaps": {}
3748 --- Reference Backup #0 ---
3751 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3752 {"return": {}}
3755 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3756 {"return": {}}
3758 {"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}}}
3759 {"return": {}}
3760 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3762 --- Add Bitmap ---
3764 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
3765 {"return": {}}
3767 --- Write #1 ---
3769 write -P0x65 0x0000000 0x10000
3770 {"return": ""}
3771 write -P0x77 0x00f8000 0x10000
3772 {"return": ""}
3773 write -P0x72 0x2008000 0x10000
3774 {"return": ""}
3775 write -P0x69 0x3fe0000 0x10000
3776 {"return": ""}
3778   "bitmaps": {
3779     "drive0": [
3780       {
3781         "busy": false,
3782         "count": 393216,
3783         "granularity": 65536,
3784         "name": "bitmap0",
3785         "persistent": false,
3786         "recording": true
3787       }
3788     ]
3789   }
3792 = Checking Bitmap bitmap0 =
3793 expecting 6 dirty sectors; have 6. OK!
3795 --- Reference Backup #1 ---
3798 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3799 {"return": {}}
3802 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3803 {"return": {}}
3805 {"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}}}
3806 {"return": {}}
3807 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3809 --- Test Backup #1 ---
3812 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3813 {"return": {}}
3816 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3817 {"return": {}}
3819 {"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}}}
3820 {"return": {}}
3822 --- Write #2 ---
3824 write -P0x74 0x0010000 0x10000
3825 {"return": ""}
3826 write -P0x69 0x00e8000 0x10000
3827 {"return": ""}
3828 write -P0x6e 0x2018000 0x10000
3829 {"return": ""}
3830 write -P0x67 0x3fe0000 0x20000
3831 {"return": ""}
3833   "bitmaps": {
3834     "backup-top": [
3835       {
3836         "busy": false,
3837         "count": 67108864,
3838         "granularity": 65536,
3839         "persistent": false,
3840         "recording": false
3841       },
3842       {
3843         "busy": false,
3844         "count": 458752,
3845         "granularity": 65536,
3846         "persistent": false,
3847         "recording": false
3848       }
3849     ],
3850     "drive0": [
3851       {
3852         "busy": false,
3853         "count": 0,
3854         "granularity": 65536,
3855         "persistent": false,
3856         "recording": false
3857       },
3858       {
3859         "busy": false,
3860         "count": 458752,
3861         "granularity": 65536,
3862         "persistent": false,
3863         "recording": true
3864       },
3865       {
3866         "busy": true,
3867         "count": 393216,
3868         "granularity": 65536,
3869         "name": "bitmap0",
3870         "persistent": false,
3871         "recording": true
3872       }
3873     ]
3874   }
3877 = Checking Bitmap bitmap0 =
3878 expecting 6 dirty sectors; have 6. OK!
3880 = Checking Bitmap (anonymous) =
3881 expecting 7 dirty sectors; have 7. OK!
3883 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
3884 {"return": {}}
3885 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3886 {"data": {"device": "backup_1", "len": 458752, "offset": 458752, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3888   "bitmaps": {
3889     "drive0": [
3890       {
3891         "busy": false,
3892         "count": 655360,
3893         "granularity": 65536,
3894         "name": "bitmap0",
3895         "persistent": false,
3896         "recording": true
3897       }
3898     ]
3899   }
3902 = Checking Bitmap bitmap0 =
3903 expecting 10 dirty sectors; have 10. OK!
3905 --- Write #3 ---
3907 write -P0xaa 0x0010000 0x30000
3908 {"return": ""}
3909 write -P0xbb 0x00d8000 0x10000
3910 {"return": ""}
3911 write -P0xcc 0x2028000 0x10000
3912 {"return": ""}
3913 write -P0xdd 0x3fc0000 0x10000
3914 {"return": ""}
3916   "bitmaps": {
3917     "drive0": [
3918       {
3919         "busy": false,
3920         "count": 983040,
3921         "granularity": 65536,
3922         "name": "bitmap0",
3923         "persistent": false,
3924         "recording": true
3925       }
3926     ]
3927   }
3930 = Checking Bitmap bitmap0 =
3931 expecting 15 dirty sectors; have 15. OK!
3933 --- Reference Backup #2 ---
3936 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3937 {"return": {}}
3940 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3941 {"return": {}}
3943 {"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}}}
3944 {"return": {}}
3945 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3947 --- Test Backup #2 ---
3950 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3951 {"return": {}}
3954 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3955 {"return": {}}
3957 {"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}}}
3958 {"return": {}}
3959 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3960 {"return": {}}
3961 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3962 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3964   "bitmaps": {
3965     "drive0": [
3966       {
3967         "busy": false,
3968         "count": 0,
3969         "granularity": 65536,
3970         "name": "bitmap0",
3971         "persistent": false,
3972         "recording": true
3973       }
3974     ]
3975   }
3978 = Checking Bitmap bitmap0 =
3979 expecting 0 dirty sectors; have 0. OK!
3981 --- Cleanup ---
3983 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
3984 {"return": {}}
3986   "bitmaps": {}
3989 --- Verification ---
3991 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
3992 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3993 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3996 === Mode top; Bitmap Sync on-success with intermediate failure ===
3998 --- Preparing image & VM ---
4000 {"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"}}
4001 {"return": {}}
4003 --- Write #0 ---
4005 write -P0x49 0x0000000 0x10000
4006 {"return": ""}
4007 write -P0x6c 0x0100000 0x10000
4008 {"return": ""}
4009 write -P0x6f 0x2000000 0x10000
4010 {"return": ""}
4011 write -P0x76 0x3ff0000 0x10000
4012 {"return": ""}
4014   "bitmaps": {}
4017 --- Reference Backup #0 ---
4020 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4021 {"return": {}}
4024 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4025 {"return": {}}
4027 {"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}}}
4028 {"return": {}}
4029 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4031 --- Add Bitmap ---
4033 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4034 {"return": {}}
4036 --- Write #1 ---
4038 write -P0x65 0x0000000 0x10000
4039 {"return": ""}
4040 write -P0x77 0x00f8000 0x10000
4041 {"return": ""}
4042 write -P0x72 0x2008000 0x10000
4043 {"return": ""}
4044 write -P0x69 0x3fe0000 0x10000
4045 {"return": ""}
4047   "bitmaps": {
4048     "drive0": [
4049       {
4050         "busy": false,
4051         "count": 393216,
4052         "granularity": 65536,
4053         "name": "bitmap0",
4054         "persistent": false,
4055         "recording": true
4056       }
4057     ]
4058   }
4061 = Checking Bitmap bitmap0 =
4062 expecting 6 dirty sectors; have 6. OK!
4064 --- Reference Backup #1 ---
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_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
4075 {"return": {}}
4076 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4078 {"return": ""}
4080 --- Test Backup #1 ---
4083 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4084 {"return": {}}
4087 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4088 {"return": {}}
4090 {"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}}}
4091 {"return": {}}
4092 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4093 {"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"}}
4095   "bitmaps": {
4096     "drive0": [
4097       {
4098         "busy": false,
4099         "count": 393216,
4100         "granularity": 65536,
4101         "name": "bitmap0",
4102         "persistent": false,
4103         "recording": true
4104       }
4105     ]
4106   }
4109 = Checking Bitmap bitmap0 =
4110 expecting 6 dirty sectors; have 6. OK!
4112 --- Write #3 ---
4114 write -P0xaa 0x0010000 0x30000
4115 {"return": ""}
4116 write -P0xbb 0x00d8000 0x10000
4117 {"return": ""}
4118 write -P0xcc 0x2028000 0x10000
4119 {"return": ""}
4120 write -P0xdd 0x3fc0000 0x10000
4121 {"return": ""}
4123   "bitmaps": {
4124     "drive0": [
4125       {
4126         "busy": false,
4127         "count": 917504,
4128         "granularity": 65536,
4129         "name": "bitmap0",
4130         "persistent": false,
4131         "recording": true
4132       }
4133     ]
4134   }
4137 = Checking Bitmap bitmap0 =
4138 expecting 14 dirty sectors; have 14. OK!
4140 --- Reference Backup #2 ---
4143 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4144 {"return": {}}
4147 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4148 {"return": {}}
4150 {"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}}}
4151 {"return": {}}
4152 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4154 --- Test Backup #2 ---
4157 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4158 {"return": {}}
4161 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4162 {"return": {}}
4164 {"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}}}
4165 {"return": {}}
4166 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
4167 {"return": {}}
4168 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4169 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4171   "bitmaps": {
4172     "drive0": [
4173       {
4174         "busy": false,
4175         "count": 0,
4176         "granularity": 65536,
4177         "name": "bitmap0",
4178         "persistent": false,
4179         "recording": true
4180       }
4181     ]
4182   }
4185 = Checking Bitmap bitmap0 =
4186 expecting 0 dirty sectors; have 0. OK!
4188 --- Cleanup ---
4190 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4191 {"return": {}}
4193   "bitmaps": {}
4196 --- Verification ---
4198 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
4199 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4200 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4203 === Mode top; Bitmap Sync on-success without failure ===
4205 --- Preparing image & VM ---
4207 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
4208 {"return": {}}
4210 --- Write #0 ---
4212 write -P0x49 0x0000000 0x10000
4213 {"return": ""}
4214 write -P0x6c 0x0100000 0x10000
4215 {"return": ""}
4216 write -P0x6f 0x2000000 0x10000
4217 {"return": ""}
4218 write -P0x76 0x3ff0000 0x10000
4219 {"return": ""}
4221   "bitmaps": {}
4224 --- Reference Backup #0 ---
4227 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4228 {"return": {}}
4231 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4232 {"return": {}}
4234 {"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}}}
4235 {"return": {}}
4236 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4238 --- Add Bitmap ---
4240 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4241 {"return": {}}
4243 --- Write #1 ---
4245 write -P0x65 0x0000000 0x10000
4246 {"return": ""}
4247 write -P0x77 0x00f8000 0x10000
4248 {"return": ""}
4249 write -P0x72 0x2008000 0x10000
4250 {"return": ""}
4251 write -P0x69 0x3fe0000 0x10000
4252 {"return": ""}
4254   "bitmaps": {
4255     "drive0": [
4256       {
4257         "busy": false,
4258         "count": 393216,
4259         "granularity": 65536,
4260         "name": "bitmap0",
4261         "persistent": false,
4262         "recording": true
4263       }
4264     ]
4265   }
4268 = Checking Bitmap bitmap0 =
4269 expecting 6 dirty sectors; have 6. OK!
4271 --- Reference Backup #1 ---
4274 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4275 {"return": {}}
4278 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4279 {"return": {}}
4281 {"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}}}
4282 {"return": {}}
4283 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4285 --- Test Backup #1 ---
4288 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4289 {"return": {}}
4292 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4293 {"return": {}}
4295 {"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}}}
4296 {"return": {}}
4298 --- Write #2 ---
4300 write -P0x74 0x0010000 0x10000
4301 {"return": ""}
4302 write -P0x69 0x00e8000 0x10000
4303 {"return": ""}
4304 write -P0x6e 0x2018000 0x10000
4305 {"return": ""}
4306 write -P0x67 0x3fe0000 0x20000
4307 {"return": ""}
4309   "bitmaps": {
4310     "backup-top": [
4311       {
4312         "busy": false,
4313         "count": 67108864,
4314         "granularity": 65536,
4315         "persistent": false,
4316         "recording": false
4317       },
4318       {
4319         "busy": false,
4320         "count": 458752,
4321         "granularity": 65536,
4322         "persistent": false,
4323         "recording": false
4324       }
4325     ],
4326     "drive0": [
4327       {
4328         "busy": false,
4329         "count": 0,
4330         "granularity": 65536,
4331         "persistent": false,
4332         "recording": false
4333       },
4334       {
4335         "busy": false,
4336         "count": 458752,
4337         "granularity": 65536,
4338         "persistent": false,
4339         "recording": true
4340       },
4341       {
4342         "busy": true,
4343         "count": 393216,
4344         "granularity": 65536,
4345         "name": "bitmap0",
4346         "persistent": false,
4347         "recording": true
4348       }
4349     ]
4350   }
4353 = Checking Bitmap bitmap0 =
4354 expecting 6 dirty sectors; have 6. OK!
4356 = Checking Bitmap (anonymous) =
4357 expecting 7 dirty sectors; have 7. OK!
4359 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
4360 {"return": {}}
4361 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4362 {"data": {"device": "backup_1", "len": 458752, "offset": 458752, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4364   "bitmaps": {
4365     "drive0": [
4366       {
4367         "busy": false,
4368         "count": 458752,
4369         "granularity": 65536,
4370         "name": "bitmap0",
4371         "persistent": false,
4372         "recording": true
4373       }
4374     ]
4375   }
4378 = Checking Bitmap bitmap0 =
4379 expecting 7 dirty sectors; have 7. OK!
4381 --- Write #3 ---
4383 write -P0xaa 0x0010000 0x30000
4384 {"return": ""}
4385 write -P0xbb 0x00d8000 0x10000
4386 {"return": ""}
4387 write -P0xcc 0x2028000 0x10000
4388 {"return": ""}
4389 write -P0xdd 0x3fc0000 0x10000
4390 {"return": ""}
4392   "bitmaps": {
4393     "drive0": [
4394       {
4395         "busy": false,
4396         "count": 786432,
4397         "granularity": 65536,
4398         "name": "bitmap0",
4399         "persistent": false,
4400         "recording": true
4401       }
4402     ]
4403   }
4406 = Checking Bitmap bitmap0 =
4407 expecting 12 dirty sectors; have 12. OK!
4409 --- Reference Backup #2 ---
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_2", "sync": "full", "target": "ref_target_2", "x-perf": {"max-workers": 1}}}
4420 {"return": {}}
4421 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4423 --- Test Backup #2 ---
4426 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4427 {"return": {}}
4430 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4431 {"return": {}}
4433 {"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}}}
4434 {"return": {}}
4435 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
4436 {"return": {}}
4437 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4438 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4440   "bitmaps": {
4441     "drive0": [
4442       {
4443         "busy": false,
4444         "count": 0,
4445         "granularity": 65536,
4446         "name": "bitmap0",
4447         "persistent": false,
4448         "recording": true
4449       }
4450     ]
4451   }
4454 = Checking Bitmap bitmap0 =
4455 expecting 0 dirty sectors; have 0. OK!
4457 --- Cleanup ---
4459 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4460 {"return": {}}
4462   "bitmaps": {}
4465 --- Verification ---
4467 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
4468 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4469 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4472 === Mode top; Bitmap Sync always with simulated failure ===
4474 --- Preparing image & VM ---
4476 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
4477 {"return": {}}
4479 --- Write #0 ---
4481 write -P0x49 0x0000000 0x10000
4482 {"return": ""}
4483 write -P0x6c 0x0100000 0x10000
4484 {"return": ""}
4485 write -P0x6f 0x2000000 0x10000
4486 {"return": ""}
4487 write -P0x76 0x3ff0000 0x10000
4488 {"return": ""}
4490   "bitmaps": {}
4493 --- Reference Backup #0 ---
4496 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4497 {"return": {}}
4500 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4501 {"return": {}}
4503 {"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}}}
4504 {"return": {}}
4505 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4507 --- Add Bitmap ---
4509 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4510 {"return": {}}
4512 --- Write #1 ---
4514 write -P0x65 0x0000000 0x10000
4515 {"return": ""}
4516 write -P0x77 0x00f8000 0x10000
4517 {"return": ""}
4518 write -P0x72 0x2008000 0x10000
4519 {"return": ""}
4520 write -P0x69 0x3fe0000 0x10000
4521 {"return": ""}
4523   "bitmaps": {
4524     "drive0": [
4525       {
4526         "busy": false,
4527         "count": 393216,
4528         "granularity": 65536,
4529         "name": "bitmap0",
4530         "persistent": false,
4531         "recording": true
4532       }
4533     ]
4534   }
4537 = Checking Bitmap bitmap0 =
4538 expecting 6 dirty sectors; have 6. OK!
4540 --- Reference Backup #1 ---
4543 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4544 {"return": {}}
4547 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4548 {"return": {}}
4550 {"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}}}
4551 {"return": {}}
4552 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4554 --- Test Backup #1 ---
4557 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4558 {"return": {}}
4561 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4562 {"return": {}}
4564 {"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}}}
4565 {"return": {}}
4567 --- Write #2 ---
4569 write -P0x74 0x0010000 0x10000
4570 {"return": ""}
4571 write -P0x69 0x00e8000 0x10000
4572 {"return": ""}
4573 write -P0x6e 0x2018000 0x10000
4574 {"return": ""}
4575 write -P0x67 0x3fe0000 0x20000
4576 {"return": ""}
4578   "bitmaps": {
4579     "backup-top": [
4580       {
4581         "busy": false,
4582         "count": 67108864,
4583         "granularity": 65536,
4584         "persistent": false,
4585         "recording": false
4586       },
4587       {
4588         "busy": false,
4589         "count": 458752,
4590         "granularity": 65536,
4591         "persistent": false,
4592         "recording": false
4593       }
4594     ],
4595     "drive0": [
4596       {
4597         "busy": false,
4598         "count": 0,
4599         "granularity": 65536,
4600         "persistent": false,
4601         "recording": false
4602       },
4603       {
4604         "busy": false,
4605         "count": 458752,
4606         "granularity": 65536,
4607         "persistent": false,
4608         "recording": true
4609       },
4610       {
4611         "busy": true,
4612         "count": 393216,
4613         "granularity": 65536,
4614         "name": "bitmap0",
4615         "persistent": false,
4616         "recording": true
4617       }
4618     ]
4619   }
4622 = Checking Bitmap bitmap0 =
4623 expecting 6 dirty sectors; have 6. OK!
4625 = Checking Bitmap (anonymous) =
4626 expecting 7 dirty sectors; have 7. OK!
4628 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
4629 {"return": {}}
4630 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4631 {"data": {"device": "backup_1", "len": 458752, "offset": 458752, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4633   "bitmaps": {
4634     "drive0": [
4635       {
4636         "busy": false,
4637         "count": 458752,
4638         "granularity": 65536,
4639         "name": "bitmap0",
4640         "persistent": false,
4641         "recording": true
4642       }
4643     ]
4644   }
4647 = Checking Bitmap bitmap0 =
4648 expecting 7 dirty sectors; have 7. OK!
4650 --- Write #3 ---
4652 write -P0xaa 0x0010000 0x30000
4653 {"return": ""}
4654 write -P0xbb 0x00d8000 0x10000
4655 {"return": ""}
4656 write -P0xcc 0x2028000 0x10000
4657 {"return": ""}
4658 write -P0xdd 0x3fc0000 0x10000
4659 {"return": ""}
4661   "bitmaps": {
4662     "drive0": [
4663       {
4664         "busy": false,
4665         "count": 786432,
4666         "granularity": 65536,
4667         "name": "bitmap0",
4668         "persistent": false,
4669         "recording": true
4670       }
4671     ]
4672   }
4675 = Checking Bitmap bitmap0 =
4676 expecting 12 dirty sectors; have 12. OK!
4678 --- Reference Backup #2 ---
4681 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4682 {"return": {}}
4685 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4686 {"return": {}}
4688 {"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}}}
4689 {"return": {}}
4690 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4692 --- Test Backup #2 ---
4695 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4696 {"return": {}}
4699 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4700 {"return": {}}
4702 {"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}}}
4703 {"return": {}}
4704 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
4705 {"return": {}}
4706 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4707 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4709   "bitmaps": {
4710     "drive0": [
4711       {
4712         "busy": false,
4713         "count": 0,
4714         "granularity": 65536,
4715         "name": "bitmap0",
4716         "persistent": false,
4717         "recording": true
4718       }
4719     ]
4720   }
4723 = Checking Bitmap bitmap0 =
4724 expecting 0 dirty sectors; have 0. OK!
4726 --- Cleanup ---
4728 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4729 {"return": {}}
4731   "bitmaps": {}
4734 --- Verification ---
4736 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
4737 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4738 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4741 === Mode top; Bitmap Sync always with intermediate failure ===
4743 --- Preparing image & VM ---
4745 {"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"}}
4746 {"return": {}}
4748 --- Write #0 ---
4750 write -P0x49 0x0000000 0x10000
4751 {"return": ""}
4752 write -P0x6c 0x0100000 0x10000
4753 {"return": ""}
4754 write -P0x6f 0x2000000 0x10000
4755 {"return": ""}
4756 write -P0x76 0x3ff0000 0x10000
4757 {"return": ""}
4759   "bitmaps": {}
4762 --- Reference Backup #0 ---
4765 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4766 {"return": {}}
4769 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4770 {"return": {}}
4772 {"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}}}
4773 {"return": {}}
4774 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4776 --- Add Bitmap ---
4778 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4779 {"return": {}}
4781 --- Write #1 ---
4783 write -P0x65 0x0000000 0x10000
4784 {"return": ""}
4785 write -P0x77 0x00f8000 0x10000
4786 {"return": ""}
4787 write -P0x72 0x2008000 0x10000
4788 {"return": ""}
4789 write -P0x69 0x3fe0000 0x10000
4790 {"return": ""}
4792   "bitmaps": {
4793     "drive0": [
4794       {
4795         "busy": false,
4796         "count": 393216,
4797         "granularity": 65536,
4798         "name": "bitmap0",
4799         "persistent": false,
4800         "recording": true
4801       }
4802     ]
4803   }
4806 = Checking Bitmap bitmap0 =
4807 expecting 6 dirty sectors; have 6. OK!
4809 --- Reference Backup #1 ---
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": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
4820 {"return": {}}
4821 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4823 {"return": ""}
4825 --- Test Backup #1 ---
4828 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4829 {"return": {}}
4832 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4833 {"return": {}}
4835 {"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}}}
4836 {"return": {}}
4837 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4838 {"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"}}
4840   "bitmaps": {
4841     "drive0": [
4842       {
4843         "busy": false,
4844         "count": 393216,
4845         "granularity": 65536,
4846         "name": "bitmap0",
4847         "persistent": false,
4848         "recording": true
4849       }
4850     ]
4851   }
4854 = Checking Bitmap bitmap0 =
4855 expecting 6 dirty sectors; have 6. OK!
4857 --- Write #3 ---
4859 write -P0xaa 0x0010000 0x30000
4860 {"return": ""}
4861 write -P0xbb 0x00d8000 0x10000
4862 {"return": ""}
4863 write -P0xcc 0x2028000 0x10000
4864 {"return": ""}
4865 write -P0xdd 0x3fc0000 0x10000
4866 {"return": ""}
4868   "bitmaps": {
4869     "drive0": [
4870       {
4871         "busy": false,
4872         "count": 917504,
4873         "granularity": 65536,
4874         "name": "bitmap0",
4875         "persistent": false,
4876         "recording": true
4877       }
4878     ]
4879   }
4882 = Checking Bitmap bitmap0 =
4883 expecting 14 dirty sectors; have 14. OK!
4885 --- Reference Backup #2 ---
4888 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4889 {"return": {}}
4892 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4893 {"return": {}}
4895 {"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}}}
4896 {"return": {}}
4897 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4899 --- Test Backup #2 ---
4902 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4903 {"return": {}}
4906 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4907 {"return": {}}
4909 {"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}}}
4910 {"return": {}}
4911 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
4912 {"return": {}}
4913 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4914 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4916   "bitmaps": {
4917     "drive0": [
4918       {
4919         "busy": false,
4920         "count": 0,
4921         "granularity": 65536,
4922         "name": "bitmap0",
4923         "persistent": false,
4924         "recording": true
4925       }
4926     ]
4927   }
4930 = Checking Bitmap bitmap0 =
4931 expecting 0 dirty sectors; have 0. OK!
4933 --- Cleanup ---
4935 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4936 {"return": {}}
4938   "bitmaps": {}
4941 --- Verification ---
4943 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
4944 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4945 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4948 === Mode top; Bitmap Sync always without failure ===
4950 --- Preparing image & VM ---
4952 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
4953 {"return": {}}
4955 --- Write #0 ---
4957 write -P0x49 0x0000000 0x10000
4958 {"return": ""}
4959 write -P0x6c 0x0100000 0x10000
4960 {"return": ""}
4961 write -P0x6f 0x2000000 0x10000
4962 {"return": ""}
4963 write -P0x76 0x3ff0000 0x10000
4964 {"return": ""}
4966   "bitmaps": {}
4969 --- Reference Backup #0 ---
4972 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4973 {"return": {}}
4976 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4977 {"return": {}}
4979 {"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}}}
4980 {"return": {}}
4981 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4983 --- Add Bitmap ---
4985 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4986 {"return": {}}
4988 --- Write #1 ---
4990 write -P0x65 0x0000000 0x10000
4991 {"return": ""}
4992 write -P0x77 0x00f8000 0x10000
4993 {"return": ""}
4994 write -P0x72 0x2008000 0x10000
4995 {"return": ""}
4996 write -P0x69 0x3fe0000 0x10000
4997 {"return": ""}
4999   "bitmaps": {
5000     "drive0": [
5001       {
5002         "busy": false,
5003         "count": 393216,
5004         "granularity": 65536,
5005         "name": "bitmap0",
5006         "persistent": false,
5007         "recording": true
5008       }
5009     ]
5010   }
5013 = Checking Bitmap bitmap0 =
5014 expecting 6 dirty sectors; have 6. OK!
5016 --- Reference Backup #1 ---
5019 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
5020 {"return": {}}
5023 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
5024 {"return": {}}
5026 {"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}}}
5027 {"return": {}}
5028 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
5030 --- Test Backup #1 ---
5033 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
5034 {"return": {}}
5037 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
5038 {"return": {}}
5040 {"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}}}
5041 {"return": {}}
5043 --- Write #2 ---
5045 write -P0x74 0x0010000 0x10000
5046 {"return": ""}
5047 write -P0x69 0x00e8000 0x10000
5048 {"return": ""}
5049 write -P0x6e 0x2018000 0x10000
5050 {"return": ""}
5051 write -P0x67 0x3fe0000 0x20000
5052 {"return": ""}
5054   "bitmaps": {
5055     "backup-top": [
5056       {
5057         "busy": false,
5058         "count": 67108864,
5059         "granularity": 65536,
5060         "persistent": false,
5061         "recording": false
5062       },
5063       {
5064         "busy": false,
5065         "count": 458752,
5066         "granularity": 65536,
5067         "persistent": false,
5068         "recording": false
5069       }
5070     ],
5071     "drive0": [
5072       {
5073         "busy": false,
5074         "count": 0,
5075         "granularity": 65536,
5076         "persistent": false,
5077         "recording": false
5078       },
5079       {
5080         "busy": false,
5081         "count": 458752,
5082         "granularity": 65536,
5083         "persistent": false,
5084         "recording": true
5085       },
5086       {
5087         "busy": true,
5088         "count": 393216,
5089         "granularity": 65536,
5090         "name": "bitmap0",
5091         "persistent": false,
5092         "recording": true
5093       }
5094     ]
5095   }
5098 = Checking Bitmap bitmap0 =
5099 expecting 6 dirty sectors; have 6. OK!
5101 = Checking Bitmap (anonymous) =
5102 expecting 7 dirty sectors; have 7. OK!
5104 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
5105 {"return": {}}
5106 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
5107 {"data": {"device": "backup_1", "len": 458752, "offset": 458752, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
5109   "bitmaps": {
5110     "drive0": [
5111       {
5112         "busy": false,
5113         "count": 458752,
5114         "granularity": 65536,
5115         "name": "bitmap0",
5116         "persistent": false,
5117         "recording": true
5118       }
5119     ]
5120   }
5123 = Checking Bitmap bitmap0 =
5124 expecting 7 dirty sectors; have 7. OK!
5126 --- Write #3 ---
5128 write -P0xaa 0x0010000 0x30000
5129 {"return": ""}
5130 write -P0xbb 0x00d8000 0x10000
5131 {"return": ""}
5132 write -P0xcc 0x2028000 0x10000
5133 {"return": ""}
5134 write -P0xdd 0x3fc0000 0x10000
5135 {"return": ""}
5137   "bitmaps": {
5138     "drive0": [
5139       {
5140         "busy": false,
5141         "count": 786432,
5142         "granularity": 65536,
5143         "name": "bitmap0",
5144         "persistent": false,
5145         "recording": true
5146       }
5147     ]
5148   }
5151 = Checking Bitmap bitmap0 =
5152 expecting 12 dirty sectors; have 12. OK!
5154 --- Reference Backup #2 ---
5157 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
5158 {"return": {}}
5161 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
5162 {"return": {}}
5164 {"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}}}
5165 {"return": {}}
5166 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
5168 --- Test Backup #2 ---
5171 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
5172 {"return": {}}
5175 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
5176 {"return": {}}
5178 {"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}}}
5179 {"return": {}}
5180 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
5181 {"return": {}}
5182 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
5183 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
5185   "bitmaps": {
5186     "drive0": [
5187       {
5188         "busy": false,
5189         "count": 0,
5190         "granularity": 65536,
5191         "name": "bitmap0",
5192         "persistent": false,
5193         "recording": true
5194       }
5195     ]
5196   }
5199 = Checking Bitmap bitmap0 =
5200 expecting 0 dirty sectors; have 0. OK!
5202 --- Cleanup ---
5204 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
5205 {"return": {}}
5207   "bitmaps": {}
5210 --- Verification ---
5212 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
5213 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
5214 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
5217 === API failure tests ===
5219 --- Preparing image & VM ---
5221 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
5222 {"return": {}}
5225 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
5226 {"return": {}}
5229 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
5230 {"return": {}}
5233 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
5234 {"return": {}}
5236 -- Testing invalid QMP commands --
5238 -- Sync mode incremental tests --
5240 {"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}}}
5241 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'incremental' sync mode"}}
5243 {"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}}}
5244 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'incremental' sync mode"}}
5246 {"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}}}
5247 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'incremental' sync mode"}}
5249 {"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}}}
5250 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'incremental' sync mode"}}
5252 {"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}}}
5253 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5255 {"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}}}
5256 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-success' when using sync mode 'incremental'"}}
5258 {"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}}}
5259 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-success' when using sync mode 'incremental'"}}
5261 {"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}}}
5262 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5264 {"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}}}
5265 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-success' when using sync mode 'incremental'"}}
5267 {"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}}}
5268 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-success' when using sync mode 'incremental'"}}
5270 -- Sync mode bitmap tests --
5272 {"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}}}
5273 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'bitmap' sync mode"}}
5275 {"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}}}
5276 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'bitmap' sync mode"}}
5278 {"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}}}
5279 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'bitmap' sync mode"}}
5281 {"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}}}
5282 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'bitmap' sync mode"}}
5284 {"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}}}
5285 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5287 {"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}}}
5288 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5290 {"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}}}
5291 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5293 {"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}}}
5294 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5296 {"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}}}
5297 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be given when providing a bitmap"}}
5299 -- Sync mode full tests --
5301 {"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}}}
5302 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5304 {"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}}}
5305 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5307 {"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}}}
5308 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5310 {"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}}}
5311 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5313 {"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}}}
5314 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5316 {"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}}}
5317 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5319 {"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}}}
5320 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5322 {"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}}}
5323 {"error": {"class": "GenericError", "desc": "Bitmap sync mode 'never' has no meaningful effect when combined with sync mode 'full'"}}
5325 {"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}}}
5326 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be given when providing a bitmap"}}
5328 -- Sync mode top tests --
5330 {"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}}}
5331 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5333 {"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}}}
5334 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5336 {"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}}}
5337 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5339 {"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}}}
5340 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5342 {"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}}}
5343 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5345 {"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}}}
5346 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5348 {"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}}}
5349 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5351 {"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}}}
5352 {"error": {"class": "GenericError", "desc": "Bitmap sync mode 'never' has no meaningful effect when combined with sync mode 'top'"}}
5354 {"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}}}
5355 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be given when providing a bitmap"}}
5357 -- Sync mode none tests --
5359 {"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}}}
5360 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5362 {"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}}}
5363 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5365 {"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}}}
5366 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5368 {"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}}}
5369 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5371 {"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}}}
5372 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5374 {"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}}}
5375 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5377 {"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}}}
5378 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5380 {"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}}}
5381 {"error": {"class": "GenericError", "desc": "sync mode 'none' does not produce meaningful bitmap outputs"}}
5383 {"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}}}
5384 {"error": {"class": "GenericError", "desc": "sync mode 'none' does not produce meaningful bitmap outputs"}}
5386 {"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}}}
5387 {"error": {"class": "GenericError", "desc": "sync mode 'none' does not produce meaningful bitmap outputs"}}
5389 {"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}}}
5390 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be given when providing a bitmap"}}