#!/usr/bin/env python
#
# Test qcow2 and file image creation
#
# Copyright (C) 2018 Red Hat, Inc.
#
# Creator/Owner: Kevin Wolf <kwolf@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

import iotests
from iotests import imgfmt

iotests.verify_image_format(supported_fmts=['qcow2'])

def blockdev_create(vm, options):
    result = vm.qmp_log('blockdev-create',
                        filters=[iotests.filter_qmp_testfiles],
                        job_id='job0', options=options)

    if 'return' in result:
        assert result['return'] == {}
        vm.run_job('job0')
    iotests.log("")

with iotests.FilePath('t.qcow2') as disk_path, \
     iotests.FilePath('t.qcow2.base') as backing_path, \
     iotests.VM() as vm:

    vm.add_object('secret,id=keysec0,data=foo')

    #
    # Successful image creation (defaults)
    #
    iotests.log("=== Successful image creation (defaults) ===")
    iotests.log("")

    size = 128 * 1024 * 1024

    vm.launch()
    blockdev_create(vm, { 'driver': 'file',
                          'filename': disk_path,
                          'size': 0 })

    vm.qmp_log('blockdev-add',
               filters=[iotests.filter_qmp_testfiles],
               driver='file', filename=disk_path,
               node_name='imgfile')

    blockdev_create(vm, { 'driver': imgfmt,
                          'file': 'imgfile',
                          'size': size })
    vm.shutdown()

    iotests.img_info_log(disk_path)

    #
    # Successful image creation (inline blockdev-add, explicit defaults)
    #
    iotests.log("=== Successful image creation (inline blockdev-add, explicit defaults) ===")
    iotests.log("")

    # Choose a different size to show that we got a new image
    size = 64 * 1024 * 1024

    vm.launch()
    blockdev_create(vm, { 'driver': 'file',
                          'filename': disk_path,
                          'size': 0,
                          'preallocation': 'off',
                          'nocow': False })

    blockdev_create(vm, { 'driver': imgfmt,
                          'file': {
                              'driver': 'file',
                              'filename': disk_path,
                          },
                          'size': size,
                          'version': 'v3',
                          'cluster-size': 65536,
                          'preallocation': 'off',
                          'lazy-refcounts': False,
                          'refcount-bits': 16 })
    vm.shutdown()

    iotests.img_info_log(disk_path)

    #
    # Successful image creation (v3 non-default options)
    #
    iotests.log("=== Successful image creation (v3 non-default options) ===")
    iotests.log("")

    # Choose a different size to show that we got a new image
    size = 32 * 1024 * 1024

    vm.launch()
    blockdev_create(vm, { 'driver': 'file',
                          'filename': disk_path,
                          'size': 0,
                          'preallocation': 'falloc',
                          'nocow': True })

    blockdev_create(vm, { 'driver': imgfmt,
                          'file': {
                              'driver': 'file',
                              'filename': disk_path,
                          },
                          'size': size,
                          'version': 'v3',
                          'cluster-size': 2097152,
                          'preallocation': 'metadata',
                          'lazy-refcounts': True,
                          'refcount-bits': 1 })
    vm.shutdown()

    iotests.img_info_log(disk_path)

    #
    # Successful image creation (v2 non-default options)
    #
    iotests.log("=== Successful image creation (v2 non-default options) ===")
    iotests.log("")

    vm.launch()
    blockdev_create(vm, { 'driver': 'file',
                          'filename': disk_path,
                          'size': 0 })

    blockdev_create(vm, { 'driver': imgfmt,
                          'file': {
                              'driver': 'file',
                              'filename': disk_path,
                          },
                          'size': size,
                          'backing-file': backing_path,
                          'backing-fmt': 'qcow2',
                          'version': 'v2',
                          'cluster-size': 512 })
    vm.shutdown()

    iotests.img_info_log(disk_path)

    #
    # Successful image creation (encrypted)
    #
    iotests.log("=== Successful image creation (encrypted) ===")
    iotests.log("")

    vm.launch()
    blockdev_create(vm, { 'driver': imgfmt,
                          'file': {
                              'driver': 'file',
                              'filename': disk_path,
                          },
                          'size': size,
                          'encrypt': {
                              'format': 'luks',
                              'key-secret': 'keysec0',
                              'cipher-alg': 'twofish-128',
                              'cipher-mode': 'ctr',
                              'ivgen-alg': 'plain64',
                              'ivgen-hash-alg': 'md5',
                              'hash-alg': 'sha1',
                              'iter-time': 10,
                          }})
    vm.shutdown()

    iotests.img_info_log(disk_path)

    #
    # Invalid BlockdevRef
    #
    iotests.log("=== Invalid BlockdevRef ===")
    iotests.log("")

    vm.launch()
    blockdev_create(vm, { 'driver': imgfmt,
                          'file': "this doesn't exist",
                          'size': size })
    vm.shutdown()

    #
    # Invalid sizes
    #
    iotests.log("=== Invalid sizes ===")

    # TODO Negative image sizes aren't handled correctly, but this is a problem
    # with QAPI's implementation of the 'size' type and affects other commands
    # as well. Once this is fixed, we may want to add a test case here.
    #
    # 1. Misaligned image size
    # 2. 2^64 - 512
    # 3. 2^63 = 8 EB (qemu-img enforces image sizes less than this)
    # 4. 2^63 - 512 (generally valid, but qcow2 can't handle images this size)

    vm.add_blockdev('driver=file,filename=%s,node-name=node0' % (disk_path))

    vm.launch()
    for size in [ 1234, 18446744073709551104, 9223372036854775808,
                  9223372036854775296 ]:
        blockdev_create(vm, { 'driver': imgfmt,
                              'file': 'node0',
                              'size': size })
    vm.shutdown()

    #
    # Invalid version
    #
    iotests.log("=== Invalid version ===")

    vm.launch()
    blockdev_create(vm, { 'driver': imgfmt,
                          'file': 'node0',
                          'size': 67108864,
                          'version': 'v1' })
    blockdev_create(vm, { 'driver': imgfmt,
                          'file': 'node0',
                          'size': 67108864,
                          'version': 'v2',
                          'lazy-refcounts': True })
    blockdev_create(vm, { 'driver': imgfmt,
                          'file': 'node0',
                          'size': 67108864,
                          'version': 'v2',
                          'refcount-bits': 8 })
    vm.shutdown()

    #
    # Invalid backing file options
    #
    iotests.log("=== Invalid backing file options ===")

    vm.launch()
    blockdev_create(vm, { 'driver': imgfmt,
                          'file': 'node0',
                          'size': 67108864,
                          'backing-file': '/dev/null',
                          'preallocation': 'full' })
    blockdev_create(vm, { 'driver': imgfmt,
                          'file': 'node0',
                          'size': 67108864,
                          'backing-fmt': imgfmt })
    vm.shutdown()

    #
    # Invalid cluster size
    #
    iotests.log("=== Invalid cluster size ===")

    vm.launch()
    for csize in [ 1234, 128, 4194304, 0 ]:
        blockdev_create(vm, { 'driver': imgfmt,
                              'file': 'node0',
                              'size': 67108864,
                              'cluster-size': csize })
    blockdev_create(vm, { 'driver': imgfmt,
                          'file': 'node0',
                          'size': 281474976710656,
                          'cluster-size': 512 })
    vm.shutdown()

    #
    # Invalid refcount width
    #
    iotests.log("=== Invalid refcount width ===")

    vm.launch()
    for refcount_bits in [ 128, 0, 7 ]:
        blockdev_create(vm, { 'driver': imgfmt,
                              'file': 'node0',
                              'size': 67108864,
                              'refcount-bits': refcount_bits })
    vm.shutdown()
