#!/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="${TEST_DIR}/migrate"

_cleanup()
{
    rm -f "${MIG_SOCKET}"
    rm -f "${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_fmt qcow2 raw qed quorum
_supported_proto file

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,driver=$IMGFMT,id=disk
src=$QEMU_HANDLE
_send_qemu_cmd $src "{ 'execute': 'qmp_capabilities' }" 'return'

_launch_qemu \
    -drive file="${TEST_IMG}.dest",cache=$CACHEMODE,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
