#!/bin/bash
#
# Test 'info block' with all kinds of configurations
#
# 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"

here=`pwd`
status=1	# failure is the default!

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

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

_supported_fmt qcow2
_supported_proto file
_supported_os Linux

if [ "$QEMU_DEFAULT_MACHINE" != "pc" ]; then
    _notrun "Requires a PC machine"
fi

function do_run_qemu()
{
    echo Testing: "$@"

    (
        if ! test -t 0; then
            while read cmd; do
                echo $cmd
            done
        fi
        echo quit
    ) | $QEMU -S -display none -device virtio-scsi-pci -monitor stdio "$@" 2>&1
    echo
}

function check_info_block()
{
    echo "info block" |
    do_run_qemu "$@" | _filter_win32 | _filter_hmp | _filter_qemu |
        _filter_generated_node_ids
}


size=64M
_make_test_img $size

removable="floppy ide-cd scsi-cd"
fixed="ide-hd scsi-hd virtio-blk-pci"

echo
echo "=== Empty drives ==="
echo

for dev in $removable; do
    check_info_block -device $dev
    check_info_block -device $dev,id=qdev_id
done

echo
echo "=== -blockdev/-device=<node-name> ==="
echo

for dev in $fixed $removable; do
    check_info_block -blockdev driver=null-co,node-name=null -device $dev,drive=null
    check_info_block -blockdev driver=null-co,node-name=null -device $dev,drive=null,id=qdev_id
done

echo
echo "=== -drive if=none/-device=<node-name> ==="
echo

# This creates two BlockBackends that will show up in 'info block'!
# A monitor-owned one from -drive, and anonymous one from -device
for dev in $fixed $removable; do
    check_info_block -drive if=none,driver=null-co,node-name=null -device $dev,drive=null,id=qdev_id
done

echo
echo "=== -drive if=none/-device=<bb-name> (with medium) ==="
echo

for dev in $fixed $removable; do
    check_info_block -drive if=none,driver=null-co,node-name=null -device $dev,drive=none0
    check_info_block -drive if=none,driver=null-co,node-name=null -device $dev,drive=none0,id=qdev_id
done

echo
echo "=== -drive if=none/-device=<bb-name> (without medium) ==="
echo

check_info_block -drive if=none

for dev in $removable; do
    check_info_block -drive if=none -device $dev,drive=none0
    check_info_block -drive if=none -device $dev,drive=none0,id=qdev_id
done

echo
echo "=== -drive if=... ==="
echo

check_info_block -drive if=floppy
check_info_block -drive if=floppy,driver=null-co

check_info_block -drive if=ide,driver=null-co
check_info_block -drive if=ide,media=cdrom
check_info_block -drive if=ide,driver=null-co,media=cdrom

check_info_block -drive if=scsi,driver=null-co
check_info_block -drive if=scsi,media=cdrom
check_info_block -drive if=scsi,driver=null-co,media=cdrom

check_info_block -drive if=virtio,driver=null-co

check_info_block -drive if=pflash,driver=null-co,size=1M

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