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