tcg/optimize: Split out fold_xx_to_i
[qemu/ar7.git] / tests / qemu-iotests / 257.out
blob50cbd8e882bcf70a6160c41b0567619bd974b14a
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     "drive0": [
110       {
111         "busy": false,
112         "count": 0,
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": true
123       },
124       {
125         "busy": true,
126         "count": 393216,
127         "granularity": 65536,
128         "name": "bitmap0",
129         "persistent": false,
130         "recording": true
131       }
132     ]
133   }
136 = Checking Bitmap bitmap0 =
137 expecting 6 dirty sectors; have 6. OK!
139 = Checking Bitmap (anonymous) =
140 expecting 7 dirty sectors; have 7. OK!
142 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
143 {"return": {}}
144 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
145 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
147   "bitmaps": {
148     "drive0": [
149       {
150         "busy": false,
151         "count": 655360,
152         "granularity": 65536,
153         "name": "bitmap0",
154         "persistent": false,
155         "recording": true
156       }
157     ]
158   }
161 = Checking Bitmap bitmap0 =
162 expecting 10 dirty sectors; have 10. OK!
164 --- Write #3 ---
166 write -P0xaa 0x0010000 0x30000
167 {"return": ""}
168 write -P0xbb 0x00d8000 0x10000
169 {"return": ""}
170 write -P0xcc 0x2028000 0x10000
171 {"return": ""}
172 write -P0xdd 0x3fc0000 0x10000
173 {"return": ""}
175   "bitmaps": {
176     "drive0": [
177       {
178         "busy": false,
179         "count": 983040,
180         "granularity": 65536,
181         "name": "bitmap0",
182         "persistent": false,
183         "recording": true
184       }
185     ]
186   }
189 = Checking Bitmap bitmap0 =
190 expecting 15 dirty sectors; have 15. OK!
192 --- Reference Backup #2 ---
195 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
196 {"return": {}}
199 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
200 {"return": {}}
202 {"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}}}
203 {"return": {}}
204 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
206 --- Test Backup #2 ---
209 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
210 {"return": {}}
213 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
214 {"return": {}}
216 {"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}}}
217 {"return": {}}
218 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
219 {"return": {}}
220 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
221 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
223   "bitmaps": {
224     "drive0": [
225       {
226         "busy": false,
227         "count": 983040,
228         "granularity": 65536,
229         "name": "bitmap0",
230         "persistent": false,
231         "recording": true
232       }
233     ]
234   }
237 = Checking Bitmap bitmap0 =
238 expecting 15 dirty sectors; have 15. OK!
240 --- Cleanup ---
242 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
243 {"return": {}}
245   "bitmaps": {}
248 --- Verification ---
250 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
251 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
252 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
255 === Mode bitmap; Bitmap Sync never with intermediate failure ===
257 --- Preparing image & VM ---
259 {"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"}}
260 {"return": {}}
262 --- Write #0 ---
264 write -P0x49 0x0000000 0x10000
265 {"return": ""}
266 write -P0x6c 0x0100000 0x10000
267 {"return": ""}
268 write -P0x6f 0x2000000 0x10000
269 {"return": ""}
270 write -P0x76 0x3ff0000 0x10000
271 {"return": ""}
273   "bitmaps": {}
276 --- Reference Backup #0 ---
279 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
280 {"return": {}}
283 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
284 {"return": {}}
286 {"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}}}
287 {"return": {}}
288 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
290 --- Add Bitmap ---
292 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
293 {"return": {}}
295 --- Write #1 ---
297 write -P0x65 0x0000000 0x10000
298 {"return": ""}
299 write -P0x77 0x00f8000 0x10000
300 {"return": ""}
301 write -P0x72 0x2008000 0x10000
302 {"return": ""}
303 write -P0x69 0x3fe0000 0x10000
304 {"return": ""}
306   "bitmaps": {
307     "drive0": [
308       {
309         "busy": false,
310         "count": 393216,
311         "granularity": 65536,
312         "name": "bitmap0",
313         "persistent": false,
314         "recording": true
315       }
316     ]
317   }
320 = Checking Bitmap bitmap0 =
321 expecting 6 dirty sectors; have 6. OK!
323 --- Reference Backup #1 ---
326 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
327 {"return": {}}
330 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
331 {"return": {}}
333 {"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}}}
334 {"return": {}}
335 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
337 {"return": ""}
339 --- Test 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": {"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}}}
350 {"return": {}}
351 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
352 {"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"}}
354   "bitmaps": {
355     "drive0": [
356       {
357         "busy": false,
358         "count": 393216,
359         "granularity": 65536,
360         "name": "bitmap0",
361         "persistent": false,
362         "recording": true
363       }
364     ]
365   }
368 = Checking Bitmap bitmap0 =
369 expecting 6 dirty sectors; have 6. OK!
371 --- Write #3 ---
373 write -P0xaa 0x0010000 0x30000
374 {"return": ""}
375 write -P0xbb 0x00d8000 0x10000
376 {"return": ""}
377 write -P0xcc 0x2028000 0x10000
378 {"return": ""}
379 write -P0xdd 0x3fc0000 0x10000
380 {"return": ""}
382   "bitmaps": {
383     "drive0": [
384       {
385         "busy": false,
386         "count": 917504,
387         "granularity": 65536,
388         "name": "bitmap0",
389         "persistent": false,
390         "recording": true
391       }
392     ]
393   }
396 = Checking Bitmap bitmap0 =
397 expecting 14 dirty sectors; have 14. OK!
399 --- Reference Backup #2 ---
402 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
403 {"return": {}}
406 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
407 {"return": {}}
409 {"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}}}
410 {"return": {}}
411 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
413 --- Test Backup #2 ---
416 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
417 {"return": {}}
420 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
421 {"return": {}}
423 {"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}}}
424 {"return": {}}
425 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
426 {"return": {}}
427 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
428 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
430   "bitmaps": {
431     "drive0": [
432       {
433         "busy": false,
434         "count": 917504,
435         "granularity": 65536,
436         "name": "bitmap0",
437         "persistent": false,
438         "recording": true
439       }
440     ]
441   }
444 = Checking Bitmap bitmap0 =
445 expecting 14 dirty sectors; have 14. OK!
447 --- Cleanup ---
449 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
450 {"return": {}}
452   "bitmaps": {}
455 --- Verification ---
457 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
458 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
459 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
462 === Mode bitmap; Bitmap Sync never without failure ===
464 --- Preparing image & VM ---
466 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
467 {"return": {}}
469 --- Write #0 ---
471 write -P0x49 0x0000000 0x10000
472 {"return": ""}
473 write -P0x6c 0x0100000 0x10000
474 {"return": ""}
475 write -P0x6f 0x2000000 0x10000
476 {"return": ""}
477 write -P0x76 0x3ff0000 0x10000
478 {"return": ""}
480   "bitmaps": {}
483 --- Reference Backup #0 ---
486 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
487 {"return": {}}
490 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
491 {"return": {}}
493 {"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}}}
494 {"return": {}}
495 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
497 --- Add Bitmap ---
499 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
500 {"return": {}}
502 --- Write #1 ---
504 write -P0x65 0x0000000 0x10000
505 {"return": ""}
506 write -P0x77 0x00f8000 0x10000
507 {"return": ""}
508 write -P0x72 0x2008000 0x10000
509 {"return": ""}
510 write -P0x69 0x3fe0000 0x10000
511 {"return": ""}
513   "bitmaps": {
514     "drive0": [
515       {
516         "busy": false,
517         "count": 393216,
518         "granularity": 65536,
519         "name": "bitmap0",
520         "persistent": false,
521         "recording": true
522       }
523     ]
524   }
527 = Checking Bitmap bitmap0 =
528 expecting 6 dirty sectors; have 6. OK!
530 --- Reference Backup #1 ---
533 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
534 {"return": {}}
537 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
538 {"return": {}}
540 {"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}}}
541 {"return": {}}
542 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
544 --- Test Backup #1 ---
547 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
548 {"return": {}}
551 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
552 {"return": {}}
554 {"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}}}
555 {"return": {}}
557 --- Write #2 ---
559 write -P0x74 0x0010000 0x10000
560 {"return": ""}
561 write -P0x69 0x00e8000 0x10000
562 {"return": ""}
563 write -P0x6e 0x2018000 0x10000
564 {"return": ""}
565 write -P0x67 0x3fe0000 0x20000
566 {"return": ""}
568   "bitmaps": {
569     "drive0": [
570       {
571         "busy": false,
572         "count": 0,
573         "granularity": 65536,
574         "persistent": false,
575         "recording": false
576       },
577       {
578         "busy": false,
579         "count": 458752,
580         "granularity": 65536,
581         "persistent": false,
582         "recording": true
583       },
584       {
585         "busy": true,
586         "count": 393216,
587         "granularity": 65536,
588         "name": "bitmap0",
589         "persistent": false,
590         "recording": true
591       }
592     ]
593   }
596 = Checking Bitmap bitmap0 =
597 expecting 6 dirty sectors; have 6. OK!
599 = Checking Bitmap (anonymous) =
600 expecting 7 dirty sectors; have 7. OK!
602 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
603 {"return": {}}
604 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
605 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
607   "bitmaps": {
608     "drive0": [
609       {
610         "busy": false,
611         "count": 655360,
612         "granularity": 65536,
613         "name": "bitmap0",
614         "persistent": false,
615         "recording": true
616       }
617     ]
618   }
621 = Checking Bitmap bitmap0 =
622 expecting 10 dirty sectors; have 10. OK!
624 --- Write #3 ---
626 write -P0xaa 0x0010000 0x30000
627 {"return": ""}
628 write -P0xbb 0x00d8000 0x10000
629 {"return": ""}
630 write -P0xcc 0x2028000 0x10000
631 {"return": ""}
632 write -P0xdd 0x3fc0000 0x10000
633 {"return": ""}
635   "bitmaps": {
636     "drive0": [
637       {
638         "busy": false,
639         "count": 983040,
640         "granularity": 65536,
641         "name": "bitmap0",
642         "persistent": false,
643         "recording": true
644       }
645     ]
646   }
649 = Checking Bitmap bitmap0 =
650 expecting 15 dirty sectors; have 15. OK!
652 --- Reference Backup #2 ---
655 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
656 {"return": {}}
659 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
660 {"return": {}}
662 {"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}}}
663 {"return": {}}
664 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
666 --- Test Backup #2 ---
669 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
670 {"return": {}}
673 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
674 {"return": {}}
676 {"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}}}
677 {"return": {}}
678 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
679 {"return": {}}
680 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
681 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
683   "bitmaps": {
684     "drive0": [
685       {
686         "busy": false,
687         "count": 983040,
688         "granularity": 65536,
689         "name": "bitmap0",
690         "persistent": false,
691         "recording": true
692       }
693     ]
694   }
697 = Checking Bitmap bitmap0 =
698 expecting 15 dirty sectors; have 15. OK!
700 --- Cleanup ---
702 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
703 {"return": {}}
705   "bitmaps": {}
708 --- Verification ---
710 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
711 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
712 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
715 === Mode bitmap; Bitmap Sync on-success with simulated failure ===
717 --- Preparing image & VM ---
719 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
720 {"return": {}}
722 --- Write #0 ---
724 write -P0x49 0x0000000 0x10000
725 {"return": ""}
726 write -P0x6c 0x0100000 0x10000
727 {"return": ""}
728 write -P0x6f 0x2000000 0x10000
729 {"return": ""}
730 write -P0x76 0x3ff0000 0x10000
731 {"return": ""}
733   "bitmaps": {}
736 --- Reference Backup #0 ---
739 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
740 {"return": {}}
743 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
744 {"return": {}}
746 {"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}}}
747 {"return": {}}
748 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
750 --- Add Bitmap ---
752 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
753 {"return": {}}
755 --- Write #1 ---
757 write -P0x65 0x0000000 0x10000
758 {"return": ""}
759 write -P0x77 0x00f8000 0x10000
760 {"return": ""}
761 write -P0x72 0x2008000 0x10000
762 {"return": ""}
763 write -P0x69 0x3fe0000 0x10000
764 {"return": ""}
766   "bitmaps": {
767     "drive0": [
768       {
769         "busy": false,
770         "count": 393216,
771         "granularity": 65536,
772         "name": "bitmap0",
773         "persistent": false,
774         "recording": true
775       }
776     ]
777   }
780 = Checking Bitmap bitmap0 =
781 expecting 6 dirty sectors; have 6. OK!
783 --- Reference Backup #1 ---
786 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
787 {"return": {}}
790 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
791 {"return": {}}
793 {"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}}}
794 {"return": {}}
795 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
797 --- Test Backup #1 ---
800 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
801 {"return": {}}
804 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
805 {"return": {}}
807 {"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}}}
808 {"return": {}}
810 --- Write #2 ---
812 write -P0x74 0x0010000 0x10000
813 {"return": ""}
814 write -P0x69 0x00e8000 0x10000
815 {"return": ""}
816 write -P0x6e 0x2018000 0x10000
817 {"return": ""}
818 write -P0x67 0x3fe0000 0x20000
819 {"return": ""}
821   "bitmaps": {
822     "drive0": [
823       {
824         "busy": false,
825         "count": 0,
826         "granularity": 65536,
827         "persistent": false,
828         "recording": false
829       },
830       {
831         "busy": false,
832         "count": 458752,
833         "granularity": 65536,
834         "persistent": false,
835         "recording": true
836       },
837       {
838         "busy": true,
839         "count": 393216,
840         "granularity": 65536,
841         "name": "bitmap0",
842         "persistent": false,
843         "recording": true
844       }
845     ]
846   }
849 = Checking Bitmap bitmap0 =
850 expecting 6 dirty sectors; have 6. OK!
852 = Checking Bitmap (anonymous) =
853 expecting 7 dirty sectors; have 7. OK!
855 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
856 {"return": {}}
857 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
858 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
860   "bitmaps": {
861     "drive0": [
862       {
863         "busy": false,
864         "count": 655360,
865         "granularity": 65536,
866         "name": "bitmap0",
867         "persistent": false,
868         "recording": true
869       }
870     ]
871   }
874 = Checking Bitmap bitmap0 =
875 expecting 10 dirty sectors; have 10. OK!
877 --- Write #3 ---
879 write -P0xaa 0x0010000 0x30000
880 {"return": ""}
881 write -P0xbb 0x00d8000 0x10000
882 {"return": ""}
883 write -P0xcc 0x2028000 0x10000
884 {"return": ""}
885 write -P0xdd 0x3fc0000 0x10000
886 {"return": ""}
888   "bitmaps": {
889     "drive0": [
890       {
891         "busy": false,
892         "count": 983040,
893         "granularity": 65536,
894         "name": "bitmap0",
895         "persistent": false,
896         "recording": true
897       }
898     ]
899   }
902 = Checking Bitmap bitmap0 =
903 expecting 15 dirty sectors; have 15. OK!
905 --- Reference Backup #2 ---
908 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
909 {"return": {}}
912 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
913 {"return": {}}
915 {"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}}}
916 {"return": {}}
917 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
919 --- Test Backup #2 ---
922 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
923 {"return": {}}
926 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
927 {"return": {}}
929 {"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}}}
930 {"return": {}}
931 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
932 {"return": {}}
933 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
934 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
936   "bitmaps": {
937     "drive0": [
938       {
939         "busy": false,
940         "count": 0,
941         "granularity": 65536,
942         "name": "bitmap0",
943         "persistent": false,
944         "recording": true
945       }
946     ]
947   }
950 = Checking Bitmap bitmap0 =
951 expecting 0 dirty sectors; have 0. OK!
953 --- Cleanup ---
955 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
956 {"return": {}}
958   "bitmaps": {}
961 --- Verification ---
963 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
964 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
965 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
968 === Mode bitmap; Bitmap Sync on-success with intermediate failure ===
970 --- Preparing image & VM ---
972 {"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"}}
973 {"return": {}}
975 --- Write #0 ---
977 write -P0x49 0x0000000 0x10000
978 {"return": ""}
979 write -P0x6c 0x0100000 0x10000
980 {"return": ""}
981 write -P0x6f 0x2000000 0x10000
982 {"return": ""}
983 write -P0x76 0x3ff0000 0x10000
984 {"return": ""}
986   "bitmaps": {}
989 --- Reference Backup #0 ---
992 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
993 {"return": {}}
996 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
997 {"return": {}}
999 {"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}}}
1000 {"return": {}}
1001 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1003 --- Add Bitmap ---
1005 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1006 {"return": {}}
1008 --- Write #1 ---
1010 write -P0x65 0x0000000 0x10000
1011 {"return": ""}
1012 write -P0x77 0x00f8000 0x10000
1013 {"return": ""}
1014 write -P0x72 0x2008000 0x10000
1015 {"return": ""}
1016 write -P0x69 0x3fe0000 0x10000
1017 {"return": ""}
1019   "bitmaps": {
1020     "drive0": [
1021       {
1022         "busy": false,
1023         "count": 393216,
1024         "granularity": 65536,
1025         "name": "bitmap0",
1026         "persistent": false,
1027         "recording": true
1028       }
1029     ]
1030   }
1033 = Checking Bitmap bitmap0 =
1034 expecting 6 dirty sectors; have 6. OK!
1036 --- Reference Backup #1 ---
1039 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1040 {"return": {}}
1043 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1044 {"return": {}}
1046 {"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}}}
1047 {"return": {}}
1048 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1050 {"return": ""}
1052 --- Test Backup #1 ---
1055 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1056 {"return": {}}
1059 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1060 {"return": {}}
1062 {"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}}}
1063 {"return": {}}
1064 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1065 {"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"}}
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 --- Write #3 ---
1086 write -P0xaa 0x0010000 0x30000
1087 {"return": ""}
1088 write -P0xbb 0x00d8000 0x10000
1089 {"return": ""}
1090 write -P0xcc 0x2028000 0x10000
1091 {"return": ""}
1092 write -P0xdd 0x3fc0000 0x10000
1093 {"return": ""}
1095   "bitmaps": {
1096     "drive0": [
1097       {
1098         "busy": false,
1099         "count": 917504,
1100         "granularity": 65536,
1101         "name": "bitmap0",
1102         "persistent": false,
1103         "recording": true
1104       }
1105     ]
1106   }
1109 = Checking Bitmap bitmap0 =
1110 expecting 14 dirty sectors; have 14. OK!
1112 --- Reference Backup #2 ---
1115 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1116 {"return": {}}
1119 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1120 {"return": {}}
1122 {"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}}}
1123 {"return": {}}
1124 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1126 --- Test Backup #2 ---
1129 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1130 {"return": {}}
1133 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1134 {"return": {}}
1136 {"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}}}
1137 {"return": {}}
1138 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
1139 {"return": {}}
1140 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1141 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1143   "bitmaps": {
1144     "drive0": [
1145       {
1146         "busy": false,
1147         "count": 0,
1148         "granularity": 65536,
1149         "name": "bitmap0",
1150         "persistent": false,
1151         "recording": true
1152       }
1153     ]
1154   }
1157 = Checking Bitmap bitmap0 =
1158 expecting 0 dirty sectors; have 0. OK!
1160 --- Cleanup ---
1162 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1163 {"return": {}}
1165   "bitmaps": {}
1168 --- Verification ---
1170 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
1171 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1172 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1175 === Mode bitmap; Bitmap Sync on-success without failure ===
1177 --- Preparing image & VM ---
1179 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
1180 {"return": {}}
1182 --- Write #0 ---
1184 write -P0x49 0x0000000 0x10000
1185 {"return": ""}
1186 write -P0x6c 0x0100000 0x10000
1187 {"return": ""}
1188 write -P0x6f 0x2000000 0x10000
1189 {"return": ""}
1190 write -P0x76 0x3ff0000 0x10000
1191 {"return": ""}
1193   "bitmaps": {}
1196 --- Reference Backup #0 ---
1199 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1200 {"return": {}}
1203 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1204 {"return": {}}
1206 {"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}}}
1207 {"return": {}}
1208 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1210 --- Add Bitmap ---
1212 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1213 {"return": {}}
1215 --- Write #1 ---
1217 write -P0x65 0x0000000 0x10000
1218 {"return": ""}
1219 write -P0x77 0x00f8000 0x10000
1220 {"return": ""}
1221 write -P0x72 0x2008000 0x10000
1222 {"return": ""}
1223 write -P0x69 0x3fe0000 0x10000
1224 {"return": ""}
1226   "bitmaps": {
1227     "drive0": [
1228       {
1229         "busy": false,
1230         "count": 393216,
1231         "granularity": 65536,
1232         "name": "bitmap0",
1233         "persistent": false,
1234         "recording": true
1235       }
1236     ]
1237   }
1240 = Checking Bitmap bitmap0 =
1241 expecting 6 dirty sectors; have 6. OK!
1243 --- Reference Backup #1 ---
1246 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1247 {"return": {}}
1250 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1251 {"return": {}}
1253 {"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}}}
1254 {"return": {}}
1255 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1257 --- Test Backup #1 ---
1260 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1261 {"return": {}}
1264 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1265 {"return": {}}
1267 {"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}}}
1268 {"return": {}}
1270 --- Write #2 ---
1272 write -P0x74 0x0010000 0x10000
1273 {"return": ""}
1274 write -P0x69 0x00e8000 0x10000
1275 {"return": ""}
1276 write -P0x6e 0x2018000 0x10000
1277 {"return": ""}
1278 write -P0x67 0x3fe0000 0x20000
1279 {"return": ""}
1281   "bitmaps": {
1282     "drive0": [
1283       {
1284         "busy": false,
1285         "count": 0,
1286         "granularity": 65536,
1287         "persistent": false,
1288         "recording": false
1289       },
1290       {
1291         "busy": false,
1292         "count": 458752,
1293         "granularity": 65536,
1294         "persistent": false,
1295         "recording": true
1296       },
1297       {
1298         "busy": true,
1299         "count": 393216,
1300         "granularity": 65536,
1301         "name": "bitmap0",
1302         "persistent": false,
1303         "recording": true
1304       }
1305     ]
1306   }
1309 = Checking Bitmap bitmap0 =
1310 expecting 6 dirty sectors; have 6. OK!
1312 = Checking Bitmap (anonymous) =
1313 expecting 7 dirty sectors; have 7. OK!
1315 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
1316 {"return": {}}
1317 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1318 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1320   "bitmaps": {
1321     "drive0": [
1322       {
1323         "busy": false,
1324         "count": 458752,
1325         "granularity": 65536,
1326         "name": "bitmap0",
1327         "persistent": false,
1328         "recording": true
1329       }
1330     ]
1331   }
1334 = Checking Bitmap bitmap0 =
1335 expecting 7 dirty sectors; have 7. OK!
1337 --- Write #3 ---
1339 write -P0xaa 0x0010000 0x30000
1340 {"return": ""}
1341 write -P0xbb 0x00d8000 0x10000
1342 {"return": ""}
1343 write -P0xcc 0x2028000 0x10000
1344 {"return": ""}
1345 write -P0xdd 0x3fc0000 0x10000
1346 {"return": ""}
1348   "bitmaps": {
1349     "drive0": [
1350       {
1351         "busy": false,
1352         "count": 786432,
1353         "granularity": 65536,
1354         "name": "bitmap0",
1355         "persistent": false,
1356         "recording": true
1357       }
1358     ]
1359   }
1362 = Checking Bitmap bitmap0 =
1363 expecting 12 dirty sectors; have 12. OK!
1365 --- Reference Backup #2 ---
1368 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1369 {"return": {}}
1372 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1373 {"return": {}}
1375 {"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}}}
1376 {"return": {}}
1377 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1379 --- Test Backup #2 ---
1382 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1383 {"return": {}}
1386 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1387 {"return": {}}
1389 {"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}}}
1390 {"return": {}}
1391 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
1392 {"return": {}}
1393 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1394 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1396   "bitmaps": {
1397     "drive0": [
1398       {
1399         "busy": false,
1400         "count": 0,
1401         "granularity": 65536,
1402         "name": "bitmap0",
1403         "persistent": false,
1404         "recording": true
1405       }
1406     ]
1407   }
1410 = Checking Bitmap bitmap0 =
1411 expecting 0 dirty sectors; have 0. OK!
1413 --- Cleanup ---
1415 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1416 {"return": {}}
1418   "bitmaps": {}
1421 --- Verification ---
1423 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
1424 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1425 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1428 === Mode bitmap; Bitmap Sync always with simulated failure ===
1430 --- Preparing image & VM ---
1432 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
1433 {"return": {}}
1435 --- Write #0 ---
1437 write -P0x49 0x0000000 0x10000
1438 {"return": ""}
1439 write -P0x6c 0x0100000 0x10000
1440 {"return": ""}
1441 write -P0x6f 0x2000000 0x10000
1442 {"return": ""}
1443 write -P0x76 0x3ff0000 0x10000
1444 {"return": ""}
1446   "bitmaps": {}
1449 --- Reference Backup #0 ---
1452 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1453 {"return": {}}
1456 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1457 {"return": {}}
1459 {"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}}}
1460 {"return": {}}
1461 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1463 --- Add Bitmap ---
1465 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1466 {"return": {}}
1468 --- Write #1 ---
1470 write -P0x65 0x0000000 0x10000
1471 {"return": ""}
1472 write -P0x77 0x00f8000 0x10000
1473 {"return": ""}
1474 write -P0x72 0x2008000 0x10000
1475 {"return": ""}
1476 write -P0x69 0x3fe0000 0x10000
1477 {"return": ""}
1479   "bitmaps": {
1480     "drive0": [
1481       {
1482         "busy": false,
1483         "count": 393216,
1484         "granularity": 65536,
1485         "name": "bitmap0",
1486         "persistent": false,
1487         "recording": true
1488       }
1489     ]
1490   }
1493 = Checking Bitmap bitmap0 =
1494 expecting 6 dirty sectors; have 6. OK!
1496 --- Reference Backup #1 ---
1499 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1500 {"return": {}}
1503 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1504 {"return": {}}
1506 {"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}}}
1507 {"return": {}}
1508 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1510 --- Test Backup #1 ---
1513 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1514 {"return": {}}
1517 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1518 {"return": {}}
1520 {"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}}}
1521 {"return": {}}
1523 --- Write #2 ---
1525 write -P0x74 0x0010000 0x10000
1526 {"return": ""}
1527 write -P0x69 0x00e8000 0x10000
1528 {"return": ""}
1529 write -P0x6e 0x2018000 0x10000
1530 {"return": ""}
1531 write -P0x67 0x3fe0000 0x20000
1532 {"return": ""}
1534   "bitmaps": {
1535     "drive0": [
1536       {
1537         "busy": false,
1538         "count": 0,
1539         "granularity": 65536,
1540         "persistent": false,
1541         "recording": false
1542       },
1543       {
1544         "busy": false,
1545         "count": 458752,
1546         "granularity": 65536,
1547         "persistent": false,
1548         "recording": true
1549       },
1550       {
1551         "busy": true,
1552         "count": 393216,
1553         "granularity": 65536,
1554         "name": "bitmap0",
1555         "persistent": false,
1556         "recording": true
1557       }
1558     ]
1559   }
1562 = Checking Bitmap bitmap0 =
1563 expecting 6 dirty sectors; have 6. OK!
1565 = Checking Bitmap (anonymous) =
1566 expecting 7 dirty sectors; have 7. OK!
1568 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
1569 {"return": {}}
1570 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1571 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1573   "bitmaps": {
1574     "drive0": [
1575       {
1576         "busy": false,
1577         "count": 458752,
1578         "granularity": 65536,
1579         "name": "bitmap0",
1580         "persistent": false,
1581         "recording": true
1582       }
1583     ]
1584   }
1587 = Checking Bitmap bitmap0 =
1588 expecting 7 dirty sectors; have 7. OK!
1590 --- Write #3 ---
1592 write -P0xaa 0x0010000 0x30000
1593 {"return": ""}
1594 write -P0xbb 0x00d8000 0x10000
1595 {"return": ""}
1596 write -P0xcc 0x2028000 0x10000
1597 {"return": ""}
1598 write -P0xdd 0x3fc0000 0x10000
1599 {"return": ""}
1601   "bitmaps": {
1602     "drive0": [
1603       {
1604         "busy": false,
1605         "count": 786432,
1606         "granularity": 65536,
1607         "name": "bitmap0",
1608         "persistent": false,
1609         "recording": true
1610       }
1611     ]
1612   }
1615 = Checking Bitmap bitmap0 =
1616 expecting 12 dirty sectors; have 12. OK!
1618 --- Reference Backup #2 ---
1621 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1622 {"return": {}}
1625 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1626 {"return": {}}
1628 {"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}}}
1629 {"return": {}}
1630 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1632 --- Test Backup #2 ---
1635 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1636 {"return": {}}
1639 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1640 {"return": {}}
1642 {"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}}}
1643 {"return": {}}
1644 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
1645 {"return": {}}
1646 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1647 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1649   "bitmaps": {
1650     "drive0": [
1651       {
1652         "busy": false,
1653         "count": 0,
1654         "granularity": 65536,
1655         "name": "bitmap0",
1656         "persistent": false,
1657         "recording": true
1658       }
1659     ]
1660   }
1663 = Checking Bitmap bitmap0 =
1664 expecting 0 dirty sectors; have 0. OK!
1666 --- Cleanup ---
1668 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1669 {"return": {}}
1671   "bitmaps": {}
1674 --- Verification ---
1676 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
1677 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1678 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1681 === Mode bitmap; Bitmap Sync always with intermediate failure ===
1683 --- Preparing image & VM ---
1685 {"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"}}
1686 {"return": {}}
1688 --- Write #0 ---
1690 write -P0x49 0x0000000 0x10000
1691 {"return": ""}
1692 write -P0x6c 0x0100000 0x10000
1693 {"return": ""}
1694 write -P0x6f 0x2000000 0x10000
1695 {"return": ""}
1696 write -P0x76 0x3ff0000 0x10000
1697 {"return": ""}
1699   "bitmaps": {}
1702 --- Reference Backup #0 ---
1705 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1706 {"return": {}}
1709 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1710 {"return": {}}
1712 {"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}}}
1713 {"return": {}}
1714 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1716 --- Add Bitmap ---
1718 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1719 {"return": {}}
1721 --- Write #1 ---
1723 write -P0x65 0x0000000 0x10000
1724 {"return": ""}
1725 write -P0x77 0x00f8000 0x10000
1726 {"return": ""}
1727 write -P0x72 0x2008000 0x10000
1728 {"return": ""}
1729 write -P0x69 0x3fe0000 0x10000
1730 {"return": ""}
1732   "bitmaps": {
1733     "drive0": [
1734       {
1735         "busy": false,
1736         "count": 393216,
1737         "granularity": 65536,
1738         "name": "bitmap0",
1739         "persistent": false,
1740         "recording": true
1741       }
1742     ]
1743   }
1746 = Checking Bitmap bitmap0 =
1747 expecting 6 dirty sectors; have 6. OK!
1749 --- Reference Backup #1 ---
1752 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1753 {"return": {}}
1756 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1757 {"return": {}}
1759 {"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}}}
1760 {"return": {}}
1761 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1763 {"return": ""}
1765 --- Test Backup #1 ---
1768 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1769 {"return": {}}
1772 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1773 {"return": {}}
1775 {"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}}}
1776 {"return": {}}
1777 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1778 {"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"}}
1780   "bitmaps": {
1781     "drive0": [
1782       {
1783         "busy": false,
1784         "count": 327680,
1785         "granularity": 65536,
1786         "name": "bitmap0",
1787         "persistent": false,
1788         "recording": true
1789       }
1790     ]
1791   }
1794 = Checking Bitmap bitmap0 =
1795 expecting 5 dirty sectors; have 5. OK!
1797 --- Write #3 ---
1799 write -P0xaa 0x0010000 0x30000
1800 {"return": ""}
1801 write -P0xbb 0x00d8000 0x10000
1802 {"return": ""}
1803 write -P0xcc 0x2028000 0x10000
1804 {"return": ""}
1805 write -P0xdd 0x3fc0000 0x10000
1806 {"return": ""}
1808   "bitmaps": {
1809     "drive0": [
1810       {
1811         "busy": false,
1812         "count": 851968,
1813         "granularity": 65536,
1814         "name": "bitmap0",
1815         "persistent": false,
1816         "recording": true
1817       }
1818     ]
1819   }
1822 = Checking Bitmap bitmap0 =
1823 expecting 13 dirty sectors; have 13. OK!
1825 --- Reference Backup #2 ---
1828 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1829 {"return": {}}
1832 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1833 {"return": {}}
1835 {"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}}}
1836 {"return": {}}
1837 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1839 --- Test Backup #2 ---
1842 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1843 {"return": {}}
1846 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1847 {"return": {}}
1849 {"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}}}
1850 {"return": {}}
1851 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
1852 {"return": {}}
1853 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1854 {"data": {"device": "backup_2", "len": 851968, "offset": 851968, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1856   "bitmaps": {
1857     "drive0": [
1858       {
1859         "busy": false,
1860         "count": 0,
1861         "granularity": 65536,
1862         "name": "bitmap0",
1863         "persistent": false,
1864         "recording": true
1865       }
1866     ]
1867   }
1870 = Checking Bitmap bitmap0 =
1871 expecting 0 dirty sectors; have 0. OK!
1873 --- Cleanup ---
1875 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
1876 {"return": {}}
1878   "bitmaps": {}
1881 --- Verification ---
1883 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
1884 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1885 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
1888 === Mode bitmap; Bitmap Sync always without failure ===
1890 --- Preparing image & VM ---
1892 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
1893 {"return": {}}
1895 --- Write #0 ---
1897 write -P0x49 0x0000000 0x10000
1898 {"return": ""}
1899 write -P0x6c 0x0100000 0x10000
1900 {"return": ""}
1901 write -P0x6f 0x2000000 0x10000
1902 {"return": ""}
1903 write -P0x76 0x3ff0000 0x10000
1904 {"return": ""}
1906   "bitmaps": {}
1909 --- Reference Backup #0 ---
1912 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1913 {"return": {}}
1916 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1917 {"return": {}}
1919 {"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}}}
1920 {"return": {}}
1921 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1923 --- Add Bitmap ---
1925 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
1926 {"return": {}}
1928 --- Write #1 ---
1930 write -P0x65 0x0000000 0x10000
1931 {"return": ""}
1932 write -P0x77 0x00f8000 0x10000
1933 {"return": ""}
1934 write -P0x72 0x2008000 0x10000
1935 {"return": ""}
1936 write -P0x69 0x3fe0000 0x10000
1937 {"return": ""}
1939   "bitmaps": {
1940     "drive0": [
1941       {
1942         "busy": false,
1943         "count": 393216,
1944         "granularity": 65536,
1945         "name": "bitmap0",
1946         "persistent": false,
1947         "recording": true
1948       }
1949     ]
1950   }
1953 = Checking Bitmap bitmap0 =
1954 expecting 6 dirty sectors; have 6. OK!
1956 --- Reference Backup #1 ---
1959 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1960 {"return": {}}
1963 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1964 {"return": {}}
1966 {"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target": "ref_target_1", "x-perf": {"max-workers": 1}}}
1967 {"return": {}}
1968 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
1970 --- Test Backup #1 ---
1973 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
1974 {"return": {}}
1977 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
1978 {"return": {}}
1980 {"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}}}
1981 {"return": {}}
1983 --- Write #2 ---
1985 write -P0x74 0x0010000 0x10000
1986 {"return": ""}
1987 write -P0x69 0x00e8000 0x10000
1988 {"return": ""}
1989 write -P0x6e 0x2018000 0x10000
1990 {"return": ""}
1991 write -P0x67 0x3fe0000 0x20000
1992 {"return": ""}
1994   "bitmaps": {
1995     "drive0": [
1996       {
1997         "busy": false,
1998         "count": 0,
1999         "granularity": 65536,
2000         "persistent": false,
2001         "recording": false
2002       },
2003       {
2004         "busy": false,
2005         "count": 458752,
2006         "granularity": 65536,
2007         "persistent": false,
2008         "recording": true
2009       },
2010       {
2011         "busy": true,
2012         "count": 393216,
2013         "granularity": 65536,
2014         "name": "bitmap0",
2015         "persistent": false,
2016         "recording": true
2017       }
2018     ]
2019   }
2022 = Checking Bitmap bitmap0 =
2023 expecting 6 dirty sectors; have 6. OK!
2025 = Checking Bitmap (anonymous) =
2026 expecting 7 dirty sectors; have 7. OK!
2028 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
2029 {"return": {}}
2030 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2031 {"data": {"device": "backup_1", "len": 393216, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2033   "bitmaps": {
2034     "drive0": [
2035       {
2036         "busy": false,
2037         "count": 458752,
2038         "granularity": 65536,
2039         "name": "bitmap0",
2040         "persistent": false,
2041         "recording": true
2042       }
2043     ]
2044   }
2047 = Checking Bitmap bitmap0 =
2048 expecting 7 dirty sectors; have 7. OK!
2050 --- Write #3 ---
2052 write -P0xaa 0x0010000 0x30000
2053 {"return": ""}
2054 write -P0xbb 0x00d8000 0x10000
2055 {"return": ""}
2056 write -P0xcc 0x2028000 0x10000
2057 {"return": ""}
2058 write -P0xdd 0x3fc0000 0x10000
2059 {"return": ""}
2061   "bitmaps": {
2062     "drive0": [
2063       {
2064         "busy": false,
2065         "count": 786432,
2066         "granularity": 65536,
2067         "name": "bitmap0",
2068         "persistent": false,
2069         "recording": true
2070       }
2071     ]
2072   }
2075 = Checking Bitmap bitmap0 =
2076 expecting 12 dirty sectors; have 12. OK!
2078 --- Reference Backup #2 ---
2081 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2082 {"return": {}}
2085 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2086 {"return": {}}
2088 {"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}}}
2089 {"return": {}}
2090 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2092 --- Test Backup #2 ---
2095 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2096 {"return": {}}
2099 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2100 {"return": {}}
2102 {"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}}}
2103 {"return": {}}
2104 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
2105 {"return": {}}
2106 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2107 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2109   "bitmaps": {
2110     "drive0": [
2111       {
2112         "busy": false,
2113         "count": 0,
2114         "granularity": 65536,
2115         "name": "bitmap0",
2116         "persistent": false,
2117         "recording": true
2118       }
2119     ]
2120   }
2123 = Checking Bitmap bitmap0 =
2124 expecting 0 dirty sectors; have 0. OK!
2126 --- Cleanup ---
2128 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
2129 {"return": {}}
2131   "bitmaps": {}
2134 --- Verification ---
2136 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
2137 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2138 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2141 === Mode full; Bitmap Sync on-success with simulated failure ===
2143 --- Preparing image & VM ---
2145 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
2146 {"return": {}}
2148 --- Write #0 ---
2150 write -P0x49 0x0000000 0x10000
2151 {"return": ""}
2152 write -P0x6c 0x0100000 0x10000
2153 {"return": ""}
2154 write -P0x6f 0x2000000 0x10000
2155 {"return": ""}
2156 write -P0x76 0x3ff0000 0x10000
2157 {"return": ""}
2159   "bitmaps": {}
2162 --- Reference Backup #0 ---
2165 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2166 {"return": {}}
2169 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2170 {"return": {}}
2172 {"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}}}
2173 {"return": {}}
2174 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2176 --- Add Bitmap ---
2178 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
2179 {"return": {}}
2181 --- Write #1 ---
2183 write -P0x65 0x0000000 0x10000
2184 {"return": ""}
2185 write -P0x77 0x00f8000 0x10000
2186 {"return": ""}
2187 write -P0x72 0x2008000 0x10000
2188 {"return": ""}
2189 write -P0x69 0x3fe0000 0x10000
2190 {"return": ""}
2192   "bitmaps": {
2193     "drive0": [
2194       {
2195         "busy": false,
2196         "count": 393216,
2197         "granularity": 65536,
2198         "name": "bitmap0",
2199         "persistent": false,
2200         "recording": true
2201       }
2202     ]
2203   }
2206 = Checking Bitmap bitmap0 =
2207 expecting 6 dirty sectors; have 6. OK!
2209 --- Reference Backup #1 ---
2212 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2213 {"return": {}}
2216 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2217 {"return": {}}
2219 {"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}}}
2220 {"return": {}}
2221 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2223 --- Test Backup #1 ---
2226 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2227 {"return": {}}
2230 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2231 {"return": {}}
2233 {"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}}}
2234 {"return": {}}
2236 --- Write #2 ---
2238 write -P0x74 0x0010000 0x10000
2239 {"return": ""}
2240 write -P0x69 0x00e8000 0x10000
2241 {"return": ""}
2242 write -P0x6e 0x2018000 0x10000
2243 {"return": ""}
2244 write -P0x67 0x3fe0000 0x20000
2245 {"return": ""}
2247   "bitmaps": {
2248     "drive0": [
2249       {
2250         "busy": false,
2251         "count": 0,
2252         "granularity": 65536,
2253         "persistent": false,
2254         "recording": false
2255       },
2256       {
2257         "busy": false,
2258         "count": 458752,
2259         "granularity": 65536,
2260         "persistent": false,
2261         "recording": true
2262       },
2263       {
2264         "busy": true,
2265         "count": 393216,
2266         "granularity": 65536,
2267         "name": "bitmap0",
2268         "persistent": false,
2269         "recording": true
2270       }
2271     ]
2272   }
2275 = Checking Bitmap bitmap0 =
2276 expecting 6 dirty sectors; have 6. OK!
2278 = Checking Bitmap (anonymous) =
2279 expecting 7 dirty sectors; have 7. OK!
2281 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
2282 {"return": {}}
2283 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2284 {"data": {"device": "backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2286   "bitmaps": {
2287     "drive0": [
2288       {
2289         "busy": false,
2290         "count": 655360,
2291         "granularity": 65536,
2292         "name": "bitmap0",
2293         "persistent": false,
2294         "recording": true
2295       }
2296     ]
2297   }
2300 = Checking Bitmap bitmap0 =
2301 expecting 10 dirty sectors; have 10. OK!
2303 --- Write #3 ---
2305 write -P0xaa 0x0010000 0x30000
2306 {"return": ""}
2307 write -P0xbb 0x00d8000 0x10000
2308 {"return": ""}
2309 write -P0xcc 0x2028000 0x10000
2310 {"return": ""}
2311 write -P0xdd 0x3fc0000 0x10000
2312 {"return": ""}
2314   "bitmaps": {
2315     "drive0": [
2316       {
2317         "busy": false,
2318         "count": 983040,
2319         "granularity": 65536,
2320         "name": "bitmap0",
2321         "persistent": false,
2322         "recording": true
2323       }
2324     ]
2325   }
2328 = Checking Bitmap bitmap0 =
2329 expecting 15 dirty sectors; have 15. OK!
2331 --- Reference Backup #2 ---
2334 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2335 {"return": {}}
2338 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2339 {"return": {}}
2341 {"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}}}
2342 {"return": {}}
2343 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2345 --- Test Backup #2 ---
2348 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2349 {"return": {}}
2352 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2353 {"return": {}}
2355 {"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}}}
2356 {"return": {}}
2357 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
2358 {"return": {}}
2359 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2360 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2362   "bitmaps": {
2363     "drive0": [
2364       {
2365         "busy": false,
2366         "count": 0,
2367         "granularity": 65536,
2368         "name": "bitmap0",
2369         "persistent": false,
2370         "recording": true
2371       }
2372     ]
2373   }
2376 = Checking Bitmap bitmap0 =
2377 expecting 0 dirty sectors; have 0. OK!
2379 --- Cleanup ---
2381 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
2382 {"return": {}}
2384   "bitmaps": {}
2387 --- Verification ---
2389 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
2390 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2391 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2394 === Mode full; Bitmap Sync on-success with intermediate failure ===
2396 --- Preparing image & VM ---
2398 {"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"}}
2399 {"return": {}}
2401 --- Write #0 ---
2403 write -P0x49 0x0000000 0x10000
2404 {"return": ""}
2405 write -P0x6c 0x0100000 0x10000
2406 {"return": ""}
2407 write -P0x6f 0x2000000 0x10000
2408 {"return": ""}
2409 write -P0x76 0x3ff0000 0x10000
2410 {"return": ""}
2412   "bitmaps": {}
2415 --- Reference Backup #0 ---
2418 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2419 {"return": {}}
2422 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2423 {"return": {}}
2425 {"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}}}
2426 {"return": {}}
2427 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2429 --- Add Bitmap ---
2431 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
2432 {"return": {}}
2434 --- Write #1 ---
2436 write -P0x65 0x0000000 0x10000
2437 {"return": ""}
2438 write -P0x77 0x00f8000 0x10000
2439 {"return": ""}
2440 write -P0x72 0x2008000 0x10000
2441 {"return": ""}
2442 write -P0x69 0x3fe0000 0x10000
2443 {"return": ""}
2445   "bitmaps": {
2446     "drive0": [
2447       {
2448         "busy": false,
2449         "count": 393216,
2450         "granularity": 65536,
2451         "name": "bitmap0",
2452         "persistent": false,
2453         "recording": true
2454       }
2455     ]
2456   }
2459 = Checking Bitmap bitmap0 =
2460 expecting 6 dirty sectors; have 6. OK!
2462 --- Reference Backup #1 ---
2465 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2466 {"return": {}}
2469 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2470 {"return": {}}
2472 {"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}}}
2473 {"return": {}}
2474 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2476 {"return": ""}
2478 --- Test Backup #1 ---
2481 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2482 {"return": {}}
2485 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2486 {"return": {}}
2488 {"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}}}
2489 {"return": {}}
2490 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2491 {"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"}}
2493   "bitmaps": {
2494     "drive0": [
2495       {
2496         "busy": false,
2497         "count": 393216,
2498         "granularity": 65536,
2499         "name": "bitmap0",
2500         "persistent": false,
2501         "recording": true
2502       }
2503     ]
2504   }
2507 = Checking Bitmap bitmap0 =
2508 expecting 6 dirty sectors; have 6. OK!
2510 --- Write #3 ---
2512 write -P0xaa 0x0010000 0x30000
2513 {"return": ""}
2514 write -P0xbb 0x00d8000 0x10000
2515 {"return": ""}
2516 write -P0xcc 0x2028000 0x10000
2517 {"return": ""}
2518 write -P0xdd 0x3fc0000 0x10000
2519 {"return": ""}
2521   "bitmaps": {
2522     "drive0": [
2523       {
2524         "busy": false,
2525         "count": 917504,
2526         "granularity": 65536,
2527         "name": "bitmap0",
2528         "persistent": false,
2529         "recording": true
2530       }
2531     ]
2532   }
2535 = Checking Bitmap bitmap0 =
2536 expecting 14 dirty sectors; have 14. OK!
2538 --- Reference Backup #2 ---
2541 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2542 {"return": {}}
2545 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2546 {"return": {}}
2548 {"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}}}
2549 {"return": {}}
2550 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2552 --- Test Backup #2 ---
2555 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2556 {"return": {}}
2559 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2560 {"return": {}}
2562 {"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}}}
2563 {"return": {}}
2564 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
2565 {"return": {}}
2566 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2567 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2569   "bitmaps": {
2570     "drive0": [
2571       {
2572         "busy": false,
2573         "count": 0,
2574         "granularity": 65536,
2575         "name": "bitmap0",
2576         "persistent": false,
2577         "recording": true
2578       }
2579     ]
2580   }
2583 = Checking Bitmap bitmap0 =
2584 expecting 0 dirty sectors; have 0. OK!
2586 --- Cleanup ---
2588 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
2589 {"return": {}}
2591   "bitmaps": {}
2594 --- Verification ---
2596 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
2597 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2598 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2601 === Mode full; Bitmap Sync on-success without failure ===
2603 --- Preparing image & VM ---
2605 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
2606 {"return": {}}
2608 --- Write #0 ---
2610 write -P0x49 0x0000000 0x10000
2611 {"return": ""}
2612 write -P0x6c 0x0100000 0x10000
2613 {"return": ""}
2614 write -P0x6f 0x2000000 0x10000
2615 {"return": ""}
2616 write -P0x76 0x3ff0000 0x10000
2617 {"return": ""}
2619   "bitmaps": {}
2622 --- Reference Backup #0 ---
2625 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2626 {"return": {}}
2629 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2630 {"return": {}}
2632 {"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}}}
2633 {"return": {}}
2634 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2636 --- Add Bitmap ---
2638 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
2639 {"return": {}}
2641 --- Write #1 ---
2643 write -P0x65 0x0000000 0x10000
2644 {"return": ""}
2645 write -P0x77 0x00f8000 0x10000
2646 {"return": ""}
2647 write -P0x72 0x2008000 0x10000
2648 {"return": ""}
2649 write -P0x69 0x3fe0000 0x10000
2650 {"return": ""}
2652   "bitmaps": {
2653     "drive0": [
2654       {
2655         "busy": false,
2656         "count": 393216,
2657         "granularity": 65536,
2658         "name": "bitmap0",
2659         "persistent": false,
2660         "recording": true
2661       }
2662     ]
2663   }
2666 = Checking Bitmap bitmap0 =
2667 expecting 6 dirty sectors; have 6. OK!
2669 --- Reference Backup #1 ---
2672 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2673 {"return": {}}
2676 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2677 {"return": {}}
2679 {"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}}}
2680 {"return": {}}
2681 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2683 --- Test Backup #1 ---
2686 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2687 {"return": {}}
2690 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2691 {"return": {}}
2693 {"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}}}
2694 {"return": {}}
2696 --- Write #2 ---
2698 write -P0x74 0x0010000 0x10000
2699 {"return": ""}
2700 write -P0x69 0x00e8000 0x10000
2701 {"return": ""}
2702 write -P0x6e 0x2018000 0x10000
2703 {"return": ""}
2704 write -P0x67 0x3fe0000 0x20000
2705 {"return": ""}
2707   "bitmaps": {
2708     "drive0": [
2709       {
2710         "busy": false,
2711         "count": 0,
2712         "granularity": 65536,
2713         "persistent": false,
2714         "recording": false
2715       },
2716       {
2717         "busy": false,
2718         "count": 458752,
2719         "granularity": 65536,
2720         "persistent": false,
2721         "recording": true
2722       },
2723       {
2724         "busy": true,
2725         "count": 393216,
2726         "granularity": 65536,
2727         "name": "bitmap0",
2728         "persistent": false,
2729         "recording": true
2730       }
2731     ]
2732   }
2735 = Checking Bitmap bitmap0 =
2736 expecting 6 dirty sectors; have 6. OK!
2738 = Checking Bitmap (anonymous) =
2739 expecting 7 dirty sectors; have 7. OK!
2741 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
2742 {"return": {}}
2743 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2744 {"data": {"device": "backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2746   "bitmaps": {
2747     "drive0": [
2748       {
2749         "busy": false,
2750         "count": 458752,
2751         "granularity": 65536,
2752         "name": "bitmap0",
2753         "persistent": false,
2754         "recording": true
2755       }
2756     ]
2757   }
2760 = Checking Bitmap bitmap0 =
2761 expecting 7 dirty sectors; have 7. OK!
2763 --- Write #3 ---
2765 write -P0xaa 0x0010000 0x30000
2766 {"return": ""}
2767 write -P0xbb 0x00d8000 0x10000
2768 {"return": ""}
2769 write -P0xcc 0x2028000 0x10000
2770 {"return": ""}
2771 write -P0xdd 0x3fc0000 0x10000
2772 {"return": ""}
2774   "bitmaps": {
2775     "drive0": [
2776       {
2777         "busy": false,
2778         "count": 786432,
2779         "granularity": 65536,
2780         "name": "bitmap0",
2781         "persistent": false,
2782         "recording": true
2783       }
2784     ]
2785   }
2788 = Checking Bitmap bitmap0 =
2789 expecting 12 dirty sectors; have 12. OK!
2791 --- Reference Backup #2 ---
2794 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2795 {"return": {}}
2798 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2799 {"return": {}}
2801 {"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}}}
2802 {"return": {}}
2803 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2805 --- Test Backup #2 ---
2808 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2809 {"return": {}}
2812 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2813 {"return": {}}
2815 {"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}}}
2816 {"return": {}}
2817 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
2818 {"return": {}}
2819 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2820 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2822   "bitmaps": {
2823     "drive0": [
2824       {
2825         "busy": false,
2826         "count": 0,
2827         "granularity": 65536,
2828         "name": "bitmap0",
2829         "persistent": false,
2830         "recording": true
2831       }
2832     ]
2833   }
2836 = Checking Bitmap bitmap0 =
2837 expecting 0 dirty sectors; have 0. OK!
2839 --- Cleanup ---
2841 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
2842 {"return": {}}
2844   "bitmaps": {}
2847 --- Verification ---
2849 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
2850 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2851 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
2854 === Mode full; Bitmap Sync always with simulated failure ===
2856 --- Preparing image & VM ---
2858 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
2859 {"return": {}}
2861 --- Write #0 ---
2863 write -P0x49 0x0000000 0x10000
2864 {"return": ""}
2865 write -P0x6c 0x0100000 0x10000
2866 {"return": ""}
2867 write -P0x6f 0x2000000 0x10000
2868 {"return": ""}
2869 write -P0x76 0x3ff0000 0x10000
2870 {"return": ""}
2872   "bitmaps": {}
2875 --- Reference Backup #0 ---
2878 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2879 {"return": {}}
2882 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2883 {"return": {}}
2885 {"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}}}
2886 {"return": {}}
2887 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2889 --- Add Bitmap ---
2891 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
2892 {"return": {}}
2894 --- Write #1 ---
2896 write -P0x65 0x0000000 0x10000
2897 {"return": ""}
2898 write -P0x77 0x00f8000 0x10000
2899 {"return": ""}
2900 write -P0x72 0x2008000 0x10000
2901 {"return": ""}
2902 write -P0x69 0x3fe0000 0x10000
2903 {"return": ""}
2905   "bitmaps": {
2906     "drive0": [
2907       {
2908         "busy": false,
2909         "count": 393216,
2910         "granularity": 65536,
2911         "name": "bitmap0",
2912         "persistent": false,
2913         "recording": true
2914       }
2915     ]
2916   }
2919 = Checking Bitmap bitmap0 =
2920 expecting 6 dirty sectors; have 6. OK!
2922 --- Reference Backup #1 ---
2925 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2926 {"return": {}}
2929 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2930 {"return": {}}
2932 {"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}}}
2933 {"return": {}}
2934 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2936 --- Test Backup #1 ---
2939 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
2940 {"return": {}}
2943 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
2944 {"return": {}}
2946 {"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}}}
2947 {"return": {}}
2949 --- Write #2 ---
2951 write -P0x74 0x0010000 0x10000
2952 {"return": ""}
2953 write -P0x69 0x00e8000 0x10000
2954 {"return": ""}
2955 write -P0x6e 0x2018000 0x10000
2956 {"return": ""}
2957 write -P0x67 0x3fe0000 0x20000
2958 {"return": ""}
2960   "bitmaps": {
2961     "drive0": [
2962       {
2963         "busy": false,
2964         "count": 0,
2965         "granularity": 65536,
2966         "persistent": false,
2967         "recording": false
2968       },
2969       {
2970         "busy": false,
2971         "count": 458752,
2972         "granularity": 65536,
2973         "persistent": false,
2974         "recording": true
2975       },
2976       {
2977         "busy": true,
2978         "count": 393216,
2979         "granularity": 65536,
2980         "name": "bitmap0",
2981         "persistent": false,
2982         "recording": true
2983       }
2984     ]
2985   }
2988 = Checking Bitmap bitmap0 =
2989 expecting 6 dirty sectors; have 6. OK!
2991 = Checking Bitmap (anonymous) =
2992 expecting 7 dirty sectors; have 7. OK!
2994 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
2995 {"return": {}}
2996 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2997 {"data": {"device": "backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
2999   "bitmaps": {
3000     "drive0": [
3001       {
3002         "busy": false,
3003         "count": 458752,
3004         "granularity": 65536,
3005         "name": "bitmap0",
3006         "persistent": false,
3007         "recording": true
3008       }
3009     ]
3010   }
3013 = Checking Bitmap bitmap0 =
3014 expecting 7 dirty sectors; have 7. OK!
3016 --- Write #3 ---
3018 write -P0xaa 0x0010000 0x30000
3019 {"return": ""}
3020 write -P0xbb 0x00d8000 0x10000
3021 {"return": ""}
3022 write -P0xcc 0x2028000 0x10000
3023 {"return": ""}
3024 write -P0xdd 0x3fc0000 0x10000
3025 {"return": ""}
3027   "bitmaps": {
3028     "drive0": [
3029       {
3030         "busy": false,
3031         "count": 786432,
3032         "granularity": 65536,
3033         "name": "bitmap0",
3034         "persistent": false,
3035         "recording": true
3036       }
3037     ]
3038   }
3041 = Checking Bitmap bitmap0 =
3042 expecting 12 dirty sectors; have 12. OK!
3044 --- Reference Backup #2 ---
3047 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3048 {"return": {}}
3051 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3052 {"return": {}}
3054 {"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}}}
3055 {"return": {}}
3056 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3058 --- Test Backup #2 ---
3061 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3062 {"return": {}}
3065 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3066 {"return": {}}
3068 {"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}}}
3069 {"return": {}}
3070 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3071 {"return": {}}
3072 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3073 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3075   "bitmaps": {
3076     "drive0": [
3077       {
3078         "busy": false,
3079         "count": 0,
3080         "granularity": 65536,
3081         "name": "bitmap0",
3082         "persistent": false,
3083         "recording": true
3084       }
3085     ]
3086   }
3089 = Checking Bitmap bitmap0 =
3090 expecting 0 dirty sectors; have 0. OK!
3092 --- Cleanup ---
3094 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
3095 {"return": {}}
3097   "bitmaps": {}
3100 --- Verification ---
3102 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
3103 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3104 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3107 === Mode full; Bitmap Sync always with intermediate failure ===
3109 --- Preparing image & VM ---
3111 {"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"}}
3112 {"return": {}}
3114 --- Write #0 ---
3116 write -P0x49 0x0000000 0x10000
3117 {"return": ""}
3118 write -P0x6c 0x0100000 0x10000
3119 {"return": ""}
3120 write -P0x6f 0x2000000 0x10000
3121 {"return": ""}
3122 write -P0x76 0x3ff0000 0x10000
3123 {"return": ""}
3125   "bitmaps": {}
3128 --- Reference Backup #0 ---
3131 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3132 {"return": {}}
3135 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3136 {"return": {}}
3138 {"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}}}
3139 {"return": {}}
3140 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3142 --- Add Bitmap ---
3144 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
3145 {"return": {}}
3147 --- Write #1 ---
3149 write -P0x65 0x0000000 0x10000
3150 {"return": ""}
3151 write -P0x77 0x00f8000 0x10000
3152 {"return": ""}
3153 write -P0x72 0x2008000 0x10000
3154 {"return": ""}
3155 write -P0x69 0x3fe0000 0x10000
3156 {"return": ""}
3158   "bitmaps": {
3159     "drive0": [
3160       {
3161         "busy": false,
3162         "count": 393216,
3163         "granularity": 65536,
3164         "name": "bitmap0",
3165         "persistent": false,
3166         "recording": true
3167       }
3168     ]
3169   }
3172 = Checking Bitmap bitmap0 =
3173 expecting 6 dirty sectors; have 6. OK!
3175 --- Reference Backup #1 ---
3178 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3179 {"return": {}}
3182 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3183 {"return": {}}
3185 {"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}}}
3186 {"return": {}}
3187 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3189 {"return": ""}
3191 --- Test Backup #1 ---
3194 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3195 {"return": {}}
3198 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3199 {"return": {}}
3201 {"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}}}
3202 {"return": {}}
3203 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3204 {"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"}}
3206   "bitmaps": {
3207     "drive0": [
3208       {
3209         "busy": false,
3210         "count": 66125824,
3211         "granularity": 65536,
3212         "name": "bitmap0",
3213         "persistent": false,
3214         "recording": true
3215       }
3216     ]
3217   }
3220 = Checking Bitmap bitmap0 =
3221 expecting 1009 dirty sectors; have 1009. OK!
3223 --- Write #3 ---
3225 write -P0xaa 0x0010000 0x30000
3226 {"return": ""}
3227 write -P0xbb 0x00d8000 0x10000
3228 {"return": ""}
3229 write -P0xcc 0x2028000 0x10000
3230 {"return": ""}
3231 write -P0xdd 0x3fc0000 0x10000
3232 {"return": ""}
3234   "bitmaps": {
3235     "drive0": [
3236       {
3237         "busy": false,
3238         "count": 66453504,
3239         "granularity": 65536,
3240         "name": "bitmap0",
3241         "persistent": false,
3242         "recording": true
3243       }
3244     ]
3245   }
3248 = Checking Bitmap bitmap0 =
3249 expecting 1014 dirty sectors; have 1014. OK!
3251 --- Reference Backup #2 ---
3254 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3255 {"return": {}}
3258 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3259 {"return": {}}
3261 {"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}}}
3262 {"return": {}}
3263 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3265 --- Test Backup #2 ---
3268 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3269 {"return": {}}
3272 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3273 {"return": {}}
3275 {"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}}}
3276 {"return": {}}
3277 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3278 {"return": {}}
3279 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3280 {"data": {"device": "backup_2", "len": 66453504, "offset": 66453504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3282   "bitmaps": {
3283     "drive0": [
3284       {
3285         "busy": false,
3286         "count": 0,
3287         "granularity": 65536,
3288         "name": "bitmap0",
3289         "persistent": false,
3290         "recording": true
3291       }
3292     ]
3293   }
3296 = Checking Bitmap bitmap0 =
3297 expecting 0 dirty sectors; have 0. OK!
3299 --- Cleanup ---
3301 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
3302 {"return": {}}
3304   "bitmaps": {}
3307 --- Verification ---
3309 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
3310 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3311 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3314 === Mode full; Bitmap Sync always without failure ===
3316 --- Preparing image & VM ---
3318 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
3319 {"return": {}}
3321 --- Write #0 ---
3323 write -P0x49 0x0000000 0x10000
3324 {"return": ""}
3325 write -P0x6c 0x0100000 0x10000
3326 {"return": ""}
3327 write -P0x6f 0x2000000 0x10000
3328 {"return": ""}
3329 write -P0x76 0x3ff0000 0x10000
3330 {"return": ""}
3332   "bitmaps": {}
3335 --- Reference Backup #0 ---
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": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
3346 {"return": {}}
3347 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3349 --- Add Bitmap ---
3351 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
3352 {"return": {}}
3354 --- Write #1 ---
3356 write -P0x65 0x0000000 0x10000
3357 {"return": ""}
3358 write -P0x77 0x00f8000 0x10000
3359 {"return": ""}
3360 write -P0x72 0x2008000 0x10000
3361 {"return": ""}
3362 write -P0x69 0x3fe0000 0x10000
3363 {"return": ""}
3365   "bitmaps": {
3366     "drive0": [
3367       {
3368         "busy": false,
3369         "count": 393216,
3370         "granularity": 65536,
3371         "name": "bitmap0",
3372         "persistent": false,
3373         "recording": true
3374       }
3375     ]
3376   }
3379 = Checking Bitmap bitmap0 =
3380 expecting 6 dirty sectors; have 6. OK!
3382 --- Reference Backup #1 ---
3385 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3386 {"return": {}}
3389 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3390 {"return": {}}
3392 {"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}}}
3393 {"return": {}}
3394 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3396 --- Test Backup #1 ---
3399 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3400 {"return": {}}
3403 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3404 {"return": {}}
3406 {"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}}}
3407 {"return": {}}
3409 --- Write #2 ---
3411 write -P0x74 0x0010000 0x10000
3412 {"return": ""}
3413 write -P0x69 0x00e8000 0x10000
3414 {"return": ""}
3415 write -P0x6e 0x2018000 0x10000
3416 {"return": ""}
3417 write -P0x67 0x3fe0000 0x20000
3418 {"return": ""}
3420   "bitmaps": {
3421     "drive0": [
3422       {
3423         "busy": false,
3424         "count": 0,
3425         "granularity": 65536,
3426         "persistent": false,
3427         "recording": false
3428       },
3429       {
3430         "busy": false,
3431         "count": 458752,
3432         "granularity": 65536,
3433         "persistent": false,
3434         "recording": true
3435       },
3436       {
3437         "busy": true,
3438         "count": 393216,
3439         "granularity": 65536,
3440         "name": "bitmap0",
3441         "persistent": false,
3442         "recording": true
3443       }
3444     ]
3445   }
3448 = Checking Bitmap bitmap0 =
3449 expecting 6 dirty sectors; have 6. OK!
3451 = Checking Bitmap (anonymous) =
3452 expecting 7 dirty sectors; have 7. OK!
3454 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
3455 {"return": {}}
3456 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3457 {"data": {"device": "backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3459   "bitmaps": {
3460     "drive0": [
3461       {
3462         "busy": false,
3463         "count": 458752,
3464         "granularity": 65536,
3465         "name": "bitmap0",
3466         "persistent": false,
3467         "recording": true
3468       }
3469     ]
3470   }
3473 = Checking Bitmap bitmap0 =
3474 expecting 7 dirty sectors; have 7. OK!
3476 --- Write #3 ---
3478 write -P0xaa 0x0010000 0x30000
3479 {"return": ""}
3480 write -P0xbb 0x00d8000 0x10000
3481 {"return": ""}
3482 write -P0xcc 0x2028000 0x10000
3483 {"return": ""}
3484 write -P0xdd 0x3fc0000 0x10000
3485 {"return": ""}
3487   "bitmaps": {
3488     "drive0": [
3489       {
3490         "busy": false,
3491         "count": 786432,
3492         "granularity": 65536,
3493         "name": "bitmap0",
3494         "persistent": false,
3495         "recording": true
3496       }
3497     ]
3498   }
3501 = Checking Bitmap bitmap0 =
3502 expecting 12 dirty sectors; have 12. OK!
3504 --- Reference Backup #2 ---
3507 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3508 {"return": {}}
3511 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3512 {"return": {}}
3514 {"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}}}
3515 {"return": {}}
3516 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3518 --- Test Backup #2 ---
3521 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3522 {"return": {}}
3525 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3526 {"return": {}}
3528 {"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}}}
3529 {"return": {}}
3530 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3531 {"return": {}}
3532 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3533 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3535   "bitmaps": {
3536     "drive0": [
3537       {
3538         "busy": false,
3539         "count": 0,
3540         "granularity": 65536,
3541         "name": "bitmap0",
3542         "persistent": false,
3543         "recording": true
3544       }
3545     ]
3546   }
3549 = Checking Bitmap bitmap0 =
3550 expecting 0 dirty sectors; have 0. OK!
3552 --- Cleanup ---
3554 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
3555 {"return": {}}
3557   "bitmaps": {}
3560 --- Verification ---
3562 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
3563 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3564 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3567 === Mode top; Bitmap Sync on-success with simulated failure ===
3569 --- Preparing image & VM ---
3571 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
3572 {"return": {}}
3574 --- Write #0 ---
3576 write -P0x49 0x0000000 0x10000
3577 {"return": ""}
3578 write -P0x6c 0x0100000 0x10000
3579 {"return": ""}
3580 write -P0x6f 0x2000000 0x10000
3581 {"return": ""}
3582 write -P0x76 0x3ff0000 0x10000
3583 {"return": ""}
3585   "bitmaps": {}
3588 --- Reference Backup #0 ---
3591 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3592 {"return": {}}
3595 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3596 {"return": {}}
3598 {"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}}}
3599 {"return": {}}
3600 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3602 --- Add Bitmap ---
3604 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
3605 {"return": {}}
3607 --- Write #1 ---
3609 write -P0x65 0x0000000 0x10000
3610 {"return": ""}
3611 write -P0x77 0x00f8000 0x10000
3612 {"return": ""}
3613 write -P0x72 0x2008000 0x10000
3614 {"return": ""}
3615 write -P0x69 0x3fe0000 0x10000
3616 {"return": ""}
3618   "bitmaps": {
3619     "drive0": [
3620       {
3621         "busy": false,
3622         "count": 393216,
3623         "granularity": 65536,
3624         "name": "bitmap0",
3625         "persistent": false,
3626         "recording": true
3627       }
3628     ]
3629   }
3632 = Checking Bitmap bitmap0 =
3633 expecting 6 dirty sectors; have 6. OK!
3635 --- Reference Backup #1 ---
3638 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3639 {"return": {}}
3642 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3643 {"return": {}}
3645 {"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}}}
3646 {"return": {}}
3647 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3649 --- Test Backup #1 ---
3652 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3653 {"return": {}}
3656 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3657 {"return": {}}
3659 {"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}}}
3660 {"return": {}}
3662 --- Write #2 ---
3664 write -P0x74 0x0010000 0x10000
3665 {"return": ""}
3666 write -P0x69 0x00e8000 0x10000
3667 {"return": ""}
3668 write -P0x6e 0x2018000 0x10000
3669 {"return": ""}
3670 write -P0x67 0x3fe0000 0x20000
3671 {"return": ""}
3673   "bitmaps": {
3674     "drive0": [
3675       {
3676         "busy": false,
3677         "count": 0,
3678         "granularity": 65536,
3679         "persistent": false,
3680         "recording": false
3681       },
3682       {
3683         "busy": false,
3684         "count": 458752,
3685         "granularity": 65536,
3686         "persistent": false,
3687         "recording": true
3688       },
3689       {
3690         "busy": true,
3691         "count": 393216,
3692         "granularity": 65536,
3693         "name": "bitmap0",
3694         "persistent": false,
3695         "recording": true
3696       }
3697     ]
3698   }
3701 = Checking Bitmap bitmap0 =
3702 expecting 6 dirty sectors; have 6. OK!
3704 = Checking Bitmap (anonymous) =
3705 expecting 7 dirty sectors; have 7. OK!
3707 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
3708 {"return": {}}
3709 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3710 {"data": {"device": "backup_1", "len": 458752, "offset": 458752, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3712   "bitmaps": {
3713     "drive0": [
3714       {
3715         "busy": false,
3716         "count": 655360,
3717         "granularity": 65536,
3718         "name": "bitmap0",
3719         "persistent": false,
3720         "recording": true
3721       }
3722     ]
3723   }
3726 = Checking Bitmap bitmap0 =
3727 expecting 10 dirty sectors; have 10. OK!
3729 --- Write #3 ---
3731 write -P0xaa 0x0010000 0x30000
3732 {"return": ""}
3733 write -P0xbb 0x00d8000 0x10000
3734 {"return": ""}
3735 write -P0xcc 0x2028000 0x10000
3736 {"return": ""}
3737 write -P0xdd 0x3fc0000 0x10000
3738 {"return": ""}
3740   "bitmaps": {
3741     "drive0": [
3742       {
3743         "busy": false,
3744         "count": 983040,
3745         "granularity": 65536,
3746         "name": "bitmap0",
3747         "persistent": false,
3748         "recording": true
3749       }
3750     ]
3751   }
3754 = Checking Bitmap bitmap0 =
3755 expecting 15 dirty sectors; have 15. OK!
3757 --- Reference Backup #2 ---
3760 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3761 {"return": {}}
3764 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3765 {"return": {}}
3767 {"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}}}
3768 {"return": {}}
3769 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3771 --- Test Backup #2 ---
3774 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3775 {"return": {}}
3778 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3779 {"return": {}}
3781 {"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}}}
3782 {"return": {}}
3783 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3784 {"return": {}}
3785 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3786 {"data": {"device": "backup_2", "len": 983040, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3788   "bitmaps": {
3789     "drive0": [
3790       {
3791         "busy": false,
3792         "count": 0,
3793         "granularity": 65536,
3794         "name": "bitmap0",
3795         "persistent": false,
3796         "recording": true
3797       }
3798     ]
3799   }
3802 = Checking Bitmap bitmap0 =
3803 expecting 0 dirty sectors; have 0. OK!
3805 --- Cleanup ---
3807 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
3808 {"return": {}}
3810   "bitmaps": {}
3813 --- Verification ---
3815 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
3816 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3817 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
3820 === Mode top; Bitmap Sync on-success with intermediate failure ===
3822 --- Preparing image & VM ---
3824 {"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"}}
3825 {"return": {}}
3827 --- Write #0 ---
3829 write -P0x49 0x0000000 0x10000
3830 {"return": ""}
3831 write -P0x6c 0x0100000 0x10000
3832 {"return": ""}
3833 write -P0x6f 0x2000000 0x10000
3834 {"return": ""}
3835 write -P0x76 0x3ff0000 0x10000
3836 {"return": ""}
3838   "bitmaps": {}
3841 --- Reference Backup #0 ---
3844 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3845 {"return": {}}
3848 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3849 {"return": {}}
3851 {"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}}}
3852 {"return": {}}
3853 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3855 --- Add Bitmap ---
3857 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
3858 {"return": {}}
3860 --- Write #1 ---
3862 write -P0x65 0x0000000 0x10000
3863 {"return": ""}
3864 write -P0x77 0x00f8000 0x10000
3865 {"return": ""}
3866 write -P0x72 0x2008000 0x10000
3867 {"return": ""}
3868 write -P0x69 0x3fe0000 0x10000
3869 {"return": ""}
3871   "bitmaps": {
3872     "drive0": [
3873       {
3874         "busy": false,
3875         "count": 393216,
3876         "granularity": 65536,
3877         "name": "bitmap0",
3878         "persistent": false,
3879         "recording": true
3880       }
3881     ]
3882   }
3885 = Checking Bitmap bitmap0 =
3886 expecting 6 dirty sectors; have 6. OK!
3888 --- Reference Backup #1 ---
3891 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3892 {"return": {}}
3895 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3896 {"return": {}}
3898 {"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}}}
3899 {"return": {}}
3900 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3902 {"return": ""}
3904 --- Test Backup #1 ---
3907 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3908 {"return": {}}
3911 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3912 {"return": {}}
3914 {"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}}}
3915 {"return": {}}
3916 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3917 {"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"}}
3919   "bitmaps": {
3920     "drive0": [
3921       {
3922         "busy": false,
3923         "count": 393216,
3924         "granularity": 65536,
3925         "name": "bitmap0",
3926         "persistent": false,
3927         "recording": true
3928       }
3929     ]
3930   }
3933 = Checking Bitmap bitmap0 =
3934 expecting 6 dirty sectors; have 6. OK!
3936 --- Write #3 ---
3938 write -P0xaa 0x0010000 0x30000
3939 {"return": ""}
3940 write -P0xbb 0x00d8000 0x10000
3941 {"return": ""}
3942 write -P0xcc 0x2028000 0x10000
3943 {"return": ""}
3944 write -P0xdd 0x3fc0000 0x10000
3945 {"return": ""}
3947   "bitmaps": {
3948     "drive0": [
3949       {
3950         "busy": false,
3951         "count": 917504,
3952         "granularity": 65536,
3953         "name": "bitmap0",
3954         "persistent": false,
3955         "recording": true
3956       }
3957     ]
3958   }
3961 = Checking Bitmap bitmap0 =
3962 expecting 14 dirty sectors; have 14. OK!
3964 --- Reference Backup #2 ---
3967 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3968 {"return": {}}
3971 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3972 {"return": {}}
3974 {"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}}}
3975 {"return": {}}
3976 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3978 --- Test Backup #2 ---
3981 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
3982 {"return": {}}
3985 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
3986 {"return": {}}
3988 {"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}}}
3989 {"return": {}}
3990 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
3991 {"return": {}}
3992 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3993 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
3995   "bitmaps": {
3996     "drive0": [
3997       {
3998         "busy": false,
3999         "count": 0,
4000         "granularity": 65536,
4001         "name": "bitmap0",
4002         "persistent": false,
4003         "recording": true
4004       }
4005     ]
4006   }
4009 = Checking Bitmap bitmap0 =
4010 expecting 0 dirty sectors; have 0. OK!
4012 --- Cleanup ---
4014 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4015 {"return": {}}
4017   "bitmaps": {}
4020 --- Verification ---
4022 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
4023 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4024 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4027 === Mode top; Bitmap Sync on-success without failure ===
4029 --- Preparing image & VM ---
4031 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
4032 {"return": {}}
4034 --- Write #0 ---
4036 write -P0x49 0x0000000 0x10000
4037 {"return": ""}
4038 write -P0x6c 0x0100000 0x10000
4039 {"return": ""}
4040 write -P0x6f 0x2000000 0x10000
4041 {"return": ""}
4042 write -P0x76 0x3ff0000 0x10000
4043 {"return": ""}
4045   "bitmaps": {}
4048 --- Reference Backup #0 ---
4051 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4052 {"return": {}}
4055 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4056 {"return": {}}
4058 {"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}}}
4059 {"return": {}}
4060 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4062 --- Add Bitmap ---
4064 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4065 {"return": {}}
4067 --- Write #1 ---
4069 write -P0x65 0x0000000 0x10000
4070 {"return": ""}
4071 write -P0x77 0x00f8000 0x10000
4072 {"return": ""}
4073 write -P0x72 0x2008000 0x10000
4074 {"return": ""}
4075 write -P0x69 0x3fe0000 0x10000
4076 {"return": ""}
4078   "bitmaps": {
4079     "drive0": [
4080       {
4081         "busy": false,
4082         "count": 393216,
4083         "granularity": 65536,
4084         "name": "bitmap0",
4085         "persistent": false,
4086         "recording": true
4087       }
4088     ]
4089   }
4092 = Checking Bitmap bitmap0 =
4093 expecting 6 dirty sectors; have 6. OK!
4095 --- Reference Backup #1 ---
4098 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4099 {"return": {}}
4102 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4103 {"return": {}}
4105 {"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}}}
4106 {"return": {}}
4107 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4109 --- Test Backup #1 ---
4112 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4113 {"return": {}}
4116 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4117 {"return": {}}
4119 {"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}}}
4120 {"return": {}}
4122 --- Write #2 ---
4124 write -P0x74 0x0010000 0x10000
4125 {"return": ""}
4126 write -P0x69 0x00e8000 0x10000
4127 {"return": ""}
4128 write -P0x6e 0x2018000 0x10000
4129 {"return": ""}
4130 write -P0x67 0x3fe0000 0x20000
4131 {"return": ""}
4133   "bitmaps": {
4134     "drive0": [
4135       {
4136         "busy": false,
4137         "count": 0,
4138         "granularity": 65536,
4139         "persistent": false,
4140         "recording": false
4141       },
4142       {
4143         "busy": false,
4144         "count": 458752,
4145         "granularity": 65536,
4146         "persistent": false,
4147         "recording": true
4148       },
4149       {
4150         "busy": true,
4151         "count": 393216,
4152         "granularity": 65536,
4153         "name": "bitmap0",
4154         "persistent": false,
4155         "recording": true
4156       }
4157     ]
4158   }
4161 = Checking Bitmap bitmap0 =
4162 expecting 6 dirty sectors; have 6. OK!
4164 = Checking Bitmap (anonymous) =
4165 expecting 7 dirty sectors; have 7. OK!
4167 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
4168 {"return": {}}
4169 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4170 {"data": {"device": "backup_1", "len": 458752, "offset": 458752, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4172   "bitmaps": {
4173     "drive0": [
4174       {
4175         "busy": false,
4176         "count": 458752,
4177         "granularity": 65536,
4178         "name": "bitmap0",
4179         "persistent": false,
4180         "recording": true
4181       }
4182     ]
4183   }
4186 = Checking Bitmap bitmap0 =
4187 expecting 7 dirty sectors; have 7. OK!
4189 --- Write #3 ---
4191 write -P0xaa 0x0010000 0x30000
4192 {"return": ""}
4193 write -P0xbb 0x00d8000 0x10000
4194 {"return": ""}
4195 write -P0xcc 0x2028000 0x10000
4196 {"return": ""}
4197 write -P0xdd 0x3fc0000 0x10000
4198 {"return": ""}
4200   "bitmaps": {
4201     "drive0": [
4202       {
4203         "busy": false,
4204         "count": 786432,
4205         "granularity": 65536,
4206         "name": "bitmap0",
4207         "persistent": false,
4208         "recording": true
4209       }
4210     ]
4211   }
4214 = Checking Bitmap bitmap0 =
4215 expecting 12 dirty sectors; have 12. OK!
4217 --- Reference Backup #2 ---
4220 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4221 {"return": {}}
4224 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4225 {"return": {}}
4227 {"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}}}
4228 {"return": {}}
4229 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4231 --- Test Backup #2 ---
4234 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4235 {"return": {}}
4238 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4239 {"return": {}}
4241 {"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}}}
4242 {"return": {}}
4243 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
4244 {"return": {}}
4245 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4246 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4248   "bitmaps": {
4249     "drive0": [
4250       {
4251         "busy": false,
4252         "count": 0,
4253         "granularity": 65536,
4254         "name": "bitmap0",
4255         "persistent": false,
4256         "recording": true
4257       }
4258     ]
4259   }
4262 = Checking Bitmap bitmap0 =
4263 expecting 0 dirty sectors; have 0. OK!
4265 --- Cleanup ---
4267 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4268 {"return": {}}
4270   "bitmaps": {}
4273 --- Verification ---
4275 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
4276 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4277 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4280 === Mode top; Bitmap Sync always with simulated failure ===
4282 --- Preparing image & VM ---
4284 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
4285 {"return": {}}
4287 --- Write #0 ---
4289 write -P0x49 0x0000000 0x10000
4290 {"return": ""}
4291 write -P0x6c 0x0100000 0x10000
4292 {"return": ""}
4293 write -P0x6f 0x2000000 0x10000
4294 {"return": ""}
4295 write -P0x76 0x3ff0000 0x10000
4296 {"return": ""}
4298   "bitmaps": {}
4301 --- Reference Backup #0 ---
4304 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4305 {"return": {}}
4308 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4309 {"return": {}}
4311 {"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}}}
4312 {"return": {}}
4313 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4315 --- Add Bitmap ---
4317 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4318 {"return": {}}
4320 --- Write #1 ---
4322 write -P0x65 0x0000000 0x10000
4323 {"return": ""}
4324 write -P0x77 0x00f8000 0x10000
4325 {"return": ""}
4326 write -P0x72 0x2008000 0x10000
4327 {"return": ""}
4328 write -P0x69 0x3fe0000 0x10000
4329 {"return": ""}
4331   "bitmaps": {
4332     "drive0": [
4333       {
4334         "busy": false,
4335         "count": 393216,
4336         "granularity": 65536,
4337         "name": "bitmap0",
4338         "persistent": false,
4339         "recording": true
4340       }
4341     ]
4342   }
4345 = Checking Bitmap bitmap0 =
4346 expecting 6 dirty sectors; have 6. OK!
4348 --- Reference Backup #1 ---
4351 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4352 {"return": {}}
4355 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4356 {"return": {}}
4358 {"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}}}
4359 {"return": {}}
4360 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4362 --- Test Backup #1 ---
4365 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4366 {"return": {}}
4369 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4370 {"return": {}}
4372 {"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}}}
4373 {"return": {}}
4375 --- Write #2 ---
4377 write -P0x74 0x0010000 0x10000
4378 {"return": ""}
4379 write -P0x69 0x00e8000 0x10000
4380 {"return": ""}
4381 write -P0x6e 0x2018000 0x10000
4382 {"return": ""}
4383 write -P0x67 0x3fe0000 0x20000
4384 {"return": ""}
4386   "bitmaps": {
4387     "drive0": [
4388       {
4389         "busy": false,
4390         "count": 0,
4391         "granularity": 65536,
4392         "persistent": false,
4393         "recording": false
4394       },
4395       {
4396         "busy": false,
4397         "count": 458752,
4398         "granularity": 65536,
4399         "persistent": false,
4400         "recording": true
4401       },
4402       {
4403         "busy": true,
4404         "count": 393216,
4405         "granularity": 65536,
4406         "name": "bitmap0",
4407         "persistent": false,
4408         "recording": true
4409       }
4410     ]
4411   }
4414 = Checking Bitmap bitmap0 =
4415 expecting 6 dirty sectors; have 6. OK!
4417 = Checking Bitmap (anonymous) =
4418 expecting 7 dirty sectors; have 7. OK!
4420 {"execute": "job-cancel", "arguments": {"id": "backup_1"}}
4421 {"return": {}}
4422 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4423 {"data": {"device": "backup_1", "len": 458752, "offset": 458752, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4425   "bitmaps": {
4426     "drive0": [
4427       {
4428         "busy": false,
4429         "count": 458752,
4430         "granularity": 65536,
4431         "name": "bitmap0",
4432         "persistent": false,
4433         "recording": true
4434       }
4435     ]
4436   }
4439 = Checking Bitmap bitmap0 =
4440 expecting 7 dirty sectors; have 7. OK!
4442 --- Write #3 ---
4444 write -P0xaa 0x0010000 0x30000
4445 {"return": ""}
4446 write -P0xbb 0x00d8000 0x10000
4447 {"return": ""}
4448 write -P0xcc 0x2028000 0x10000
4449 {"return": ""}
4450 write -P0xdd 0x3fc0000 0x10000
4451 {"return": ""}
4453   "bitmaps": {
4454     "drive0": [
4455       {
4456         "busy": false,
4457         "count": 786432,
4458         "granularity": 65536,
4459         "name": "bitmap0",
4460         "persistent": false,
4461         "recording": true
4462       }
4463     ]
4464   }
4467 = Checking Bitmap bitmap0 =
4468 expecting 12 dirty sectors; have 12. OK!
4470 --- Reference Backup #2 ---
4473 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4474 {"return": {}}
4477 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4478 {"return": {}}
4480 {"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}}}
4481 {"return": {}}
4482 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4484 --- Test Backup #2 ---
4487 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4488 {"return": {}}
4491 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4492 {"return": {}}
4494 {"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}}}
4495 {"return": {}}
4496 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
4497 {"return": {}}
4498 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4499 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4501   "bitmaps": {
4502     "drive0": [
4503       {
4504         "busy": false,
4505         "count": 0,
4506         "granularity": 65536,
4507         "name": "bitmap0",
4508         "persistent": false,
4509         "recording": true
4510       }
4511     ]
4512   }
4515 = Checking Bitmap bitmap0 =
4516 expecting 0 dirty sectors; have 0. OK!
4518 --- Cleanup ---
4520 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4521 {"return": {}}
4523   "bitmaps": {}
4526 --- Verification ---
4528 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
4529 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4530 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4533 === Mode top; Bitmap Sync always with intermediate failure ===
4535 --- Preparing image & VM ---
4537 {"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"}}
4538 {"return": {}}
4540 --- Write #0 ---
4542 write -P0x49 0x0000000 0x10000
4543 {"return": ""}
4544 write -P0x6c 0x0100000 0x10000
4545 {"return": ""}
4546 write -P0x6f 0x2000000 0x10000
4547 {"return": ""}
4548 write -P0x76 0x3ff0000 0x10000
4549 {"return": ""}
4551   "bitmaps": {}
4554 --- Reference Backup #0 ---
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": {"device": "drive0", "filter-node-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target": "ref_target_0", "x-perf": {"max-workers": 1}}}
4565 {"return": {}}
4566 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4568 --- Add Bitmap ---
4570 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4571 {"return": {}}
4573 --- Write #1 ---
4575 write -P0x65 0x0000000 0x10000
4576 {"return": ""}
4577 write -P0x77 0x00f8000 0x10000
4578 {"return": ""}
4579 write -P0x72 0x2008000 0x10000
4580 {"return": ""}
4581 write -P0x69 0x3fe0000 0x10000
4582 {"return": ""}
4584   "bitmaps": {
4585     "drive0": [
4586       {
4587         "busy": false,
4588         "count": 393216,
4589         "granularity": 65536,
4590         "name": "bitmap0",
4591         "persistent": false,
4592         "recording": true
4593       }
4594     ]
4595   }
4598 = Checking Bitmap bitmap0 =
4599 expecting 6 dirty sectors; have 6. OK!
4601 --- Reference Backup #1 ---
4604 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4605 {"return": {}}
4608 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4609 {"return": {}}
4611 {"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}}}
4612 {"return": {}}
4613 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4615 {"return": ""}
4617 --- Test Backup #1 ---
4620 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4621 {"return": {}}
4624 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4625 {"return": {}}
4627 {"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}}}
4628 {"return": {}}
4629 {"data": {"action": "report", "device": "backup_1", "operation": "read"}, "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4630 {"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"}}
4632   "bitmaps": {
4633     "drive0": [
4634       {
4635         "busy": false,
4636         "count": 393216,
4637         "granularity": 65536,
4638         "name": "bitmap0",
4639         "persistent": false,
4640         "recording": true
4641       }
4642     ]
4643   }
4646 = Checking Bitmap bitmap0 =
4647 expecting 6 dirty sectors; have 6. OK!
4649 --- Write #3 ---
4651 write -P0xaa 0x0010000 0x30000
4652 {"return": ""}
4653 write -P0xbb 0x00d8000 0x10000
4654 {"return": ""}
4655 write -P0xcc 0x2028000 0x10000
4656 {"return": ""}
4657 write -P0xdd 0x3fc0000 0x10000
4658 {"return": ""}
4660   "bitmaps": {
4661     "drive0": [
4662       {
4663         "busy": false,
4664         "count": 917504,
4665         "granularity": 65536,
4666         "name": "bitmap0",
4667         "persistent": false,
4668         "recording": true
4669       }
4670     ]
4671   }
4674 = Checking Bitmap bitmap0 =
4675 expecting 14 dirty sectors; have 14. OK!
4677 --- Reference Backup #2 ---
4680 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4681 {"return": {}}
4684 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4685 {"return": {}}
4687 {"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}}}
4688 {"return": {}}
4689 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4691 --- Test Backup #2 ---
4694 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4695 {"return": {}}
4698 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4699 {"return": {}}
4701 {"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}}}
4702 {"return": {}}
4703 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
4704 {"return": {}}
4705 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4706 {"data": {"device": "backup_2", "len": 917504, "offset": 917504, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4708   "bitmaps": {
4709     "drive0": [
4710       {
4711         "busy": false,
4712         "count": 0,
4713         "granularity": 65536,
4714         "name": "bitmap0",
4715         "persistent": false,
4716         "recording": true
4717       }
4718     ]
4719   }
4722 = Checking Bitmap bitmap0 =
4723 expecting 0 dirty sectors; have 0. OK!
4725 --- Cleanup ---
4727 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4728 {"return": {}}
4730   "bitmaps": {}
4733 --- Verification ---
4735 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Mismatch, OK!
4736 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4737 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4740 === Mode top; Bitmap Sync always without failure ===
4742 --- Preparing image & VM ---
4744 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
4745 {"return": {}}
4747 --- Write #0 ---
4749 write -P0x49 0x0000000 0x10000
4750 {"return": ""}
4751 write -P0x6c 0x0100000 0x10000
4752 {"return": ""}
4753 write -P0x6f 0x2000000 0x10000
4754 {"return": ""}
4755 write -P0x76 0x3ff0000 0x10000
4756 {"return": ""}
4758   "bitmaps": {}
4761 --- Reference Backup #0 ---
4764 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4765 {"return": {}}
4768 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4769 {"return": {}}
4771 {"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}}}
4772 {"return": {}}
4773 {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4775 --- Add Bitmap ---
4777 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
4778 {"return": {}}
4780 --- Write #1 ---
4782 write -P0x65 0x0000000 0x10000
4783 {"return": ""}
4784 write -P0x77 0x00f8000 0x10000
4785 {"return": ""}
4786 write -P0x72 0x2008000 0x10000
4787 {"return": ""}
4788 write -P0x69 0x3fe0000 0x10000
4789 {"return": ""}
4791   "bitmaps": {
4792     "drive0": [
4793       {
4794         "busy": false,
4795         "count": 393216,
4796         "granularity": 65536,
4797         "name": "bitmap0",
4798         "persistent": false,
4799         "recording": true
4800       }
4801     ]
4802   }
4805 = Checking Bitmap bitmap0 =
4806 expecting 6 dirty sectors; have 6. OK!
4808 --- Reference Backup #1 ---
4811 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4812 {"return": {}}
4815 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4816 {"return": {}}
4818 {"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}}}
4819 {"return": {}}
4820 {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4822 --- Test Backup #1 ---
4825 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4826 {"return": {}}
4829 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4830 {"return": {}}
4832 {"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}}}
4833 {"return": {}}
4835 --- Write #2 ---
4837 write -P0x74 0x0010000 0x10000
4838 {"return": ""}
4839 write -P0x69 0x00e8000 0x10000
4840 {"return": ""}
4841 write -P0x6e 0x2018000 0x10000
4842 {"return": ""}
4843 write -P0x67 0x3fe0000 0x20000
4844 {"return": ""}
4846   "bitmaps": {
4847     "drive0": [
4848       {
4849         "busy": false,
4850         "count": 0,
4851         "granularity": 65536,
4852         "persistent": false,
4853         "recording": false
4854       },
4855       {
4856         "busy": false,
4857         "count": 458752,
4858         "granularity": 65536,
4859         "persistent": false,
4860         "recording": true
4861       },
4862       {
4863         "busy": true,
4864         "count": 393216,
4865         "granularity": 65536,
4866         "name": "bitmap0",
4867         "persistent": false,
4868         "recording": true
4869       }
4870     ]
4871   }
4874 = Checking Bitmap bitmap0 =
4875 expecting 6 dirty sectors; have 6. OK!
4877 = Checking Bitmap (anonymous) =
4878 expecting 7 dirty sectors; have 7. OK!
4880 {"execute": "job-finalize", "arguments": {"id": "backup_1"}}
4881 {"return": {}}
4882 {"data": {"id": "backup_1", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4883 {"data": {"device": "backup_1", "len": 458752, "offset": 458752, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4885   "bitmaps": {
4886     "drive0": [
4887       {
4888         "busy": false,
4889         "count": 458752,
4890         "granularity": 65536,
4891         "name": "bitmap0",
4892         "persistent": false,
4893         "recording": true
4894       }
4895     ]
4896   }
4899 = Checking Bitmap bitmap0 =
4900 expecting 7 dirty sectors; have 7. OK!
4902 --- Write #3 ---
4904 write -P0xaa 0x0010000 0x30000
4905 {"return": ""}
4906 write -P0xbb 0x00d8000 0x10000
4907 {"return": ""}
4908 write -P0xcc 0x2028000 0x10000
4909 {"return": ""}
4910 write -P0xdd 0x3fc0000 0x10000
4911 {"return": ""}
4913   "bitmaps": {
4914     "drive0": [
4915       {
4916         "busy": false,
4917         "count": 786432,
4918         "granularity": 65536,
4919         "name": "bitmap0",
4920         "persistent": false,
4921         "recording": true
4922       }
4923     ]
4924   }
4927 = Checking Bitmap bitmap0 =
4928 expecting 12 dirty sectors; have 12. OK!
4930 --- Reference Backup #2 ---
4933 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4934 {"return": {}}
4937 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4938 {"return": {}}
4940 {"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}}}
4941 {"return": {}}
4942 {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4944 --- Test Backup #2 ---
4947 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
4948 {"return": {}}
4951 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
4952 {"return": {}}
4954 {"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}}}
4955 {"return": {}}
4956 {"execute": "job-finalize", "arguments": {"id": "backup_2"}}
4957 {"return": {}}
4958 {"data": {"id": "backup_2", "type": "backup"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4959 {"data": {"device": "backup_2", "len": 786432, "offset": 786432, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
4961   "bitmaps": {
4962     "drive0": [
4963       {
4964         "busy": false,
4965         "count": 0,
4966         "granularity": 65536,
4967         "name": "bitmap0",
4968         "persistent": false,
4969         "recording": true
4970       }
4971     ]
4972   }
4975 = Checking Bitmap bitmap0 =
4976 expecting 0 dirty sectors; have 0. OK!
4978 --- Cleanup ---
4980 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmap0", "node": "drive0"}}
4981 {"return": {}}
4983   "bitmaps": {}
4986 --- Verification ---
4988 qemu_img compare "TEST_DIR/PID-bsync1" "TEST_DIR/PID-fbackup1" ==> Identical, OK!
4989 qemu_img compare "TEST_DIR/PID-bsync2" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4990 qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID-fbackup2" ==> Identical, OK!
4993 === API failure tests ===
4995 --- Preparing image & VM ---
4997 {"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}}
4998 {"return": {}}
5001 {"execute": "job-dismiss", "arguments": {"id": "bdc-file-job"}}
5002 {"return": {}}
5005 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}}
5006 {"return": {}}
5009 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node": "drive0"}}
5010 {"return": {}}
5012 -- Testing invalid QMP commands --
5014 -- Sync mode incremental tests --
5016 {"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}}}
5017 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'incremental' sync mode"}}
5019 {"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}}}
5020 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'incremental' sync mode"}}
5022 {"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}}}
5023 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'incremental' sync mode"}}
5025 {"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}}}
5026 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'incremental' sync mode"}}
5028 {"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}}}
5029 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5031 {"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}}}
5032 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-success' when using sync mode 'incremental'"}}
5034 {"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}}}
5035 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-success' when using sync mode 'incremental'"}}
5037 {"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}}}
5038 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5040 {"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}}}
5041 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-success' when using sync mode 'incremental'"}}
5043 {"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}}}
5044 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-success' when using sync mode 'incremental'"}}
5046 -- Sync mode bitmap tests --
5048 {"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}}}
5049 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'bitmap' sync mode"}}
5051 {"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}}}
5052 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'bitmap' sync mode"}}
5054 {"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}}}
5055 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'bitmap' sync mode"}}
5057 {"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}}}
5058 {"error": {"class": "GenericError", "desc": "must provide a valid bitmap name for 'bitmap' sync mode"}}
5060 {"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}}}
5061 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5063 {"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}}}
5064 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5066 {"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}}}
5067 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5069 {"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}}}
5070 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5072 {"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}}}
5073 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be given when providing a bitmap"}}
5075 -- Sync mode full tests --
5077 {"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}}}
5078 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5080 {"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}}}
5081 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5083 {"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}}}
5084 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5086 {"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}}}
5087 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5089 {"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}}}
5090 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5092 {"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}}}
5093 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5095 {"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}}}
5096 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5098 {"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}}}
5099 {"error": {"class": "GenericError", "desc": "Bitmap sync mode 'never' has no meaningful effect when combined with sync mode 'full'"}}
5101 {"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}}}
5102 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be given when providing a bitmap"}}
5104 -- Sync mode top tests --
5106 {"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}}}
5107 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5109 {"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}}}
5110 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5112 {"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}}}
5113 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5115 {"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}}}
5116 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5118 {"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}}}
5119 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5121 {"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}}}
5122 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5124 {"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}}}
5125 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5127 {"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}}}
5128 {"error": {"class": "GenericError", "desc": "Bitmap sync mode 'never' has no meaningful effect when combined with sync mode 'top'"}}
5130 {"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}}}
5131 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be given when providing a bitmap"}}
5133 -- Sync mode none tests --
5135 {"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}}}
5136 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5138 {"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}}}
5139 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5141 {"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}}}
5142 {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mode without a bitmap"}}
5144 {"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}}}
5145 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5147 {"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}}}
5148 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5150 {"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}}}
5151 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5153 {"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}}}
5154 {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not be found"}}
5156 {"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}}}
5157 {"error": {"class": "GenericError", "desc": "sync mode 'none' does not produce meaningful bitmap outputs"}}
5159 {"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}}}
5160 {"error": {"class": "GenericError", "desc": "sync mode 'none' does not produce meaningful bitmap outputs"}}
5162 {"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}}}
5163 {"error": {"class": "GenericError", "desc": "sync mode 'none' does not produce meaningful bitmap outputs"}}
5165 {"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}}}
5166 {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be given when providing a bitmap"}}