#!/usr/bin/env python3
#
# Tests dirty-bitmap backup with unaligned bitmap granularity
#
# Copyright (c) 2020 Proxmox Server Solutions
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# owner=s.reiter@proxmox.com

import iotests
from iotests import qemu_img_create, qemu_img_log, file_path

iotests.script_initialize(supported_fmts=['qcow2'],
                          supported_protocols=['file'])

test_img = file_path('test.qcow2')
target_img = file_path('target.qcow2')

# unaligned by one byte
image_len = 4097
bitmap_granularity = 4096

qemu_img_create('-f', iotests.imgfmt, test_img, str(image_len))

# create VM
vm = iotests.VM().add_drive(test_img)
vm.launch()

# write to the entire image
vm.hmp_qemu_io('drive0', 'write -P0x16 0 4096');
vm.hmp_qemu_io('drive0', 'write -P0x17 4096 1');

# do backup and wait for completion
vm.qmp('drive-backup', **{
    'device': 'drive0',
    'sync': 'full',
    'target': target_img
})

event = vm.event_wait(name='BLOCK_JOB_COMPLETED',
                      match={'data': {'device': 'drive0'}},
                      timeout=5.0)

# shutdown to sync images
vm.shutdown()

# backup succeeded, check if image is correct
qemu_img_log('compare', test_img, target_img)
