target-arm: A64: fix unallocated test of scalar SQXTUN
[qemu/ar7.git] / tests / qemu-iotests / 087
bloba38bb702b332a6e5c3a8af14944e8ce456d24a8f
1 #!/bin/bash
3 # Test unsupported blockdev-add cases
5 # Copyright (C) 2014 Red Hat, Inc.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21 # creator
22 owner=kwolf@redhat.com
24 seq=`basename $0`
25 echo "QA output created by $seq"
27 here=`pwd`
28 tmp=/tmp/$$
29 status=1 # failure is the default!
31 # get standard environment, filters and checks
32 . ./common.rc
33 . ./common.filter
35 _supported_fmt qcow2
36 _supported_proto file
37 _supported_os Linux
39 function do_run_qemu()
41 echo Testing: "$@"
42 $QEMU -nographic -qmp stdio -serial none "$@"
43 echo
46 function run_qemu()
48 do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp | sed -e 's/\("actual-size":\s*\)[0-9]\+/\1SIZE/g'
51 size=128M
53 _make_test_img $size
55 echo
56 echo === Missing ID ===
57 echo
59 run_qemu <<EOF
60 { "execute": "qmp_capabilities" }
61 { "execute": "blockdev-add",
62 "arguments": {
63 "options": {
64 "driver": "$IMGFMT",
65 "file": {
66 "driver": "file",
67 "filename": "$TEST_IMG"
72 { "execute": "quit" }
73 EOF
75 echo
76 echo === aio=native without O_DIRECT ===
77 echo
79 run_qemu <<EOF
80 { "execute": "qmp_capabilities" }
81 { "execute": "blockdev-add",
82 "arguments": {
83 "options": {
84 "driver": "$IMGFMT",
85 "id": "disk",
86 "aio": "native",
87 "file": {
88 "driver": "file",
89 "filename": "$TEST_IMG"
94 { "execute": "quit" }
95 EOF
97 echo
98 echo === Encrypted image ===
99 echo
101 _make_test_img -o encryption=on $size
102 run_qemu -S <<EOF
103 { "execute": "qmp_capabilities" }
104 { "execute": "blockdev-add",
105 "arguments": {
106 "options": {
107 "driver": "$IMGFMT",
108 "id": "disk",
109 "file": {
110 "driver": "file",
111 "filename": "$TEST_IMG"
116 { "execute": "quit" }
119 run_qemu <<EOF
120 { "execute": "qmp_capabilities" }
121 { "execute": "blockdev-add",
122 "arguments": {
123 "options": {
124 "driver": "$IMGFMT",
125 "id": "disk",
126 "file": {
127 "driver": "file",
128 "filename": "$TEST_IMG"
133 { "execute": "quit" }
136 # success, all done
137 echo "*** done"
138 rm -f $seq.full
139 status=0