#!/bin/bash
#
# Test 'offset' and 'size' options of the raw driver. Make sure we can't
# (or can) read and write outside of the image size.
#
# Copyright (C) 2016 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=tgolembi@redhat.com

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

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 raw
_supported_proto file
_supported_os Linux


# Create JSON with options
img_json() {
    printf %s 'json:{"driver":"raw", '
    printf %s "\"offset\":\"$img_offset\", "
    if [ "$img_size" -ne -1 ] ; then
        printf %s "\"size\":\"$img_size\", "
    fi
    printf %s '"file": {'
    printf %s   '"driver":"file", '
    printf %s   "\"filename\":\"$TEST_IMG\" "
    printf %s "} }"
}

do_general_test() {
    if [ "$img_size" -ge 0 ] ; then
        test_size=$img_size
    else
        test_size=$((size-img_offset))
    fi

    echo
    echo "write to image"
    $QEMU_IO -c "write -P 0x0a 0 $test_size" "$(img_json)" | _filter_qemu_io

    echo
    echo "read the image"
    $QEMU_IO -c "read -P 0x0a 0 $test_size" "$(img_json)" | _filter_qemu_io

    echo
    echo "check that offset is respected"
    $QEMU_IO -c "read -v $((img_offset-2)) 4" $TEST_IMG | _filter_qemu_io

    echo
    echo "write before image boundary"
    $QEMU_IO -c "write $((test_size-1)) 1" "$(img_json)" | _filter_qemu_io

    echo
    echo "write across image boundary"
    $QEMU_IO -c "write $((test_size-1)) 2" "$(img_json)" | _filter_qemu_io

    echo
    echo "write at image boundary"
    $QEMU_IO -c "write $test_size 1" "$(img_json)" | _filter_qemu_io

    echo
    echo "write after image boundary"
    $QEMU_IO -c "write $((test_size+512)) 1" "$(img_json)" | _filter_qemu_io

    echo
    echo "writev before/after image boundary"
    $QEMU_IO -c "writev $((test_size-512)) 512 512" "$(img_json)" | _filter_qemu_io

    echo
    echo "read before image boundary"
    $QEMU_IO -c "read $((test_size-1)) 1" "$(img_json)" | _filter_qemu_io

    echo
    echo "read across image boundary"
    $QEMU_IO -c "read $((test_size-1)) 2" "$(img_json)" | _filter_qemu_io

    echo
    echo "read at image boundary"
    $QEMU_IO -c "read $test_size 1" "$(img_json)" | _filter_qemu_io

    echo
    echo "read after image boundary"
    $QEMU_IO -c "read $((test_size+512)) 1" "$(img_json)" | _filter_qemu_io

    echo
    echo "readv before/after image boundary"
    $QEMU_IO -c "readv $((test_size-512)) 512 512" "$(img_json)" | _filter_qemu_io

    echo
    echo "fill image with pattern"
    $QEMU_IO -c "write -P 0x0a 0 $size" $TEST_IMG | _filter_qemu_io

    echo
    echo "write zeroes and check"
    $QEMU_IO -c "write -z 0 512" "$(img_json)" | _filter_qemu_io
    $QEMU_IO -c "read -v $((img_offset-2)) 4" $TEST_IMG | _filter_qemu_io

    echo
    echo "write zeroes across image boundary"
    $QEMU_IO -c "write -z $((test_size-1)) 2" "$(img_json)" | _filter_qemu_io

    echo
    echo "write zeroes at image boundary and check"
    $QEMU_IO -c "write -z $((test_size-2)) 2" "$(img_json)" | _filter_qemu_io
    $QEMU_IO -c "read -v $((img_offset+test_size-2)) 2" $TEST_IMG | _filter_qemu_io
    $QEMU_IO -c "read -v $((img_offset+test_size)) 2" $TEST_IMG | _filter_qemu_io

    echo
    echo "fill image with pattern"
    $QEMU_IO -c "write -P 0x0a 0 $size" $TEST_IMG | _filter_qemu_io

    echo
    echo "discard and check"
    $QEMU_IO -c "discard 0 512" "$(img_json)" | _filter_qemu_io
    $QEMU_IO -c "read -v $((img_offset-2)) 4" $TEST_IMG | _filter_qemu_io

    echo
    echo "discard across image boundary"
    $QEMU_IO -c "discard $((test_size-1)) 2" "$(img_json)" | _filter_qemu_io

    echo
    echo "discard at image boundary and check"
    $QEMU_IO -c "discard $((test_size-2)) 2" "$(img_json)" | _filter_qemu_io
    $QEMU_IO -c "read -v $((img_offset+test_size-2)) 2" $TEST_IMG | _filter_qemu_io
    $QEMU_IO -c "read -v $((img_offset+test_size)) 2" $TEST_IMG | _filter_qemu_io
}

echo
echo "== test 'offset' option =="
size=4096
img_offset=512
img_size=-1
_make_test_img $size
do_general_test
_cleanup_test_img

echo
echo "== test 'offset' and 'size' options =="
size=4096
img_offset=512
img_size=2048
_make_test_img $size
do_general_test
_cleanup_test_img

echo
echo "== test misaligned 'offset' =="
size=4096
img_offset=10
img_size=2048
_make_test_img $size
do_general_test
_cleanup_test_img

echo
echo "== test reopen =="
size=4096
img_offset=512
img_size=512
_make_test_img $size
(
$QEMU_IO "$(img_json)"  <<EOT
write -P 0x0a 0 512
write -P 0x0a 511 1
write -P 0x0a 512 1
reopen -o driver=raw,offset=1536,size=1024
write -P 0x0a 0 1024
write -P 0x0a 1023 1
write -P 0x0a 1024 1
EOT
) | _filter_qemu_io
echo "checking boundaries"
$QEMU_IO -c "read -v 510 4" $TEST_IMG | _filter_qemu_io
$QEMU_IO -c "read -v 1022 4" $TEST_IMG | _filter_qemu_io
$QEMU_IO -c "read -v 1534 4" $TEST_IMG | _filter_qemu_io
$QEMU_IO -c "read -v 2558 4" $TEST_IMG | _filter_qemu_io
_cleanup_test_img

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