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