Lines Matching +full:p +full:- +full:384
31 size_diff = size_long - size_short
33 def create_chain() -> None:
34 iotests.qemu_img_create('-f', iotests.imgfmt, base, str(size_long))
35 iotests.qemu_img_create('-f', iotests.imgfmt, '-b', base,
36 '-F', iotests.imgfmt, mid, str(size_short))
37 iotests.qemu_img_create('-f', iotests.imgfmt, '-b', mid,
38 '-F', iotests.imgfmt, top, str(size_long))
40 iotests.qemu_io_log('-c', 'write -P 1 0 %d' % size_long, base)
42 def create_vm() -> iotests.VM:
44 vm.add_blockdev('file,filename=%s,node-name=base-file' % base)
45 vm.add_blockdev('%s,file=base-file,node-name=base' % iotests.imgfmt)
46 vm.add_blockdev('file,filename=%s,node-name=mid-file' % mid)
47 vm.add_blockdev('%s,file=mid-file,node-name=mid,backing=base'
49 vm.add_drive(top, 'backing=mid,node-name=top')
62 iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, top)
63 iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), top)
67 iotests.qemu_io_log('-c', 'alloc 0 %d' % size_short,
68 '-c', 'alloc %d %d' % (size_short, size_diff),
71 iotests.qemu_io_log('-c', 'alloc 0 %d' % size_short,
72 '-c', 'alloc %d %d' % (size_short, size_diff),
75 iotests.qemu_io_log('-c', 'alloc 0 %d' % size_short,
76 '-c', 'alloc %d %d' % (size_short, size_diff),
81 iotests.qemu_img_log('map', '--output=json', base)
82 iotests.qemu_img_log('map', '--output=human', base)
83 iotests.qemu_img_log('map', '--output=json', mid)
84 iotests.qemu_img_log('map', '--output=human', mid)
85 iotests.qemu_img_log('map', '--output=json', top)
86 iotests.qemu_img_log('map', '--output=human', top)
88 iotests.log('=== Testing qemu-img commit (top -> mid) ===')
92 iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, mid)
93 iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), mid)
95 iotests.log('=== Testing HMP commit (top -> mid) ===')
100 vm.qmp_log('human-monitor-command', command_line='commit drive0')
103 iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, mid)
104 iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), mid)
106 iotests.log('=== Testing QMP active commit (top -> mid) ===')
111 vm.qmp_log('block-commit', device='top', base_node='mid',
116 iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, mid)
117 iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), mid)
119 iotests.log('=== Testing qemu-img commit (top -> base) ===')
122 iotests.qemu_img_log('commit', '-b', base, top)
124 iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, base)
125 iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), base)
127 iotests.log('=== Testing QMP active commit (top -> base) ===')
132 vm.qmp_log('block-commit', device='top', base_node='base',
137 iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, base)
138 iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), base)
157 ('off', '384k', '253k', '512k', '253k'),
162 iotests.qemu_img_create('-f', iotests.imgfmt, base, base_size)
163 iotests.qemu_img_create('-f', iotests.imgfmt, '-b', base,
164 '-F', iotests.imgfmt, top, top_size_old)
165 iotests.qemu_io_log('-c', 'write -P 1 %s 64k' % off, base)
172 iotests.qemu_img_log('resize', '-f', iotests.imgfmt,
173 '--preallocation', prealloc, top, top_size_new)
174 iotests.qemu_io_log('-c', 'read -P 0 %s 64k' % off, top)
175 iotests.qemu_io_log('-c', 'map', top)
176 iotests.qemu_img_log('map', '--output=json', top)