#!/usr/bin/env bash
#
# Commit changes into backing chains and empty the top image if the
# backing image is not explicitly specified.
#
# Variant of 097, which includes snapshots and persistent bitmaps, to
# tickle the slow codepath in qcow2. See also 198, for another feature
# that tickles the slow codepath.
#
# Copyright (C) 2014, 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=mreitz@redhat.com

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

status=1	# failure is the default!

_cleanup()
{
    _cleanup_test_img
    _rm_test_img "$TEST_IMG.itmd"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

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

# This test is specific to qcow2
_supported_fmt qcow2
_supported_proto file
_supported_os Linux
# Persistent dirty bitmaps require compat=1.1
_unsupported_imgopts 'compat=0.10'

run_qemu()
{
    $QEMU -nographic -qmp stdio -serial none "$@" 2>&1 \
	| _filter_testdir | _filter_qmp | _filter_qemu \
        | sed 's/"sha256": ".\{64\}"/"sha256": HASH/'
}

for reason in snapshot bitmap; do

# Four passes:
#  0: Two-layer backing chain, commit to upper backing file (implicitly)
#     (in this case, the top image will be emptied)
#  1: Two-layer backing chain, commit to upper backing file (explicitly)
#     (in this case, the top image will implicitly stay unchanged)
#  2: Two-layer backing chain, commit to upper backing file (implicitly with -d)
#     (in this case, the top image will explicitly stay unchanged)
#  3: Two-layer backing chain, commit to lower backing file
#     (in this case, the top image will implicitly stay unchanged)
#
# 020 already tests committing, so this only tests whether image chains are
# working properly and that all images above the base are emptied; therefore,
# no complicated patterns are necessary.  Check near the 2G mark, as qcow2
# has been buggy at that boundary in the past.
for i in 0 1 2 3; do

echo
echo "=== Test pass $reason.$i ==="
echo

len=$((2100 * 1024 * 1024 + 512)) # larger than 2G, and not cluster aligned
TEST_IMG="$TEST_IMG.base" _make_test_img $len
TEST_IMG="$TEST_IMG.itmd" _make_test_img -b "$TEST_IMG.base" $len
_make_test_img -b "$TEST_IMG.itmd" $len
# Update the top image to use a feature that is incompatible with fast path
case $reason in
    snapshot) $QEMU_IMG snapshot -c snap "$TEST_IMG" ;;
    bitmap)
	run_qemu <<EOF
{ "execute": "qmp_capabilities" }
{ "execute": "blockdev-add",
  "arguments": { "driver": "qcow2", "node-name": "drive0",
     "file": { "driver": "file", "filename": "$TEST_IMG" } } }
{ "execute": "block-dirty-bitmap-add",
  "arguments": { "node": "drive0", "name": "bitmap0",
     "persistent": true } }
{ "execute": "quit" }
EOF
	;;
esac

$QEMU_IO -c "write -P 1 0x7ffd0000 192k" "$TEST_IMG.base" | _filter_qemu_io
$QEMU_IO -c "write -P 2 0x7ffe0000 128k" "$TEST_IMG.itmd" | _filter_qemu_io
$QEMU_IO -c "write -P 3 0x7fff0000 64k" "$TEST_IMG" | _filter_qemu_io
$QEMU_IO -c "write -P 4 $(($len - 512)) 512" "$TEST_IMG" | _filter_qemu_io

if [ $i -lt 3 ]; then
    if [ $i == 0 ]; then
        # -b "$TEST_IMG.itmd" should be the default (that is, committing to the
        # first backing file in the chain)
        $QEMU_IMG commit "$TEST_IMG"
    elif [ $i == 1 ]; then
        # explicitly specify the commit target (this should imply -d)
        $QEMU_IMG commit -b "$TEST_IMG.itmd" "$TEST_IMG"
    else
        # do not explicitly specify the commit target, but use -d to leave the
        # top image unchanged
        $QEMU_IMG commit -d "$TEST_IMG"
    fi

    # Bottom should be unchanged
    $QEMU_IO -c 'read -P 1 0x7ffd0000 192k' "$TEST_IMG.base" | _filter_qemu_io
    $QEMU_IO -c "read -P 0 $((len - 512)) 512" "$TEST_IMG.base" | _filter_qemu_io

    # Intermediate should contain changes from top
    $QEMU_IO -c 'read -P 1 0x7ffd0000 64k' "$TEST_IMG.itmd" | _filter_qemu_io
    $QEMU_IO -c 'read -P 2 0x7ffe0000 64k' "$TEST_IMG.itmd" | _filter_qemu_io
    $QEMU_IO -c 'read -P 3 0x7fff0000 64k' "$TEST_IMG.itmd" | _filter_qemu_io
    $QEMU_IO -c "read -P 4 $((len - 512)) 512" "$TEST_IMG.itmd" | _filter_qemu_io

    # And in pass 0, the top image should be empty, whereas in both other passes
    # it should be unchanged (which is both checked by qemu-img map)
else
    $QEMU_IMG commit -b "$TEST_IMG.base" "$TEST_IMG"

    # Bottom should contain all changes
    $QEMU_IO -c 'read -P 1 0x7ffd0000 64k' "$TEST_IMG.base" | _filter_qemu_io
    $QEMU_IO -c 'read -P 2 0x7ffe0000 64k' "$TEST_IMG.base" | _filter_qemu_io
    $QEMU_IO -c 'read -P 3 0x7fff0000 64k' "$TEST_IMG.base" | _filter_qemu_io
    $QEMU_IO -c "read -P 4 $((len - 512)) 512" "$TEST_IMG.base" | _filter_qemu_io

    # Both top and intermediate should be unchanged
fi

$QEMU_IMG map "$TEST_IMG.base" | _filter_qemu_img_map
$QEMU_IMG map "$TEST_IMG.itmd" | _filter_qemu_img_map
$QEMU_IMG map "$TEST_IMG" | _filter_qemu_img_map

# Check that the reason for slow path is still present, as appropriate
case $reason in
    snapshot)
	$QEMU_IMG snapshot -l "$TEST_IMG" |
	    sed 's/^\(.\{20\}\).*/\1/; s/ *$//' ;;
    bitmap)
	run_qemu <<EOF
{ "execute": "qmp_capabilities" }
{ "execute": "blockdev-add",
  "arguments": { "driver": "qcow2", "node-name": "drive0",
     "file": { "driver": "file", "filename": "$TEST_IMG" } } }
{ "execute": "x-debug-block-dirty-bitmap-sha256",
  "arguments": { "node": "drive0", "name": "bitmap0" } }
{ "execute": "quit" }
EOF
	;;
esac

done
done

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