xref: /openbmc/qemu/tests/qemu-iotests/054 (revision fef80ea073c4862bc9eaddb6ddb0ed970b8ad7c4)
111a82d14SPhilippe Mathieu-Daudé#!/usr/bin/env bash
2*9dd003a9SVladimir Sementsov-Ogievskiy# group: rw auto quick
3bd91ecbfSKevin Wolf#
4bd91ecbfSKevin Wolf# Test huge qcow2 images
5bd91ecbfSKevin Wolf#
6bd91ecbfSKevin Wolf# Copyright (C) 2013 Red Hat, Inc.
7bd91ecbfSKevin Wolf#
8bd91ecbfSKevin Wolf# This program is free software; you can redistribute it and/or modify
9bd91ecbfSKevin Wolf# it under the terms of the GNU General Public License as published by
10bd91ecbfSKevin Wolf# the Free Software Foundation; either version 2 of the License, or
11bd91ecbfSKevin Wolf# (at your option) any later version.
12bd91ecbfSKevin Wolf#
13bd91ecbfSKevin Wolf# This program is distributed in the hope that it will be useful,
14bd91ecbfSKevin Wolf# but WITHOUT ANY WARRANTY; without even the implied warranty of
15bd91ecbfSKevin Wolf# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16bd91ecbfSKevin Wolf# GNU General Public License for more details.
17bd91ecbfSKevin Wolf#
18bd91ecbfSKevin Wolf# You should have received a copy of the GNU General Public License
19bd91ecbfSKevin Wolf# along with this program.  If not, see <http://www.gnu.org/licenses/>.
20bd91ecbfSKevin Wolf#
21bd91ecbfSKevin Wolf
22bd91ecbfSKevin Wolf# creator
23bd91ecbfSKevin Wolfowner=kwolf@redhat.com
24bd91ecbfSKevin Wolf
25bd91ecbfSKevin Wolfseq=`basename $0`
26bd91ecbfSKevin Wolfecho "QA output created by $seq"
27bd91ecbfSKevin Wolf
28bd91ecbfSKevin Wolfstatus=1	# failure is the default!
29bd91ecbfSKevin Wolf
30bd91ecbfSKevin Wolf_cleanup()
31bd91ecbfSKevin Wolf{
32bd91ecbfSKevin Wolf	_cleanup_test_img
33bd91ecbfSKevin Wolf}
34bd91ecbfSKevin Wolftrap "_cleanup; exit \$status" 0 1 2 3 15
35bd91ecbfSKevin Wolf
36bd91ecbfSKevin Wolf# get standard environment, filters and checks
37bd91ecbfSKevin Wolf. ./common.rc
38bd91ecbfSKevin Wolf. ./common.filter
39bd91ecbfSKevin Wolf
40bd91ecbfSKevin Wolf_supported_fmt qcow2
4157284d2aSMax Reitz_supported_proto file fuse
42bd91ecbfSKevin Wolf
43bd91ecbfSKevin Wolfecho
44bd91ecbfSKevin Wolfecho "creating too large image (1 EB)"
45bd91ecbfSKevin Wolf_make_test_img $((1024*1024))T
46bd91ecbfSKevin Wolf
47bd91ecbfSKevin Wolfecho
48bd91ecbfSKevin Wolfecho "creating too large image (1 EB) using qcow2.py"
49bd91ecbfSKevin Wolf_make_test_img 4G
50ea81ca9dSMax Reitz$PYTHON qcow2.py "$TEST_IMG" set-header size $((1024 ** 6))
51bd91ecbfSKevin Wolf_check_test_img
52bd91ecbfSKevin Wolf
53bd91ecbfSKevin Wolf# success, all done
54bd91ecbfSKevin Wolfecho "*** done"
55bd91ecbfSKevin Wolfrm -f $seq.full
56bd91ecbfSKevin Wolfstatus=0
57