def METHOD_NAME(self):
    self.vm = self.mkVm()
    self.vm.launch()
    self.qmpAddBitmap()
    # Calculate hashes
    self.writeRegions(regions1)
    sha256_1 = self.getSha256()
    self.writeRegions(regions2)
    sha256_2 = self.getSha256()
    assert sha256_1 != sha256_2 # Otherwise, it's not very interesting.
    result = self.vm.qmp('block-dirty-bitmap-clear', node='drive0',
                         name='bitmap0')
    self.assert_qmp(result, 'return', {})
    # Start with regions1
    self.writeRegions(regions1)
    assert sha256_1 == self.getSha256()
    self.vm.shutdown()
    self.vm = self.mkVmRo()
    self.vm.launch()
    assert sha256_1 == self.getSha256()
    # Check that we are in RO mode and can't modify bitmap.
    self.writeRegions(regions2)
    assert sha256_1 == self.getSha256()
    # Reopen to RW
    result = self.vm.qmp('x-blockdev-reopen', **{
        'node-name': 'node0',
        'driver': iotests.imgfmt,
        'file': {
            'driver': 'file',
            'filename': disk
        },
        'read-only': False
    })
    self.assert_qmp(result, 'return', {})
    # Check that bitmap is reopened to RW and we can write to it.
    self.writeRegions(regions2)
    assert sha256_2 == self.getSha256()
    self.vm.shutdown()