On 12/5/19 7:46 AM, Stefan Hajnoczi wrote:
Only apply --image-opts to the topmost image when listing an entire
backing chain.  It is incorrect to treat backing filenames as image
options.  Assuming we have the backing chain t.IMGFMT.base <-
t.IMGFMT.mid <- t.IMGFMT, qemu-img info fails as follows:

   $ qemu-img info --backing-chain --image-opts \
       driver=qcow2,file.driver=file,file.filename=t.IMGFMT
   qemu-img: Could not open 'TEST_DIR/t.IMGFMT.mid': Cannot find 
device=TEST_DIR/t.IMGFMT.mid nor node_name=TEST_DIR/t.IMGFMT.mid

Cute failure.  Yes, the fix seems right.


Signed-off-by: Stefan Hajnoczi <[email protected]>
---
  qemu-img.c                 |  3 ++
  tests/qemu-iotests/279     | 56 ++++++++++++++++++++++++++++++++++++++
  tests/qemu-iotests/279.out | 35 ++++++++++++++++++++++++
  tests/qemu-iotests/group   |  1 +
  4 files changed, 95 insertions(+)
  create mode 100755 tests/qemu-iotests/279
  create mode 100644 tests/qemu-iotests/279.out

Reviewed-by: Eric Blake <[email protected]>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to