avocado-vt
avocado-vt copied to clipboard
inc_backup: Dump tmp data to tmp dir
Previously the data will be dumped to /path/to/original_file.dmp. But when the original disk is a block device, such as /dev/sdb, the data will be dumped to /dev/sdb.dump which is not a suitable place. Or if the origial image is in a readonly dir, of course the data could not be dumped to that dir. This patch is to fix above issues to use the tmp dir to save the dumped data when do data comparison.
Signed-off-by: Yi Sun [email protected]
In rhel9, before fix we'll have error:
CmdError: Command 'qemu-io -f qcow2 -c "read -vC 10485760 1048576" /dev/sdb -r -U | sed '$d'>> /dev/sdb.dump' failed.stdout: b''stderr: b"sed: couldn't write 76 items to stdout: No space left on device\n"additional_info: None
After fix cases can be passed:
# avocado run --vt-type libvirt incremental_backup.push_mode.original_disk_local..backup_to_block.positive_test
No python imaging library installed. Screendump and Windows guest BSOD detection are disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
No python imaging library installed. PPM image conversion to JPEG disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
JOB ID : e0624ddb6109561da7925d8a8241bb063ba45a22
JOB LOG : /var/lib/avocado/job-results/job-2022-09-08T06.58-e0624dd/job.log
(1/4) type_specific.io-github-autotest-libvirt.incremental_backup.push_mode.original_disk_local.hotplug_disk.backup_to_qcow2.backup_to_block.positive_test: STARTED
(1/4) type_specific.io-github-autotest-libvirt.incremental_backup.push_mode.original_disk_local.hotplug_disk.backup_to_qcow2.backup_to_block.positive_test: PASS (61.57 s)
(2/4) type_specific.io-github-autotest-libvirt.incremental_backup.push_mode.original_disk_local.hotplug_disk.backup_to_raw.backup_to_block.positive_test: STARTED
(2/4) type_specific.io-github-autotest-libvirt.incremental_backup.push_mode.original_disk_local.hotplug_disk.backup_to_raw.backup_to_block.positive_test: PASS (84.31 s)
(3/4) type_specific.io-github-autotest-libvirt.incremental_backup.push_mode.original_disk_local.coldplug_disk.backup_to_qcow2.backup_to_block.positive_test: STARTED
(3/4) type_specific.io-github-autotest-libvirt.incremental_backup.push_mode.original_disk_local.coldplug_disk.backup_to_qcow2.backup_to_block.positive_test: PASS (59.58 s)
(4/4) type_specific.io-github-autotest-libvirt.incremental_backup.push_mode.original_disk_local.coldplug_disk.backup_to_raw.backup_to_block.positive_test: STARTED
(4/4) type_specific.io-github-autotest-libvirt.incremental_backup.push_mode.original_disk_local.coldplug_disk.backup_to_raw.backup_to_block.positive_test: PASS (83.80 s)
RESULTS : PASS 4 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /var/lib/avocado/job-results/job-2022-09-08T06.58-e0624dd/results.html
JOB TIME : 292.10 s
@lento-sun some static check for spelling need to be fixed as well
@lento-sun some static check for spelling need to be fixed as well
@chunfuwen I'm a little confused with the Failed Static checks, the log shows:
Run ./selftests/signedoff-check.sh
** Running signedoff-check...
Error: Process completed with exit code 1.
So is there something wrong with my sign-off?
@dzhengfy please take a review
@dzhengfy could you pls have a check, thx
Not sure why the signoff information can not be detected. But it seems not critical issue. So I merge it.