xref: /qemu/tests/qemu-iotests/078 (revision 24f3078a049c52070adfc659fc3a1a71a11a7765)
1*24f3078aSKevin Wolf#!/bin/bash
2*24f3078aSKevin Wolf#
3*24f3078aSKevin Wolf# bochs format input validation tests
4*24f3078aSKevin Wolf#
5*24f3078aSKevin Wolf# Copyright (C) 2013 Red Hat, Inc.
6*24f3078aSKevin Wolf#
7*24f3078aSKevin Wolf# This program is free software; you can redistribute it and/or modify
8*24f3078aSKevin Wolf# it under the terms of the GNU General Public License as published by
9*24f3078aSKevin Wolf# the Free Software Foundation; either version 2 of the License, or
10*24f3078aSKevin Wolf# (at your option) any later version.
11*24f3078aSKevin Wolf#
12*24f3078aSKevin Wolf# This program is distributed in the hope that it will be useful,
13*24f3078aSKevin Wolf# but WITHOUT ANY WARRANTY; without even the implied warranty of
14*24f3078aSKevin Wolf# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*24f3078aSKevin Wolf# GNU General Public License for more details.
16*24f3078aSKevin Wolf#
17*24f3078aSKevin Wolf# You should have received a copy of the GNU General Public License
18*24f3078aSKevin Wolf# along with this program.  If not, see <http://www.gnu.org/licenses/>.
19*24f3078aSKevin Wolf#
20*24f3078aSKevin Wolf
21*24f3078aSKevin Wolf# creator
22*24f3078aSKevin Wolfowner=kwolf@redhat.com
23*24f3078aSKevin Wolf
24*24f3078aSKevin Wolfseq=`basename $0`
25*24f3078aSKevin Wolfecho "QA output created by $seq"
26*24f3078aSKevin Wolf
27*24f3078aSKevin Wolfhere=`pwd`
28*24f3078aSKevin Wolftmp=/tmp/$$
29*24f3078aSKevin Wolfstatus=1	# failure is the default!
30*24f3078aSKevin Wolf
31*24f3078aSKevin Wolf_cleanup()
32*24f3078aSKevin Wolf{
33*24f3078aSKevin Wolf	_cleanup_test_img
34*24f3078aSKevin Wolf}
35*24f3078aSKevin Wolftrap "_cleanup; exit \$status" 0 1 2 3 15
36*24f3078aSKevin Wolf
37*24f3078aSKevin Wolf# get standard environment, filters and checks
38*24f3078aSKevin Wolf. ./common.rc
39*24f3078aSKevin Wolf. ./common.filter
40*24f3078aSKevin Wolf
41*24f3078aSKevin Wolf_supported_fmt bochs
42*24f3078aSKevin Wolf_supported_proto generic
43*24f3078aSKevin Wolf_supported_os Linux
44*24f3078aSKevin Wolf
45*24f3078aSKevin Wolfecho
46*24f3078aSKevin Wolfecho "== Read from a valid image =="
47*24f3078aSKevin Wolf_use_sample_img empty.bochs.bz2
48*24f3078aSKevin Wolf{ $QEMU_IO -c "read 0 512" $TEST_IMG; } 2>&1 | _filter_qemu_io | _filter_testdir
49*24f3078aSKevin Wolf
50*24f3078aSKevin Wolf# success, all done
51*24f3078aSKevin Wolfecho "*** done"
52*24f3078aSKevin Wolfrm -f $seq.full
53*24f3078aSKevin Wolfstatus=0
54