xref: /qemu/tests/qemu-iotests/104 (revision aef58bdc1e7d8f37cdf838b49f160c520399c84f)
1c2eb918eSHu Tao#!/bin/bash
2c2eb918eSHu Tao#
3c2eb918eSHu Tao# Test image creation with aligned and unaligned sizes
4c2eb918eSHu Tao#
5c2eb918eSHu Tao# Copyright (C) 2014 Fujitsu.
6c2eb918eSHu Tao#
7c2eb918eSHu Tao# This program is free software; you can redistribute it and/or modify
8c2eb918eSHu Tao# it under the terms of the GNU General Public License as published by
9c2eb918eSHu Tao# the Free Software Foundation; either version 2 of the License, or
10c2eb918eSHu Tao# (at your option) any later version.
11c2eb918eSHu Tao#
12c2eb918eSHu Tao# This program is distributed in the hope that it will be useful,
13c2eb918eSHu Tao# but WITHOUT ANY WARRANTY; without even the implied warranty of
14c2eb918eSHu Tao# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15c2eb918eSHu Tao# GNU General Public License for more details.
16c2eb918eSHu Tao#
17c2eb918eSHu Tao# You should have received a copy of the GNU General Public License
18c2eb918eSHu Tao# along with this program.  If not, see <http://www.gnu.org/licenses/>.
19c2eb918eSHu Tao#
20c2eb918eSHu Tao
21c2eb918eSHu Tao# creator
22c2eb918eSHu Taoowner=hutao@cn.fujitsu.com
23c2eb918eSHu Tao
24c2eb918eSHu Taoseq=`basename $0`
25c2eb918eSHu Taoecho "QA output created by $seq"
26c2eb918eSHu Tao
27c2eb918eSHu Taohere=`pwd`
28c2eb918eSHu Taotmp=/tmp/$$
29c2eb918eSHu Taostatus=1	# failure is the default!
30c2eb918eSHu Tao
31a231cb27SMax Reitztrap "exit \$status" 0 1 2 3 15
32c2eb918eSHu Tao
33c2eb918eSHu Tao# get standard environment, filters and checks
34c2eb918eSHu Tao. ./common.rc
35c2eb918eSHu Tao. ./common.filter
36c2eb918eSHu Tao
37*aef58bdcSMax Reitz_supported_fmt raw qcow qcow2 qed vdi vmdk vhdx
38c2eb918eSHu Tao_supported_proto generic
39c2eb918eSHu Tao_supported_os Linux
40c2eb918eSHu Tao
41c2eb918eSHu Taoecho "=== Check qemu-img info output ==="
42c2eb918eSHu Taoecho
43c2eb918eSHu Taoimage_sizes="1024 1234"
44c2eb918eSHu Tao
45c2eb918eSHu Taofor s in $image_sizes; do
46a231cb27SMax Reitz    _make_test_img $s
47c2eb918eSHu Tao    _img_info | _filter_img_info
48a231cb27SMax Reitz    _cleanup_test_img
49c2eb918eSHu Taodone
50c2eb918eSHu Tao
51c2eb918eSHu Tao# success, all done
52c2eb918eSHu Taoecho "*** done"
53c2eb918eSHu Taorm -f $seq.full
54c2eb918eSHu Taostatus=0
55