qemu-e2k/tests/qemu-iotests/279.out
Stefan Hajnoczi 0da7d13a4c qemu-img: fix info --backing-chain --image-opts
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

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-12-18 11:20:57 +01:00

36 lines
1.0 KiB
Plaintext

QA output created by 279
Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
Formatting 'TEST_DIR/t.IMGFMT.mid', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.base
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.mid
== qemu-img info --backing-chain ==
image: TEST_DIR/t.IMGFMT
file format: IMGFMT
virtual size: 64 MiB (67108864 bytes)
backing file: TEST_DIR/t.IMGFMT.mid
image: TEST_DIR/t.IMGFMT.mid
file format: IMGFMT
virtual size: 64 MiB (67108864 bytes)
backing file: TEST_DIR/t.IMGFMT.base
image: TEST_DIR/t.IMGFMT.base
file format: IMGFMT
virtual size: 64 MiB (67108864 bytes)
== qemu-img info --backing-chain --image-opts ==
image: TEST_DIR/t.IMGFMT
file format: IMGFMT
virtual size: 64 MiB (67108864 bytes)
backing file: TEST_DIR/t.IMGFMT.mid
image: TEST_DIR/t.IMGFMT.mid
file format: IMGFMT
virtual size: 64 MiB (67108864 bytes)
backing file: TEST_DIR/t.IMGFMT.base
image: TEST_DIR/t.IMGFMT.base
file format: IMGFMT
virtual size: 64 MiB (67108864 bytes)
*** done