hw/misc/mps2-scc: Support configurable number of OSCCLK values
[qemu/ar7.git] / tests / qemu-iotests / 209
blobff7efea11bc69d64ed3ba41c586db435f2370e63
1 #!/usr/bin/env python3
2 # group: rw quick
4 # Tests for NBD BLOCK_STATUS extension
6 # Copyright (c) 2018 Virtuozzo International GmbH
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 import iotests
23 from iotests import qemu_img_create, qemu_io, qemu_img_verbose, qemu_nbd, \
24                     file_path
26 iotests.script_initialize(supported_fmts=['qcow2'])
28 disk = file_path('disk')
29 nbd_sock = file_path('nbd-sock', base_dir=iotests.sock_dir)
30 nbd_uri = 'nbd+unix:///exp?socket=' + nbd_sock
32 qemu_img_create('-f', iotests.imgfmt, disk, '1M')
33 qemu_io('-f', iotests.imgfmt, '-c', 'write 0 512K', disk)
35 qemu_nbd('-k', nbd_sock, '-x', 'exp', '-f', iotests.imgfmt, disk)
36 qemu_img_verbose('map', '-f', 'raw', '--output=json', nbd_uri)