#!/usr/bin/env bash
#
# Test vmdk backing file correlation
#
# Copyright (C) 2018 Red Hat, Inc.
#
# 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/>.
#

# creator
owner=mreitz@redhat.com

seq=$(basename $0)
echo "QA output created by $seq"

status=1	# failure is the default!

_cleanup()
{
    _cleanup_test_img
    rm -f "$TEST_IMG.not_base"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

# get standard environment, filters and checks
. ./common.rc
. ./common.filter
. ./common.qemu

# This tests vmdk-specific low-level functionality
_supported_fmt vmdk
_supported_proto file
_supported_os Linux
_unsupported_imgopts "subformat=monolithicFlat" \
                     "subformat=twoGbMaxExtentFlat" \
                     "subformat=twoGbMaxExtentSparse"

TEST_IMG="$TEST_IMG.base" _make_test_img 1M
TEST_IMG="$TEST_IMG.not_base" _make_test_img 1M
_make_test_img -b "$TEST_IMG.base"

make_opts()
{
    node_name=$1
    filename=$2
    backing=$3

    if [ -z "$backing" ]; then
        backing="null"
    else
        backing="'$backing'"
    fi

    echo "{ 'node-name': '$node_name',
            'driver': 'vmdk',
            'file': {
                'driver': 'file',
                'filename': '$filename'
            },
            'backing': $backing }"
}

overlay_opts=$(make_opts overlay "$TEST_IMG" backing)
base_opts=$(make_opts backing "$TEST_IMG.base")
not_base_opts=$(make_opts backing "$TEST_IMG.not_base")

not_vmdk_opts="{ 'node-name': 'backing', 'driver': 'null-co' }"

echo
echo '=== Testing fitting VMDK backing image ==='
echo

qemu_comm_method=monitor \
    _launch_qemu -blockdev "$base_opts" -blockdev "$overlay_opts"

# Should not return an error
_send_qemu_cmd $QEMU_HANDLE 'qemu-io overlay "read 0 512"' 'ops'

_cleanup_qemu


echo
echo '=== Testing unrelated VMDK backing image ==='
echo

qemu_comm_method=monitor \
    _launch_qemu -blockdev "$not_base_opts" -blockdev "$overlay_opts"

# Should fail (gracefully)
_send_qemu_cmd $QEMU_HANDLE 'qemu-io overlay "read 0 512"' 'failed'

_cleanup_qemu


echo
echo '=== Testing non-VMDK backing image ==='
echo

# FIXME: This is the reason why we have to use two -blockdev
# invocations.  You can only fully override the backing file options
# if you either specify a node reference (as done here) or the new
# options contain file.filename (which in this case they do not).
# In other cases, file.filename will be set to whatever the image
# header of the overlay contains (which we do not want).  I consider
# this a FIXME because with -blockdev, you cannot specify "partial"
# options, so setting file.filename but leaving the rest as specified
# by the user does not make sense.
qemu_comm_method=monitor \
    _launch_qemu -blockdev "$not_vmdk_opts" -blockdev "$overlay_opts"

# Should fail (gracefully)
_send_qemu_cmd $QEMU_HANDLE 'qemu-io overlay "read 0 512"' 'failed'

_cleanup_qemu


# success, all done
echo "*** done"
rm -f $seq.full
status=0
