111a82d14SPhilippe Mathieu-Daudé#!/usr/bin/env bash 2c4d01535SMax Reitz# 3c4d01535SMax Reitz# Test case for non-existing backing file when creating a qcow2 image 4c4d01535SMax Reitz# and not specifying the size 5c4d01535SMax Reitz# 6c4d01535SMax Reitz# Copyright (C) 2014 Red Hat, Inc. 7c4d01535SMax Reitz# 8c4d01535SMax Reitz# This program is free software; you can redistribute it and/or modify 9c4d01535SMax Reitz# it under the terms of the GNU General Public License as published by 10c4d01535SMax Reitz# the Free Software Foundation; either version 2 of the License, or 11c4d01535SMax Reitz# (at your option) any later version. 12c4d01535SMax Reitz# 13c4d01535SMax Reitz# This program is distributed in the hope that it will be useful, 14c4d01535SMax Reitz# but WITHOUT ANY WARRANTY; without even the implied warranty of 15c4d01535SMax Reitz# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16c4d01535SMax Reitz# GNU General Public License for more details. 17c4d01535SMax Reitz# 18c4d01535SMax Reitz# You should have received a copy of the GNU General Public License 19c4d01535SMax Reitz# along with this program. If not, see <http://www.gnu.org/licenses/>. 20c4d01535SMax Reitz# 21c4d01535SMax Reitz 22c4d01535SMax Reitz# creator 23c4d01535SMax Reitzowner=mreitz@redhat.com 24c4d01535SMax Reitz 25c4d01535SMax Reitzseq="$(basename $0)" 26c4d01535SMax Reitzecho "QA output created by $seq" 27c4d01535SMax Reitz 28c4d01535SMax Reitzstatus=1 # failure is the default! 29c4d01535SMax Reitz 30c4d01535SMax Reitz_cleanup() 31c4d01535SMax Reitz{ 32c4d01535SMax Reitz _cleanup_test_img 33c4d01535SMax Reitz} 34c4d01535SMax Reitztrap "_cleanup; exit \$status" 0 1 2 3 15 35c4d01535SMax Reitz 36c4d01535SMax Reitz# get standard environment, filters and checks 37c4d01535SMax Reitz. ./common.rc 38c4d01535SMax Reitz. ./common.filter 39c4d01535SMax Reitz 40c4d01535SMax Reitz_supported_fmt qed qcow qcow2 vmdk 41c4d01535SMax Reitz_supported_proto file 42c4d01535SMax Reitz_unsupported_imgopts "subformat=monolithicFlat" "subformat=twoGbMaxExtentFlat" 43c4d01535SMax Reitz 44*52a97b5aSMax Reitz_make_test_img -b "$TEST_IMG.inexistent" 45c4d01535SMax Reitz 46c4d01535SMax Reitz# success, all done 47c4d01535SMax Reitzecho '*** done' 48c4d01535SMax Reitzrm -f $seq.full 49c4d01535SMax Reitzstatus=0 50