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