avocado-vt icon indicating copy to clipboard operation
avocado-vt copied to clipboard

inc_backup: Dump tmp data to tmp dir

Open lento-sun opened this issue 2 years ago • 5 comments

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]

lento-sun avatar Sep 08 '22 10:09 lento-sun

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 avatar Sep 08 '22 11:09 lento-sun

@lento-sun some static check for spelling need to be fixed as well

chunfuwen avatar Sep 19 '22 07:09 chunfuwen

@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?

lento-sun avatar Sep 21 '22 12:09 lento-sun

@dzhengfy please take a review

chunfuwen avatar Nov 14 '22 03:11 chunfuwen

@dzhengfy could you pls have a check, thx

lento-sun avatar Nov 19 '22 01:11 lento-sun

Not sure why the signoff information can not be detected. But it seems not critical issue. So I merge it.

dzhengfy avatar Dec 12 '22 07:12 dzhengfy