-#!/usr/bin/env python
+#!/usr/bin/env python3
+# group: rw
#
# Tests growing a large refcount table.
#
import qcow2
from qcow2 import QcowHeader
import iotests
-from iotests import qemu_img, qemu_img_verbose, qemu_io
+from iotests import qemu_img, qemu_img_log, qemu_io
import struct
import subprocess
import sys
-if sys.version_info.major == 2:
- range = xrange
-
test_img = os.path.join(iotests.test_dir, 'test.img')
class TestRefcountTableGrowth(iotests.QMPTestCase):
def test_grow_refcount_table(self):
qemu_io('-c', 'write 3800M 1M', test_img)
- qemu_img_verbose('check' , test_img)
+ qemu_img_log('check' , test_img)
pass
if __name__ == '__main__':
- iotests.main(supported_fmts=['qcow2'])
+ iotests.activate_logging()
+ iotests.main(supported_fmts=['qcow2'],
+ supported_protocols=['file'],
+ unsupported_imgopts=['refcount_bits'])