132 (fef80ea073c4862bc9eaddb6ddb0ed970b8ad7c4) | 132 (b6aed193e5ecca32bb07e062f58f0daca06e7009) |
---|---|
1#!/usr/bin/env python3 2# group: rw quick 3# 4# Test mirror with unmap 5# 6# Copyright (C) 2015 Red Hat, Inc. 7# 8# This program is free software; you can redistribute it and/or modify --- 33 unchanged lines hidden (view full) --- 42 self.vm.shutdown() 43 os.remove(test_img) 44 try: 45 os.remove(target_img) 46 except OSError: 47 pass 48 49 def test_mirror_discard(self): | 1#!/usr/bin/env python3 2# group: rw quick 3# 4# Test mirror with unmap 5# 6# Copyright (C) 2015 Red Hat, Inc. 7# 8# This program is free software; you can redistribute it and/or modify --- 33 unchanged lines hidden (view full) --- 42 self.vm.shutdown() 43 os.remove(test_img) 44 try: 45 os.remove(target_img) 46 except OSError: 47 pass 48 49 def test_mirror_discard(self): |
50 result = self.vm.qmp('drive-mirror', device='drive0', sync='full', 51 target=target_img) 52 self.assert_qmp(result, 'return', {}) | 50 self.vm.cmd('drive-mirror', device='drive0', sync='full', 51 target=target_img) |
53 self.vm.hmp_qemu_io('drive0', 'discard 0 64k') 54 self.complete_and_wait('drive0') 55 self.vm.shutdown() 56 self.assertTrue(iotests.compare_images(test_img, target_img), 57 'target image does not match source after mirroring') 58 59if __name__ == '__main__': 60 iotests.main(supported_fmts=['raw', 'qcow2'], 61 supported_protocols=['file']) | 52 self.vm.hmp_qemu_io('drive0', 'discard 0 64k') 53 self.complete_and_wait('drive0') 54 self.vm.shutdown() 55 self.assertTrue(iotests.compare_images(test_img, target_img), 56 'target image does not match source after mirroring') 57 58if __name__ == '__main__': 59 iotests.main(supported_fmts=['raw', 'qcow2'], 60 supported_protocols=['file']) |