···11+#!/bin/bash
22+#
33+# Test short file I/O
44+#
55+# Copyright (C) 2014 Red Hat, Inc.
66+#
77+# This program is free software; you can redistribute it and/or modify
88+# it under the terms of the GNU General Public License as published by
99+# the Free Software Foundation; either version 2 of the License, or
1010+# (at your option) any later version.
1111+#
1212+# This program is distributed in the hope that it will be useful,
1313+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1414+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515+# GNU General Public License for more details.
1616+#
1717+# You should have received a copy of the GNU General Public License
1818+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1919+#
2020+2121+# creator
2222+owner=stefanha@redhat.com
2323+2424+seq=`basename $0`
2525+echo "QA output created by $seq"
2626+2727+here=`pwd`
2828+tmp=/tmp/$$
2929+status=1 # failure is the default!
3030+3131+_cleanup()
3232+{
3333+ _cleanup_test_img
3434+}
3535+trap "_cleanup; exit \$status" 0 1 2 3 15
3636+3737+# get standard environment, filters and checks
3838+. ./common.rc
3939+. ./common.filter
4040+4141+_supported_fmt raw
4242+_supported_proto file
4343+_supported_os Linux
4444+4545+4646+echo
4747+echo "== creating short image file =="
4848+dd if=/dev/zero of="$TEST_IMG" bs=1 count=320
4949+5050+echo
5151+echo "== reading bytes beyond EOF gives zeroes =="
5252+$QEMU_IO -c "read -P 0 0 512" "$TEST_IMG" | _filter_qemu_io
5353+5454+5555+# success, all done
5656+echo "*** done"
5757+rm -f $seq.full
5858+status=0
+10
tests/qemu-iotests/101.out
···11+QA output created by 101
22+33+== creating short image file ==
44+320+0 records in
55+320+0 records out
66+77+== reading bytes beyond EOF gives zeroes ==
88+read 512/512 bytes at offset 0
99+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
1010+*** done
+1
tests/qemu-iotests/group
···101101092 rw auto quick
102102095 rw auto quick
103103099 rw auto quick
104104+101 rw auto quick
104105103 rw auto quick