#!/usr/bin/env bash
#
# Test old-style block migration (migrate -b)
#
# Copyright (C) 2017 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=kwolf@redhat.com

seq=`basename $0`
echo "QA output created by $seq"

status=1 # failure is the default!

MIG_SOCKET="${SOCK_DIR}/migrate"

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

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

_supported_os Linux FreeBSD NetBSD
_supported_fmt qcow2 raw qed quorum
_supported_proto file fuse

size=64M
_make_test_img $size
TEST_IMG="${TEST_IMG}.dest" _make_test_img $size

echo
echo === Starting VMs ===
echo

qemu_comm_method="qmp"

_launch_qemu \
    -drive file="${TEST_IMG}",cache=$CACHEMODE,aio=$AIOMODE,driver=$IMGFMT,id=disk
src=$QEMU_HANDLE
_send_qemu_cmd $src "{ 'execute': 'qmp_capabilities' }" 'return'

_launch_qemu \
    -drive file="${TEST_IMG}.dest",cache=$CACHEMODE,aio=$AIOMODE,driver=$IMGFMT,id=disk \
    -incoming "unix:${MIG_SOCKET}"
dest=$QEMU_HANDLE
_send_qemu_cmd $dest "{ 'execute': 'qmp_capabilities' }" 'return'

echo
echo === Write something on the source ===
echo

_send_qemu_cmd $src \
    "{ 'execute': 'human-monitor-command',
       'arguments': { 'command-line':
                      'qemu-io disk \"write -P 0x55 0 64k\"' } }" \
    'return'
_send_qemu_cmd $src \
    "{ 'execute': 'human-monitor-command',
       'arguments': { 'command-line':
                      'qemu-io disk \"read -P 0x55 0 64k\"' } }" \
    'return'

echo
echo === Do block migration to destination ===
echo

reply="$(_send_qemu_cmd $src \
    "{ 'execute': 'migrate',
       'arguments': { 'uri': 'unix:${MIG_SOCKET}', 'blk': true } }" \
    'return\|error')"
echo "$reply"
if echo "$reply" | grep "compiled without old-style" > /dev/null; then
    _notrun "migrate -b support not compiled in"
fi

timeout_comm=$QEMU_COMM_TIMEOUT
if [ "${VALGRIND_QEMU}" == "y" ]; then
    QEMU_COMM_TIMEOUT=4
else
    QEMU_COMM_TIMEOUT=0.1
fi
qemu_cmd_repeat=50 silent=yes \
    _send_qemu_cmd $src "{ 'execute': 'query-migrate' }" '"status": "completed"'
QEMU_COMM_TIMEOUT=$timeout_comm
_send_qemu_cmd $src "{ 'execute': 'query-status' }" "return"

echo
echo === Do some I/O on the destination ===
echo

# It is important that we use the BlockBackend of the guest device here instead
# of the node name, which would create a new BlockBackend and not test whether
# the guest has the necessary permissions to access the image now
silent=yes _send_qemu_cmd $dest "" "100 %"
_send_qemu_cmd $dest "{ 'execute': 'query-status' }" "return"
_send_qemu_cmd $dest \
    "{ 'execute': 'human-monitor-command',
       'arguments': { 'command-line':
                      'qemu-io disk \"read -P 0x55 0 64k\"' } }" \
    'return'
_send_qemu_cmd $dest \
    "{ 'execute': 'human-monitor-command',
       'arguments': { 'command-line':
                      'qemu-io disk \"write -P 0x66 1M 64k\"' } }" \
    'return'

echo
echo === Shut down and check image ===
echo

_send_qemu_cmd $src '{"execute":"quit"}' 'return'
_send_qemu_cmd $dest '{"execute":"quit"}' 'return'
wait=1 _cleanup_qemu

_check_test_img
TEST_IMG="${TEST_IMG}.dest" _check_test_img

$QEMU_IO -c 'write -P 0x66 1M 64k' "$TEST_IMG" | _filter_qemu_io
$QEMU_IMG compare "$TEST_IMG.dest" "$TEST_IMG"

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