aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/054
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-05-13 14:11:13 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2013-05-24 16:17:55 +0200
commitbd91ecbf5b43b52321c4d938e16a612b9c68bf06 (patch)
treea5f0c0588fa6260304c0bffada8dcec84d9e0419 /tests/qemu-iotests/054
parentc93331c9146719958a4b102435fcd0566da45ea2 (diff)
downloadqemu-bd91ecbf5b43b52321c4d938e16a612b9c68bf06.zip
qemu-bd91ecbf5b43b52321c4d938e16a612b9c68bf06.tar.gz
qemu-bd91ecbf5b43b52321c4d938e16a612b9c68bf06.tar.bz2
qemu-iotests: Try creating huge qcow2 image
It's supposed to fail gracefully instead of segfaulting. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/054')
-rwxr-xr-xtests/qemu-iotests/05458
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/qemu-iotests/054 b/tests/qemu-iotests/054
new file mode 100755
index 0000000..b360429
--- /dev/null
+++ b/tests/qemu-iotests/054
@@ -0,0 +1,58 @@
+#!/bin/bash
+#
+# Test huge qcow2 images
+#
+# Copyright (C) 2013 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# creator
+owner=kwolf@redhat.com
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1 # failure is the default!
+
+_cleanup()
+{
+ _cleanup_test_img
+}
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_supported_fmt qcow2
+_supported_proto generic
+_supported_os Linux
+
+echo
+echo "creating too large image (1 EB)"
+_make_test_img $((1024*1024))T
+
+echo
+echo "creating too large image (1 EB) using qcow2.py"
+_make_test_img 4G
+./qcow2.py $TEST_IMG set-header size $((1024 ** 6))
+_check_test_img
+
+# success, all done
+echo "*** done"
+rm -f $seq.full
+status=0