From patchwork Mon Nov 3 11:41:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 406070 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 67A1C14007F for ; Mon, 3 Nov 2014 22:42:07 +1100 (AEDT) Received: from localhost ([::1]:33711 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlG1N-0007wL-E8 for incoming@patchwork.ozlabs.org; Mon, 03 Nov 2014 06:42:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlG0x-0007fz-Aj for qemu-devel@nongnu.org; Mon, 03 Nov 2014 06:41:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlG0o-0005bY-85 for qemu-devel@nongnu.org; Mon, 03 Nov 2014 06:41:39 -0500 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]:55706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlG0n-0005bB-T1 for qemu-devel@nongnu.org; Mon, 03 Nov 2014 06:41:30 -0500 Received: by mail-la0-f53.google.com with SMTP id mc6so9179957lab.26 for ; Mon, 03 Nov 2014 03:41:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=R0mS9if8osaw+R3UOnFeAo7GLuxo5XqxNd1F0+8YuEo=; b=zOrWVQIQQGEcwb5fBMSq9UNFHpyLKdvsh1DJ1twdN3jyPbM2Wu3gys37glxpw6ZO9x 8BoY6QwyeOOx+a9ATg3RAU9+iYffO3GWDh2Ve+QtWFWdAA0vNZkqC2cszXFRuhE9WwzS X++u/siu21GXi0MrNqAQA7fX1Xcwho0m/Qsp5vRN5dfSKx+FcV+SUEpdE6Gx1+oocIk5 wQ/MFcs3aNzvLN+VOcEa75ser1IUnMnzQ62fDcLYj+qFB3ax9YZeJd1vycA8fZXpqpwY uxMTuSgH0uRdwbaIxlbFqI9FPKsFyrI6mmMqzRJ7wtTaKybFqIvbO0Dv66s23cbRgCMS P+Cw== X-Received: by 10.112.150.68 with SMTP id ug4mr50162153lbb.82.1415014887820; Mon, 03 Nov 2014 03:41:27 -0800 (PST) Received: from localhost ([84.93.169.236]) by mx.google.com with ESMTPSA id c6sm7849520lah.43.2014.11.03.03.41.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Nov 2014 03:41:26 -0800 (PST) Date: Mon, 3 Nov 2014 11:41:24 +0000 From: Stefan Hajnoczi To: Max Reitz Message-ID: <20141103114124.GA10995@stefanha-thinkpad.redhat.com> References: <1414076175-17034-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1414076175-17034-1-git-send-email-mreitz@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::235 Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi Subject: Re: [Qemu-devel] [PATCH 0/2] block: JSON filenames and relative backing files X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Thu, Oct 23, 2014 at 04:56:13PM +0200, Max Reitz wrote: > Sometimes, qemu does not have a filename to work with (it then generates > a JSON filename), so it does not know which directory to use for a > backing file specified by a relative filename. > > In this case, qemu should not somehow try to append the backing file's > name to the JSON object, but rather just print an error and bail out. > > > Max Reitz (2): > block: JSON filenames and relative backing files > iotests: Add test for relative backing file names > > block.c | 19 +++++++--- > block/qapi.c | 7 +++- > include/block/block.h | 2 +- > tests/qemu-iotests/110 | 87 ++++++++++++++++++++++++++++++++++++++++++++++ > tests/qemu-iotests/110.out | 15 ++++++++ > tests/qemu-iotests/group | 1 + > 6 files changed, 125 insertions(+), 6 deletions(-) > create mode 100755 tests/qemu-iotests/110 > create mode 100644 tests/qemu-iotests/110.out Unfortunately this breaks qemu-iotests check -vmdk 110 so I had to drop the patches. 110 0s ... - output mismatch (see 110.out.bad) --- /home/stefanha/qemu/tests/qemu-iotests/110.out 2014-11-03 09:48:42.157955288 +0000 +++ 110.out.bad 2014-11-03 10:11:59.469231898 +0000 @@ -3,13 +3,26 @@ === Reconstructable filename === Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864 +qemu-img: TEST_DIR/t.IMGFMT: Could not open 't.IMGFMT.base': No such file or directory Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file='t.IMGFMT.base' -image: TEST_DIR/t.IMGFMT -file format: IMGFMT -virtual size: 64M (67108864 bytes) -backing file: t.IMGFMT.base (actual path: TEST_DIR/t.IMGFMT.base) +qemu-img: Could not open 'json:{'driver':'IMGFMT','file':{'driver':'file','filename':'TEST_DIR/t.IMGFMT'}}': Could not open 'TEST_DIR/t.IMGFMT': No such file or directory === Non-reconstructable filename === -qemu-img: Cannot use relative backing file names for 'json:{"driver": "IMGFMT", "file": {"set-state": [{"new_state": 42, "state": 0, "event": "read_aio"}], "image": {"driver": "file", "filename": "TEST_DIR/t.IMGFMT"}, "driver": "blkdebug"}}' +qemu-img: Could not open 'json:{ + 'driver': 'IMGFMT', + 'file': { + 'driver': 'blkdebug', + 'image': { + 'driver': 'file', + 'filename': 'TEST_DIR/t.IMGFMT' + }, + 'set-state': [ + { + 'event': 'read_aio', + 'new_state': 42 + } + ] + } +}': Could not open 'TEST_DIR/t.IMGFMT': No such file or directory