[PATCH 0/4] luks: add qemu-img measure support

Stefan Hajnoczi posted 4 patches 4 years, 3 months ago
Test docker-mingw@fedora failed
Test asan failed
Test checkpatch passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200108112220.499180-1-stefanha@redhat.com
Maintainers: Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
There is a newer version of this series
block/crypto.c             | 146 +++++++++++++++++++++++++++++++++++++
block/crypto.h             |   5 ++
block/qcow2.c              |  59 +--------------
qemu-img.c                 |   6 +-
tests/qemu-iotests/282     |  93 +++++++++++++++++++++++
tests/qemu-iotests/282.out |  30 ++++++++
tests/qemu-iotests/group   |   1 +
7 files changed, 281 insertions(+), 59 deletions(-)
create mode 100755 tests/qemu-iotests/282
create mode 100644 tests/qemu-iotests/282.out
[PATCH 0/4] luks: add qemu-img measure support
Posted by Stefan Hajnoczi 4 years, 3 months ago
This patch series adds qemu-img measure support to the "luks" block driver.  We
just need to take into account the LUKS header when sizing the image.

Stefan Hajnoczi (4):
  luks: extract block_crypto_calculate_payload_offset()
  luks: implement .bdrv_measure()
  qemu-img: allow qemu-img measure --object without a filename
  iotests: add 282 luks qemu-img measure test

 block/crypto.c             | 146 +++++++++++++++++++++++++++++++++++++
 block/crypto.h             |   5 ++
 block/qcow2.c              |  59 +--------------
 qemu-img.c                 |   6 +-
 tests/qemu-iotests/282     |  93 +++++++++++++++++++++++
 tests/qemu-iotests/282.out |  30 ++++++++
 tests/qemu-iotests/group   |   1 +
 7 files changed, 281 insertions(+), 59 deletions(-)
 create mode 100755 tests/qemu-iotests/282
 create mode 100644 tests/qemu-iotests/282.out

-- 
2.24.1


Re: [PATCH 0/4] luks: add qemu-img measure support
Posted by no-reply@patchew.org 4 years, 3 months ago
Patchew URL: https://patchew.org/QEMU/20200108112220.499180-1-stefanha@redhat.com/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#! /bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-mingw@fedora J=14 NETWORK=1
=== TEST SCRIPT END ===

  CC      io/channel-websock.o
  CC      io/channel-util.o
/tmp/qemu-test/src/block/crypto.c: In function 'block_crypto_measure':
/tmp/qemu-test/src/block/crypto.c:573:60: error: passing argument 3 of 'block_crypto_calculate_payload_offset' from incompatible pointer type [-Werror=incompatible-pointer-types]
     if (!block_crypto_calculate_payload_offset(opts, NULL, &luks_payload_size,
                                                            ^~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/block/crypto.c:211:52: note: expected 'size_t *' {aka 'unsigned int *'} but argument is of type 'uint64_t *' {aka 'long long unsigned int *'}
                                            size_t *len,
                                            ~~~~~~~~^~~
cc1: all warnings being treated as errors
make: *** [/tmp/qemu-test/src/rules.mak:69: block/crypto.o] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 662, in <module>
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=7c91c1888d964587980d9e156bc1199a', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-fk1t3r1x/src/docker-src.2020-01-08-07.10.21.5329:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=7c91c1888d964587980d9e156bc1199a
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-fk1t3r1x/src'
make: *** [docker-run-test-mingw@fedora] Error 2

real    5m47.805s
user    0m8.501s


The full log is available at
http://patchew.org/logs/20200108112220.499180-1-stefanha@redhat.com/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH 0/4] luks: add qemu-img measure support
Posted by Stefan Hajnoczi 4 years, 3 months ago
On Wed, Jan 08, 2020 at 04:16:09AM -0800, no-reply@patchew.org wrote:
> === TEST SCRIPT BEGIN ===
> #! /bin/bash
> export ARCH=x86_64
> make docker-image-fedora V=1 NETWORK=1
> time make docker-test-mingw@fedora J=14 NETWORK=1
> === TEST SCRIPT END ===
> 
>   CC      io/channel-websock.o
>   CC      io/channel-util.o
> /tmp/qemu-test/src/block/crypto.c: In function 'block_crypto_measure':
> /tmp/qemu-test/src/block/crypto.c:573:60: error: passing argument 3 of 'block_crypto_calculate_payload_offset' from incompatible pointer type [-Werror=incompatible-pointer-types]
>      if (!block_crypto_calculate_payload_offset(opts, NULL, &luks_payload_size,
>                                                             ^~~~~~~~~~~~~~~~~~
> /tmp/qemu-test/src/block/crypto.c:211:52: note: expected 'size_t *' {aka 'unsigned int *'} but argument is of type 'uint64_t *' {aka 'long long unsigned int *'}
>                                             size_t *len,
>                                             ~~~~~~~~^~~

Will fix in v2.

Stefan