[PULL 00/18] Block patches

Test asan passed
Test FreeBSD passed
Test docker-quick@centos7 failed
Test checkpatch failed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200622151059.921191-1-mreitz@redhat.com
Maintainers: Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
There is a newer version of this series
docs/tools/qemu-img.rst          |   5 +-
qapi/block-core.json             |  68 +++++
qapi/crypto.json                 |  73 +++++-
qapi/job.json                    |   4 +-
block/crypto.h                   |  37 +++
crypto/blockpriv.h               |   8 +
include/block/block.h            |   1 +
include/block/block_int.h        |  24 +-
include/crypto/block.h           |  22 ++
block.c                          |   4 +-
block/amend.c                    | 113 +++++++++
block/block-copy.c               |   4 +-
block/crypto.c                   | 206 +++++++++++++--
block/qcow2.c                    | 332 +++++++++++++-----------
crypto/block-luks.c              | 416 ++++++++++++++++++++++++++++++-
crypto/block.c                   |  29 +++
qemu-img.c                       |  44 +++-
block/Makefile.objs              |   2 +-
qemu-img-cmds.hx                 |   4 +-
tests/qemu-iotests/049.out       | 102 ++++----
tests/qemu-iotests/051.pc.out    |   4 +-
tests/qemu-iotests/061.out       |  12 +-
tests/qemu-iotests/082.out       | 185 ++++----------
tests/qemu-iotests/085.out       |  38 +--
tests/qemu-iotests/087.out       |   6 +-
tests/qemu-iotests/112.out       |   2 +-
tests/qemu-iotests/134.out       |   2 +-
tests/qemu-iotests/141           |   2 +-
tests/qemu-iotests/144.out       |   4 +-
tests/qemu-iotests/153           |   9 +-
tests/qemu-iotests/158.out       |   4 +-
tests/qemu-iotests/182.out       |   2 +-
tests/qemu-iotests/185.out       |   8 +-
tests/qemu-iotests/188.out       |   2 +-
tests/qemu-iotests/189.out       |   4 +-
tests/qemu-iotests/198.out       |   4 +-
tests/qemu-iotests/255.out       |   8 +-
tests/qemu-iotests/263.out       |   4 +-
tests/qemu-iotests/274.out       |  46 ++--
tests/qemu-iotests/280.out       |   2 +-
tests/qemu-iotests/284.out       |   6 +-
tests/qemu-iotests/291           |   4 -
tests/qemu-iotests/291.out       |  33 ---
tests/qemu-iotests/293           | 207 +++++++++++++++
tests/qemu-iotests/293.out       |  99 ++++++++
tests/qemu-iotests/294           |  90 +++++++
tests/qemu-iotests/294.out       |  30 +++
tests/qemu-iotests/295           | 279 +++++++++++++++++++++
tests/qemu-iotests/295.out       |  40 +++
tests/qemu-iotests/296           | 234 +++++++++++++++++
tests/qemu-iotests/296.out       |  33 +++
tests/qemu-iotests/common.filter |  93 +++++--
tests/qemu-iotests/group         |   4 +
53 files changed, 2482 insertions(+), 516 deletions(-)
create mode 100644 block/amend.c
create mode 100755 tests/qemu-iotests/293
create mode 100644 tests/qemu-iotests/293.out
create mode 100755 tests/qemu-iotests/294
create mode 100644 tests/qemu-iotests/294.out
create mode 100755 tests/qemu-iotests/295
create mode 100644 tests/qemu-iotests/295.out
create mode 100755 tests/qemu-iotests/296
create mode 100644 tests/qemu-iotests/296.out
[PULL 00/18] Block patches
Posted by Max Reitz 3 years, 10 months ago
The following changes since commit bae31bfa48b9caecee25da3d5333901a126a06b4:

  Merge remote-tracking branch 'remotes/kraxel/tags/audio-20200619-pull-request' into staging (2020-06-19 22:56:59 +0100)

are available in the Git repository at:

  https://github.com/XanClic/qemu.git tags/pull-block-2020-06-22

for you to fetch changes up to 74c55e4142a7bb835c38d3770c74210cbb1e4fab:

  iotests: don't test qcow2.py inside 291 (2020-06-22 16:05:23 +0200)

----------------------------------------------------------------
Block patches:
- Support modifying a LUKS-encrypted image's keyslots
- iotest fixes

----------------------------------------------------------------
Max Reitz (1):
  iotests: Make _filter_img_create more active

Maxim Levitsky (14):
  iotests: filter few more luks specific create options
  qcrypto/core: add generic infrastructure for crypto options amendment
  qcrypto/luks: implement encryption key management
  block/amend: add 'force' option
  block/amend: separate amend and create options for qemu-img
  block/amend: refactor qcow2 amend options
  block/crypto: rename two functions
  block/crypto: implement the encryption key management
  block/qcow2: extend qemu-img amend interface with crypto options
  iotests: qemu-img tests for luks key management
  block/core: add generic infrastructure for x-blockdev-amend qmp
    command
  block/crypto: implement blockdev-amend
  block/qcow2: implement blockdev-amend
  iotests: add tests for blockdev-amend

Philippe Mathieu-Daudé (1):
  iotests: Fix 051 output after qdev_init_nofail() removal

Vladimir Sementsov-Ogievskiy (2):
  block/block-copy: block_copy_dirty_clusters: fix failure check
  iotests: don't test qcow2.py inside 291

 docs/tools/qemu-img.rst          |   5 +-
 qapi/block-core.json             |  68 +++++
 qapi/crypto.json                 |  73 +++++-
 qapi/job.json                    |   4 +-
 block/crypto.h                   |  37 +++
 crypto/blockpriv.h               |   8 +
 include/block/block.h            |   1 +
 include/block/block_int.h        |  24 +-
 include/crypto/block.h           |  22 ++
 block.c                          |   4 +-
 block/amend.c                    | 113 +++++++++
 block/block-copy.c               |   4 +-
 block/crypto.c                   | 206 +++++++++++++--
 block/qcow2.c                    | 332 +++++++++++++-----------
 crypto/block-luks.c              | 416 ++++++++++++++++++++++++++++++-
 crypto/block.c                   |  29 +++
 qemu-img.c                       |  44 +++-
 block/Makefile.objs              |   2 +-
 qemu-img-cmds.hx                 |   4 +-
 tests/qemu-iotests/049.out       | 102 ++++----
 tests/qemu-iotests/051.pc.out    |   4 +-
 tests/qemu-iotests/061.out       |  12 +-
 tests/qemu-iotests/082.out       | 185 ++++----------
 tests/qemu-iotests/085.out       |  38 +--
 tests/qemu-iotests/087.out       |   6 +-
 tests/qemu-iotests/112.out       |   2 +-
 tests/qemu-iotests/134.out       |   2 +-
 tests/qemu-iotests/141           |   2 +-
 tests/qemu-iotests/144.out       |   4 +-
 tests/qemu-iotests/153           |   9 +-
 tests/qemu-iotests/158.out       |   4 +-
 tests/qemu-iotests/182.out       |   2 +-
 tests/qemu-iotests/185.out       |   8 +-
 tests/qemu-iotests/188.out       |   2 +-
 tests/qemu-iotests/189.out       |   4 +-
 tests/qemu-iotests/198.out       |   4 +-
 tests/qemu-iotests/255.out       |   8 +-
 tests/qemu-iotests/263.out       |   4 +-
 tests/qemu-iotests/274.out       |  46 ++--
 tests/qemu-iotests/280.out       |   2 +-
 tests/qemu-iotests/284.out       |   6 +-
 tests/qemu-iotests/291           |   4 -
 tests/qemu-iotests/291.out       |  33 ---
 tests/qemu-iotests/293           | 207 +++++++++++++++
 tests/qemu-iotests/293.out       |  99 ++++++++
 tests/qemu-iotests/294           |  90 +++++++
 tests/qemu-iotests/294.out       |  30 +++
 tests/qemu-iotests/295           | 279 +++++++++++++++++++++
 tests/qemu-iotests/295.out       |  40 +++
 tests/qemu-iotests/296           | 234 +++++++++++++++++
 tests/qemu-iotests/296.out       |  33 +++
 tests/qemu-iotests/common.filter |  93 +++++--
 tests/qemu-iotests/group         |   4 +
 53 files changed, 2482 insertions(+), 516 deletions(-)
 create mode 100644 block/amend.c
 create mode 100755 tests/qemu-iotests/293
 create mode 100644 tests/qemu-iotests/293.out
 create mode 100755 tests/qemu-iotests/294
 create mode 100644 tests/qemu-iotests/294.out
 create mode 100755 tests/qemu-iotests/295
 create mode 100644 tests/qemu-iotests/295.out
 create mode 100755 tests/qemu-iotests/296
 create mode 100644 tests/qemu-iotests/296.out

-- 
2.26.2


Re: [PULL 00/18] Block patches
Posted by no-reply@patchew.org 3 years, 10 months ago
Patchew URL: https://patchew.org/QEMU/20200622151059.921191-1-mreitz@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [PULL 00/18] Block patches
Type: series
Message-id: 20200622151059.921191-1-mreitz@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
3170989 iotests: don't test qcow2.py inside 291
04ade1c iotests: Fix 051 output after qdev_init_nofail() removal
e126517 iotests: add tests for blockdev-amend
04e2dc4 block/qcow2: implement blockdev-amend
4e43879 block/crypto: implement blockdev-amend
9207247 block/core: add generic infrastructure for x-blockdev-amend qmp command
5da1c75 iotests: qemu-img tests for luks key management
7a61c0c block/qcow2: extend qemu-img amend interface with crypto options
91d3523 block/crypto: implement the encryption key management
b87419a block/crypto: rename two functions
204e824 block/amend: refactor qcow2 amend options
6264ccb block/amend: separate amend and create options for qemu-img
52f8343 block/amend: add 'force' option
61029e2 qcrypto/luks: implement encryption key management
4ce359d qcrypto/core: add generic infrastructure for crypto options amendment
555e09e block/block-copy: block_copy_dirty_clusters: fix failure check
3de5cab iotests: filter few more luks specific create options
ad75eea iotests: Make _filter_img_create more active

=== OUTPUT BEGIN ===
1/18 Checking commit ad75eea3d2b2 (iotests: Make _filter_img_create more active)
2/18 Checking commit 3de5cab58b52 (iotests: filter few more luks specific create options)
3/18 Checking commit 555e09eaabd5 (block/block-copy: block_copy_dirty_clusters: fix failure check)
4/18 Checking commit 4ce359d028ff (qcrypto/core: add generic infrastructure for crypto options amendment)
5/18 Checking commit 61029e241398 (qcrypto/luks: implement encryption key management)
6/18 Checking commit 52f83435e0e8 (block/amend: add 'force' option)
7/18 Checking commit 6264ccb96333 (block/amend: separate amend and create options for qemu-img)
ERROR: Macros with multiple statements should be enclosed in a do - while loop
#34: FILE: block/qcow2.c:5652:
+#define QCOW_COMMON_OPTIONS                                         \
+    {                                                               \
+        .name = BLOCK_OPT_SIZE,                                     \
+        .type = QEMU_OPT_SIZE,                                      \
+        .help = "Virtual disk size"                                 \
+    },                                                              \
+    {                                                               \
+        .name = BLOCK_OPT_COMPAT_LEVEL,                             \
+        .type = QEMU_OPT_STRING,                                    \
+        .help = "Compatibility level (v2 [0.10] or v3 [1.1])"       \
+    },                                                              \
+    {                                                               \
+        .name = BLOCK_OPT_BACKING_FILE,                             \
+        .type = QEMU_OPT_STRING,                                    \
+        .help = "File name of a base image"                         \
+    },                                                              \
+    {                                                               \
+        .name = BLOCK_OPT_BACKING_FMT,                              \
+        .type = QEMU_OPT_STRING,                                    \
+        .help = "Image format of the base image"                    \
+    },                                                              \
+    {                                                               \
+        .name = BLOCK_OPT_DATA_FILE,                                \
+        .type = QEMU_OPT_STRING,                                    \
+        .help = "File name of an external data file"                \
+    },                                                              \
+    {                                                               \
+        .name = BLOCK_OPT_DATA_FILE_RAW,                            \
+        .type = QEMU_OPT_BOOL,                                      \
+        .help = "The external data file must stay valid "           \
+                "as a raw image"                                    \
+    },                                                              \
+    {                                                               \
+        .name = BLOCK_OPT_ENCRYPT,                                  \
+        .type = QEMU_OPT_BOOL,                                      \
+        .help = "Encrypt the image with format 'aes'. (Deprecated " \
+                "in favor of " BLOCK_OPT_ENCRYPT_FORMAT "=aes)",    \
+    },                                                              \
+    {                                                               \
+        .name = BLOCK_OPT_ENCRYPT_FORMAT,                           \
+        .type = QEMU_OPT_STRING,                                    \
+        .help = "Encrypt the image, format choices: 'aes', 'luks'", \
+    },                                                              \
+    BLOCK_CRYPTO_OPT_DEF_KEY_SECRET("encrypt.",                     \
+        "ID of secret providing qcow AES key or LUKS passphrase"),  \
+    BLOCK_CRYPTO_OPT_DEF_LUKS_CIPHER_ALG("encrypt."),               \
+    BLOCK_CRYPTO_OPT_DEF_LUKS_CIPHER_MODE("encrypt."),              \
+    BLOCK_CRYPTO_OPT_DEF_LUKS_IVGEN_ALG("encrypt."),                \
+    BLOCK_CRYPTO_OPT_DEF_LUKS_IVGEN_HASH_ALG("encrypt."),           \
+    BLOCK_CRYPTO_OPT_DEF_LUKS_HASH_ALG("encrypt."),                 \
+    BLOCK_CRYPTO_OPT_DEF_LUKS_ITER_TIME("encrypt."),                \
+    {                                                               \
+        .name = BLOCK_OPT_CLUSTER_SIZE,                             \
+        .type = QEMU_OPT_SIZE,                                      \
+        .help = "qcow2 cluster size",                               \
+        .def_value_str = stringify(DEFAULT_CLUSTER_SIZE)            \
+    },                                                              \
+    {                                                               \
+        .name = BLOCK_OPT_PREALLOC,                                 \
+        .type = QEMU_OPT_STRING,                                    \
+        .help = "Preallocation mode (allowed values: off, "         \
+                "metadata, falloc, full)"                           \
+    },                                                              \
+    {                                                               \
+        .name = BLOCK_OPT_LAZY_REFCOUNTS,                           \
+        .type = QEMU_OPT_BOOL,                                      \
+        .help = "Postpone refcount updates",                        \
+        .def_value_str = "off"                                      \
+    },                                                              \
+    {                                                               \
+        .name = BLOCK_OPT_REFCOUNT_BITS,                            \
+        .type = QEMU_OPT_NUMBER,                                    \
+        .help = "Width of a reference count entry in bits",         \
+        .def_value_str = "16"                                       \
+    },                                                              \
+    {                                                               \
+        .name = BLOCK_OPT_COMPRESSION_TYPE,                         \
+        .type = QEMU_OPT_STRING,                                    \
+        .help = "Compression method used for image cluster "        \
+                "compression",                                      \
+        .def_value_str = "zlib"                                     \
+    }

total: 1 errors, 0 warnings, 244 lines checked

Patch 7/18 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

8/18 Checking commit 204e8241c4cf (block/amend: refactor qcow2 amend options)
9/18 Checking commit b87419aa40da (block/crypto: rename two functions)
10/18 Checking commit 91d35230beea (block/crypto: implement the encryption key management)
11/18 Checking commit 7a61c0c033a5 (block/qcow2: extend qemu-img amend interface with crypto options)
12/18 Checking commit 5da1c755835e (iotests: qemu-img tests for luks key management)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
new file mode 100755

total: 0 errors, 1 warnings, 432 lines checked

Patch 12/18 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
13/18 Checking commit 92072473fcd1 (block/core: add generic infrastructure for x-blockdev-amend qmp command)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#33: 
new file mode 100644

total: 0 errors, 1 warnings, 221 lines checked

Patch 13/18 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
14/18 Checking commit 4e4387949bcc (block/crypto: implement blockdev-amend)
15/18 Checking commit 04e2dc46dfb4 (block/qcow2: implement blockdev-amend)
16/18 Checking commit e126517e9737 (iotests: add tests for blockdev-amend)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
new file mode 100755

total: 0 errors, 1 warnings, 592 lines checked

Patch 16/18 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/18 Checking commit 04ade1c09357 (iotests: Fix 051 output after qdev_init_nofail() removal)
18/18 Checking commit 31709895351b (iotests: don't test qcow2.py inside 291)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200622151059.921191-1-mreitz@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PULL 00/18] Block patches
Posted by Peter Maydell 3 years, 10 months ago
On Mon, 22 Jun 2020 at 16:11, Max Reitz <mreitz@redhat.com> wrote:
>
> The following changes since commit bae31bfa48b9caecee25da3d5333901a126a06b4:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/audio-20200619-pull-request' into staging (2020-06-19 22:56:59 +0100)
>
> are available in the Git repository at:
>
>   https://github.com/XanClic/qemu.git tags/pull-block-2020-06-22
>
> for you to fetch changes up to 74c55e4142a7bb835c38d3770c74210cbb1e4fab:
>
>   iotests: don't test qcow2.py inside 291 (2020-06-22 16:05:23 +0200)
>
> ----------------------------------------------------------------
> Block patches:
> - Support modifying a LUKS-encrypted image's keyslots
> - iotest fixes
>
> ----------------------------------------------------------------

Hi; I see various iotest failures, different things on
PPC64 Linux, OpenBSD and FreeBSD, and on an AArch32 build
that happens to not have optional crypto libs installed.

On PPC64 Linux, lots of iotests fail like this:

  TEST    iotest-qcow2: 001 [fail]
QEMU          --
"/home/pm215/qemu/build/all/tests/qemu-iotests/../../ppc64-softmmu/qemu-system-ppc64"
-nodefaults -display none -accel qtest
QEMU_IMG      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-img"
QEMU_IO       --
"/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-io"  --cache
writeback --aio threads -f qcow2
QEMU_NBD      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-nbd"
IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- Linux/ppc64 gcc1-power7 3.10.0-862.14.4.el7.ppc64
TEST_DIR      -- /home/pm215/qemu/build/all/tests/qemu-iotests/scratch
SOCK_DIR      -- /tmp/tmp.vvBdnkatyZ
SOCKET_SCM_HELPER --
/home/pm215/qemu/build/all/tests/qemu-iotests/socket_scm_helper

--- /home/pm215/qemu/tests/qemu-iotests/001.out 2015-04-08
18:43:24.908449234 +0000
+++ /home/pm215/qemu/build/all/tests/qemu-iotests/001.out.bad
2020-06-23 10:42:29.262626202 +0000
@@ -1,5 +1,6 @@
 QA output created by 001
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+./common.filter: line 128: readarray: -d: invalid option
+readarray: usage: readarray [-n count] [-O origin] [-s count] [-t]
[-u fd] [-C callback] [-c quantum] [array]

 == reading whole image ==
 read 134217728/134217728 bytes at offset 0
  TEST    iotest-qcow2: 002 [fail]
QEMU          --
"/home/pm215/qemu/build/all/tests/qemu-iotests/../../ppc64-softmmu/qemu-system-ppc64"
-nodefaults -display none -accel qtest
QEMU_IMG      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-img"
QEMU_IO       --
"/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-io"  --cache
writeback --aio threads -f qcow2
QEMU_NBD      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-nbd"
IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- Linux/ppc64 gcc1-power7 3.10.0-862.14.4.el7.ppc64
TEST_DIR      -- /home/pm215/qemu/build/all/tests/qemu-iotests/scratch
SOCK_DIR      -- /tmp/tmp.vvBdnkatyZ
SOCKET_SCM_HELPER --
/home/pm215/qemu/build/all/tests/qemu-iotests/socket_scm_helper

Looks like you're trying to use a readarray option that doesn't
exist (maybe only exists in newer shells?)

iotests failures on aarch32 which happens to not have some
optional crypto lib dependency installed I guess; these
iotests ought to be made to skip if the functionality they're
testing isn't compiled into this QEMU:

  TEST    iotest-qcow2: 293 [fail]
QEMU          --
"/home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/../../aarch64-softmmu/qemu-system-aarch64"
-nodefaults -display none -machine virt -accel qtest
QEMU_IMG      --
"/home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/../../qemu-img"
QEMU_IO       --
"/home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/../../qemu-io"
 --cache writeback --aio threads -f qcow2
QEMU_NBD      --
"/home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/../../qemu-nbd"
IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- Linux/aarch64 mustang-maydell 4.15.0-101-generic
TEST_DIR      --
/home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/scratch
SOCK_DIR      -- /tmp/tmp.tjBWiNDvED
SOCKET_SCM_HELPER --
/home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/socket_scm_helper

--- /home/peter.maydell/qemu/tests/qemu-iotests/293.out 2020-06-23
10:38:50.091867725 +0000
+++ /home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/293.out.bad
      2020-06-23 10:59:09.027627162 +0000
@@ -1,5 +1,6 @@
 QA output created by 293
 == creating a test image ==
+qemu-img: TEST_DIR/t.IMGFMT: No crypto library supporting PBKDF in
this build: Function not implemented
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432

 == test that key 0 opens the image ==
@@ -7,10 +8,15 @@
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

 == adding a password to slot 4 ==
+qemu-img: Can't amend encryption options - encryption not present
 == adding a password to slot 1 ==
+qemu-img: Can't amend encryption options - encryption not present
 == adding a password to slot 3 ==
+qemu-img: Can't amend encryption options - encryption not present
 == adding a password to slot 2 ==
+qemu-img: Can't amend encryption options - encryption not present
 == erase slot 4 ==
+qemu-img: Can't amend encryption options - encryption not present

 == all secrets should work ==
 read 4096/4096 bytes at offset 0
@@ -23,19 +29,29 @@
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

 == erase slot 0 and try it ==
-qemu-io: can't open: Invalid password, cannot unlock any keyslot
+qemu-img: Can't amend encryption options - encryption not present
+read 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
[etc]


On OpenBSD: iotest 293 fails trying to use "seq" when it doesn't exist:
  TEST    iotest-qcow2: 293 [fail]
QEMU          --
"/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../aarch64-softmmu/qemu-system-aarch64"
-nodef
aults -display none -machine virt -accel qtest
QEMU_IMG      --
"/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../qemu-img"
QEMU_IO       --
"/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../qemu-io"
--cache writeback --aio threads -
f qcow2
QEMU_NBD      --
"/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../qemu-nbd"
IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- OpenBSD/amd64 openbsd 6.6
TEST_DIR      -- /home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/scratch
SOCK_DIR      -- /tmp/tmp.o4s3SCLIsx
SOCKET_SCM_HELPER --

--- /home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/293.out  Tue
Jun 23 10:38:33 2020
+++ /home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/293.out.bad
 Tue Jun 23 11:06:19 2020
@@ -1,6 +1,6 @@
 QA output created by 293
 == creating a test image ==
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432
+Formatting 'TEST_DIR/t.IMGFMT'x0IMGFMT encrypt.format=luks
encrypt.key-secret=sec0 encrypt.iter-time=10 cluster_size=65
536 compression_type=zlib size=33554432 compat=1.1 lazy_refcounts=off
refcount_bits=16

 == test that key 0 opens the image ==
 read 4096/4096 bytes at offset 0
@@ -29,25 +29,26 @@
 qemu-io: can't open: Invalid password, cannot unlock any keyslot

 == filling  4 slots with secret 2 ==
+./293: line 111: seq: command not found

 == adding secret 0 ==

 == adding secret 3 (last slot) ==

 == trying to add another slot (should fail) ==
-qemu-img: Can't add a keyslot - all keyslots are in use
+qemu-img: Could not open
'driver=qcow2,file.filename=/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/scratch/t.qco
w2,encrypt.key-secret=sec2': Invalid password, cannot unlock any keyslot

 == all secrets should work again ==
 read 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 read 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-io: can't open: Invalid password, cannot unlock any keyslot
 read 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 4096/4096 bytes at offset 0
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

 == erase all keys of secret 2==
+qemu-img: No keyslots match given (old) password for erase operation
 == erase all keys of secret 1==
 == erase all keys of secret 0==
 == erasing secret3 will fail now since it is the only secret (in 3 slots) ==

Also OpenBSD, iotest 295 failed because the QEMU dumped core:
  TEST    iotest-qcow2: 295 [fail]
QEMU          --
"/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../aarch64-softmmu/qemu-system-aarch64"
-nodef
aults -display none -machine virt -accel qtest
QEMU_IMG      --
"/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../qemu-img"
QEMU_IO       --
"/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../qemu-io"
--cache writeback --aio threads -
f qcow2
QEMU_NBD      --
"/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../qemu-nbd"
IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- OpenBSD/amd64 openbsd 6.6
TEST_DIR      -- /home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/scratch
SOCK_DIR      -- /tmp/tmp.o4s3SCLIsx
SOCKET_SCM_HELPER --

--- /home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/295.out  Tue
Jun 23 10:38:33 2020
+++ /home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/295.out.bad
 Tue Jun 23 11:09:01 2020
@@ -4,19 +4,11 @@
 {"return": {}}
 {"execute": "job-dismiss", "arguments": {"id": "job_erase_key"}}
 {"return": {}}
+WARNING:qemu.machine:qemu received signal 9:
/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../aarch64-softmmu/qemu-system-aarch64
-display none -vga none -chardev
socket,id=mon,path=/tmp/tmp.o4s3SCLIsx/qemu-36824-monitor.sock -mon
chardev=mon,mode=control -qtest
unix:path=/tmp/tmp.o4s3SCLIsx/qemu-36824-qtest.sock -accel qtest
-nodefaults -display none -machine virt -accel qtest
 {"execute": "job-dismiss", "arguments": {"id": "job_add_key"}}
 {"return": {}}
-{"execute": "job-dismiss", "arguments": {"id": "job_erase_key"}}
-{"return": {}}
-Job failed: Invalid password, cannot unlock any keyslot
 {"execute": "job-dismiss", "arguments": {"id": "job_add_key"}}
 {"return": {}}
-{"execute": "job-dismiss", "arguments": {"id": "job_add_key"}}
-{"return": {}}
-{"execute": "job-dismiss", "arguments": {"id": "job_add_key"}}
-{"return": {}}
-{"execute": "job-dismiss", "arguments": {"id": "job_add_key"}}
-{"return": {}}
 Job failed: Refusing to overwrite active keyslot 2 - please erase it first
 {"execute": "job-dismiss", "arguments": {"id": "job_add_key"}}
 {"return": {}}
@@ -33,8 +25,37 @@
 {"return": {}}
 {"execute": "job-dismiss", "arguments": {"id": "job_erase_key"}}
 {"return": {}}
-...
+.E.
+======================================================================
+ERROR: testOldPassword (__main__.EncryptionSetupTestCase)
 ----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "/home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/../../python/qemu/qmp.py",
line 139, in __get_events
+    ret = self.__json_read(only_event=True)
+  File "/home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/../../python/qemu/qmp.py",
line 99, in __json_read
+    data = self.__sockfile.readline()
+  File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
+    return self._sock.recv_into(b)
+socket.timeout: timed out
+
+During handling of the above exception, another exception occurred:
+
+Traceback (most recent call last):
+  File "295", line 234, in testOldPassword
+    self.addKeyQmp("testdev", new_secret = self.secrets[1])
+  File "295", line 164, in addKeyQmp
+    self.vm.run_job('job_add_key')
+  File "/home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/iotests.py",
line 648, in run_job
+    ev = filter_qmp_event(self.events_wait(events, timeout=wait))
+  File "/home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/../../python/qemu/machine.py",
line 518, in events_wait
+    event = self._qmp.pull_event(wait=timeout)
+  File "/home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/../../python/qemu/qmp.py",
line 254, in pull_event
+    self.__get_events(wait)
+  File "/home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/../../python/qemu/qmp.py",
line 141, in __get_events
+    raise QMPTimeoutError("Timeout waiting for event")
+qemu.qmp.QMPTimeoutError: Timeout waiting for event
+
+----------------------------------------------------------------------
 Ran 3 tests

-OK
+FAILED (errors=1)

FreeBSD: lots of iotest failures, looks like some sed or other
command trying to sanitize output is broken on this host OS
(assuming gnu sed or whatever, maybe?)

  TEST    iotest-qcow2: 001 [fail]
QEMU          --
"/home/qemu/qemu-test.RNYtim/build/tests/qemu-iotests/../../aarch64-softmmu/qemu-system-aarch64"
-nodefaults -display none -machine virt -accel qtest
QEMU_IMG      --
"/home/qemu/qemu-test.RNYtim/build/tests/qemu-iotests/../../qemu-img"
QEMU_IO       --
"/home/qemu/qemu-test.RNYtim/build/tests/qemu-iotests/../../qemu-io"
--cache writeback --aio threads -f qcow2
QEMU_NBD      --
"/home/qemu/qemu-test.RNYtim/build/tests/qemu-iotests/../../qemu-nbd"
IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- FreeBSD/amd64 freebsd 12.1-RELEASE
TEST_DIR      -- /home/qemu/qemu-test.RNYtim/build/tests/qemu-iotests/scratch
SOCK_DIR      -- /tmp/tmp.l5ksaQ9N
SOCKET_SCM_HELPER --

--- /home/qemu/qemu-test.RNYtim/src/tests/qemu-iotests/001.out
2020-06-23 10:38:33.000000000 +0000
+++ /home/qemu/qemu-test.RNYtim/build/tests/qemu-iotests/001.out.bad
 2020-06-23 10:56:47.833020000 +0000
@@ -1,5 +1,5 @@
 QA output created by 001
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+Formatting 'TEST_DIR/t.IMGFMT'x0IMGFMT cluster_size=65536
compression_type=zlib size=134217728 compat=1.1 lazy_refcounts=off
refcount_bits=16

 == reading whole image ==
 read 134217728/134217728 bytes at offset 0


thanks
-- PMM

Re: [PULL 00/18] Block patches
Posted by Max Reitz 3 years, 9 months ago
On 23.06.20 14:55, Peter Maydell wrote:
> On Mon, 22 Jun 2020 at 16:11, Max Reitz <mreitz@redhat.com> wrote:
>>
>> The following changes since commit bae31bfa48b9caecee25da3d5333901a126a06b4:
>>
>>   Merge remote-tracking branch 'remotes/kraxel/tags/audio-20200619-pull-request' into staging (2020-06-19 22:56:59 +0100)
>>
>> are available in the Git repository at:
>>
>>   https://github.com/XanClic/qemu.git tags/pull-block-2020-06-22
>>
>> for you to fetch changes up to 74c55e4142a7bb835c38d3770c74210cbb1e4fab:
>>
>>   iotests: don't test qcow2.py inside 291 (2020-06-22 16:05:23 +0200)
>>
>> ----------------------------------------------------------------
>> Block patches:
>> - Support modifying a LUKS-encrypted image's keyslots
>> - iotest fixes
>>
>> ----------------------------------------------------------------
> 
> Hi; I see various iotest failures, different things on
> PPC64 Linux, OpenBSD and FreeBSD, and on an AArch32 build
> that happens to not have optional crypto libs installed.

OK.  Sorry.  None of this looks easily fixable, so I suppose I’ll have
to drop everything but the last two patches for now.

> On PPC64 Linux, lots of iotests fail like this:
> 
>   TEST    iotest-qcow2: 001 [fail]
> QEMU          --
> "/home/pm215/qemu/build/all/tests/qemu-iotests/../../ppc64-softmmu/qemu-system-ppc64"
> -nodefaults -display none -accel qtest
> QEMU_IMG      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-img"
> QEMU_IO       --
> "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-io"  --cache
> writeback --aio threads -f qcow2
> QEMU_NBD      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-nbd"
> IMGFMT        -- qcow2 (compat=1.1)
> IMGPROTO      -- file
> PLATFORM      -- Linux/ppc64 gcc1-power7 3.10.0-862.14.4.el7.ppc64
> TEST_DIR      -- /home/pm215/qemu/build/all/tests/qemu-iotests/scratch
> SOCK_DIR      -- /tmp/tmp.vvBdnkatyZ
> SOCKET_SCM_HELPER --
> /home/pm215/qemu/build/all/tests/qemu-iotests/socket_scm_helper
> 
> --- /home/pm215/qemu/tests/qemu-iotests/001.out 2015-04-08
> 18:43:24.908449234 +0000
> +++ /home/pm215/qemu/build/all/tests/qemu-iotests/001.out.bad
> 2020-06-23 10:42:29.262626202 +0000
> @@ -1,5 +1,6 @@
>  QA output created by 001
> -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
> +./common.filter: line 128: readarray: -d: invalid option
> +readarray: usage: readarray [-n count] [-O origin] [-s count] [-t]
> [-u fd] [-C callback] [-c quantum] [array]
> 
>  == reading whole image ==
>  read 134217728/134217728 bytes at offset 0
>   TEST    iotest-qcow2: 002 [fail]
> QEMU          --
> "/home/pm215/qemu/build/all/tests/qemu-iotests/../../ppc64-softmmu/qemu-system-ppc64"
> -nodefaults -display none -accel qtest
> QEMU_IMG      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-img"
> QEMU_IO       --
> "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-io"  --cache
> writeback --aio threads -f qcow2
> QEMU_NBD      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-nbd"
> IMGFMT        -- qcow2 (compat=1.1)
> IMGPROTO      -- file
> PLATFORM      -- Linux/ppc64 gcc1-power7 3.10.0-862.14.4.el7.ppc64
> TEST_DIR      -- /home/pm215/qemu/build/all/tests/qemu-iotests/scratch
> SOCK_DIR      -- /tmp/tmp.vvBdnkatyZ
> SOCKET_SCM_HELPER --
> /home/pm215/qemu/build/all/tests/qemu-iotests/socket_scm_helper
> 
> Looks like you're trying to use a readarray option that doesn't
> exist (maybe only exists in newer shells?)

Yes, I am.  Well, that’s a real shame. :/

I wasn’t aware that readarray’s -d option was only introduced at some
later point.  Looks like that happened in 4.4, which was only released
2016.  So that’s probably too new indeed.

> iotests failures on aarch32 which happens to not have some
> optional crypto lib dependency installed I guess; these
> iotests ought to be made to skip if the functionality they're
> testing isn't compiled into this QEMU:

Right.  Maxim, can you do that?

>   TEST    iotest-qcow2: 293 [fail]
> QEMU          --
> "/home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/../../aarch64-softmmu/qemu-system-aarch64"
> -nodefaults -display none -machine virt -accel qtest
> QEMU_IMG      --
> "/home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/../../qemu-img"
> QEMU_IO       --
> "/home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/../../qemu-io"
>  --cache writeback --aio threads -f qcow2
> QEMU_NBD      --
> "/home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/../../qemu-nbd"
> IMGFMT        -- qcow2 (compat=1.1)
> IMGPROTO      -- file
> PLATFORM      -- Linux/aarch64 mustang-maydell 4.15.0-101-generic
> TEST_DIR      --
> /home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/scratch
> SOCK_DIR      -- /tmp/tmp.tjBWiNDvED
> SOCKET_SCM_HELPER --
> /home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/socket_scm_helper
> 
> --- /home/peter.maydell/qemu/tests/qemu-iotests/293.out 2020-06-23
> 10:38:50.091867725 +0000
> +++ /home/peter.maydell/qemu/build/all-a32/tests/qemu-iotests/293.out.bad
>       2020-06-23 10:59:09.027627162 +0000
> @@ -1,5 +1,6 @@
>  QA output created by 293
>  == creating a test image ==
> +qemu-img: TEST_DIR/t.IMGFMT: No crypto library supporting PBKDF in
> this build: Function not implemented
>  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432
> 
>  == test that key 0 opens the image ==
> @@ -7,10 +8,15 @@
>  4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> 
>  == adding a password to slot 4 ==
> +qemu-img: Can't amend encryption options - encryption not present
>  == adding a password to slot 1 ==
> +qemu-img: Can't amend encryption options - encryption not present
>  == adding a password to slot 3 ==
> +qemu-img: Can't amend encryption options - encryption not present
>  == adding a password to slot 2 ==
> +qemu-img: Can't amend encryption options - encryption not present
>  == erase slot 4 ==
> +qemu-img: Can't amend encryption options - encryption not present
> 
>  == all secrets should work ==
>  read 4096/4096 bytes at offset 0
> @@ -23,19 +29,29 @@
>  4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> 
>  == erase slot 0 and try it ==
> -qemu-io: can't open: Invalid password, cannot unlock any keyslot
> +qemu-img: Can't amend encryption options - encryption not present
> +read 4096/4096 bytes at offset 0
> +4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> [etc]
> 
> 
> On OpenBSD: iotest 293 fails trying to use "seq" when it doesn't exist:

Well that’s nice.  Maxim, I think we’ll need a for (()) loop then (like
e.g. tests/qemu-iotests/common.pattern:25 does it).

>   TEST    iotest-qcow2: 293 [fail]
> QEMU          --
> "/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../aarch64-softmmu/qemu-system-aarch64"
> -nodef
> aults -display none -machine virt -accel qtest
> QEMU_IMG      --
> "/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../qemu-img"
> QEMU_IO       --
> "/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../qemu-io"
> --cache writeback --aio threads -
> f qcow2
> QEMU_NBD      --
> "/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../qemu-nbd"
> IMGFMT        -- qcow2 (compat=1.1)
> IMGPROTO      -- file
> PLATFORM      -- OpenBSD/amd64 openbsd 6.6
> TEST_DIR      -- /home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/scratch
> SOCK_DIR      -- /tmp/tmp.o4s3SCLIsx
> SOCKET_SCM_HELPER --
> 
> --- /home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/293.out  Tue
> Jun 23 10:38:33 2020
> +++ /home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/293.out.bad
>  Tue Jun 23 11:06:19 2020
> @@ -1,6 +1,6 @@
>  QA output created by 293
>  == creating a test image ==
> -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432
> +Formatting 'TEST_DIR/t.IMGFMT'x0IMGFMT encrypt.format=luks
> encrypt.key-secret=sec0 encrypt.iter-time=10 cluster_size=65
> 536 compression_type=zlib size=33554432 compat=1.1 lazy_refcounts=off
> refcount_bits=16
> 
>  == test that key 0 opens the image ==
>  read 4096/4096 bytes at offset 0
> @@ -29,25 +29,26 @@
>  qemu-io: can't open: Invalid password, cannot unlock any keyslot
> 
>  == filling  4 slots with secret 2 ==
> +./293: line 111: seq: command not found
> 
>  == adding secret 0 ==
> 
>  == adding secret 3 (last slot) ==
> 
>  == trying to add another slot (should fail) ==
> -qemu-img: Can't add a keyslot - all keyslots are in use
> +qemu-img: Could not open
> 'driver=qcow2,file.filename=/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/scratch/t.qco
> w2,encrypt.key-secret=sec2': Invalid password, cannot unlock any keyslot
> 
>  == all secrets should work again ==
>  read 4096/4096 bytes at offset 0
>  4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
>  read 4096/4096 bytes at offset 0
>  4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +qemu-io: can't open: Invalid password, cannot unlock any keyslot
>  read 4096/4096 bytes at offset 0
>  4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> -read 4096/4096 bytes at offset 0
> -4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> 
>  == erase all keys of secret 2==
> +qemu-img: No keyslots match given (old) password for erase operation
>  == erase all keys of secret 1==
>  == erase all keys of secret 0==
>  == erasing secret3 will fail now since it is the only secret (in 3 slots) ==
> 
> Also OpenBSD, iotest 295 failed because the QEMU dumped core:

I assume the SIGKILL occurred because 295 somewhere waits on some QMP
event that never happens (probably because the encryption is again not
supported), so the iotest kills it on timeout.

(Maxim, I think that we’ll need something similar to what we need in 293
to skip the test if there’s no crypto library.)

>   TEST    iotest-qcow2: 295 [fail]
> QEMU          --
> "/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../aarch64-softmmu/qemu-system-aarch64"
> -nodef
> aults -display none -machine virt -accel qtest
> QEMU_IMG      --
> "/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../qemu-img"
> QEMU_IO       --
> "/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../qemu-io"
> --cache writeback --aio threads -
> f qcow2
> QEMU_NBD      --
> "/home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../qemu-nbd"
> IMGFMT        -- qcow2 (compat=1.1)
> IMGPROTO      -- file
> PLATFORM      -- OpenBSD/amd64 openbsd 6.6
> TEST_DIR      -- /home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/scratch
> SOCK_DIR      -- /tmp/tmp.o4s3SCLIsx
> SOCKET_SCM_HELPER --
> 
> --- /home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/295.out  Tue
> Jun 23 10:38:33 2020
> +++ /home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/295.out.bad
>  Tue Jun 23 11:09:01 2020
> @@ -4,19 +4,11 @@
>  {"return": {}}
>  {"execute": "job-dismiss", "arguments": {"id": "job_erase_key"}}
>  {"return": {}}
> +WARNING:qemu.machine:qemu received signal 9:
> /home/qemu/qemu-test.DyTmtb/build/tests/qemu-iotests/../../aarch64-softmmu/qemu-system-aarch64
> -display none -vga none -chardev
> socket,id=mon,path=/tmp/tmp.o4s3SCLIsx/qemu-36824-monitor.sock -mon
> chardev=mon,mode=control -qtest
> unix:path=/tmp/tmp.o4s3SCLIsx/qemu-36824-qtest.sock -accel qtest
> -nodefaults -display none -machine virt -accel qtest
>  {"execute": "job-dismiss", "arguments": {"id": "job_add_key"}}
>  {"return": {}}
> -{"execute": "job-dismiss", "arguments": {"id": "job_erase_key"}}
> -{"return": {}}
> -Job failed: Invalid password, cannot unlock any keyslot
>  {"execute": "job-dismiss", "arguments": {"id": "job_add_key"}}
>  {"return": {}}
> -{"execute": "job-dismiss", "arguments": {"id": "job_add_key"}}
> -{"return": {}}
> -{"execute": "job-dismiss", "arguments": {"id": "job_add_key"}}
> -{"return": {}}
> -{"execute": "job-dismiss", "arguments": {"id": "job_add_key"}}
> -{"return": {}}
>  Job failed: Refusing to overwrite active keyslot 2 - please erase it first
>  {"execute": "job-dismiss", "arguments": {"id": "job_add_key"}}
>  {"return": {}}
> @@ -33,8 +25,37 @@
>  {"return": {}}
>  {"execute": "job-dismiss", "arguments": {"id": "job_erase_key"}}
>  {"return": {}}
> -...
> +.E.
> +======================================================================
> +ERROR: testOldPassword (__main__.EncryptionSetupTestCase)
>  ----------------------------------------------------------------------
> +Traceback (most recent call last):
> +  File "/home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/../../python/qemu/qmp.py",
> line 139, in __get_events
> +    ret = self.__json_read(only_event=True)
> +  File "/home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/../../python/qemu/qmp.py",
> line 99, in __json_read
> +    data = self.__sockfile.readline()
> +  File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
> +    return self._sock.recv_into(b)
> +socket.timeout: timed out
> +
> +During handling of the above exception, another exception occurred:
> +
> +Traceback (most recent call last):
> +  File "295", line 234, in testOldPassword
> +    self.addKeyQmp("testdev", new_secret = self.secrets[1])
> +  File "295", line 164, in addKeyQmp
> +    self.vm.run_job('job_add_key')
> +  File "/home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/iotests.py",
> line 648, in run_job
> +    ev = filter_qmp_event(self.events_wait(events, timeout=wait))
> +  File "/home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/../../python/qemu/machine.py",
> line 518, in events_wait
> +    event = self._qmp.pull_event(wait=timeout)
> +  File "/home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/../../python/qemu/qmp.py",
> line 254, in pull_event
> +    self.__get_events(wait)
> +  File "/home/qemu/qemu-test.DyTmtb/src/tests/qemu-iotests/../../python/qemu/qmp.py",
> line 141, in __get_events
> +    raise QMPTimeoutError("Timeout waiting for event")
> +qemu.qmp.QMPTimeoutError: Timeout waiting for event
> +
> +----------------------------------------------------------------------
>  Ran 3 tests
> 
> -OK
> +FAILED (errors=1)
> 
> FreeBSD: lots of iotest failures, looks like some sed or other
> command trying to sanitize output is broken on this host OS
> (assuming gnu sed or whatever, maybe?)

It’s assuming that \x0 produces a NUL character.  It’s a shame it
doesn’t, but I suppose it doesn’t even really matter without readarray
supporting -d.

>   TEST    iotest-qcow2: 001 [fail]
> QEMU          --
> "/home/qemu/qemu-test.RNYtim/build/tests/qemu-iotests/../../aarch64-softmmu/qemu-system-aarch64"
> -nodefaults -display none -machine virt -accel qtest
> QEMU_IMG      --
> "/home/qemu/qemu-test.RNYtim/build/tests/qemu-iotests/../../qemu-img"
> QEMU_IO       --
> "/home/qemu/qemu-test.RNYtim/build/tests/qemu-iotests/../../qemu-io"
> --cache writeback --aio threads -f qcow2
> QEMU_NBD      --
> "/home/qemu/qemu-test.RNYtim/build/tests/qemu-iotests/../../qemu-nbd"
> IMGFMT        -- qcow2 (compat=1.1)
> IMGPROTO      -- file
> PLATFORM      -- FreeBSD/amd64 freebsd 12.1-RELEASE
> TEST_DIR      -- /home/qemu/qemu-test.RNYtim/build/tests/qemu-iotests/scratch
> SOCK_DIR      -- /tmp/tmp.l5ksaQ9N
> SOCKET_SCM_HELPER --
> 
> --- /home/qemu/qemu-test.RNYtim/src/tests/qemu-iotests/001.out
> 2020-06-23 10:38:33.000000000 +0000
> +++ /home/qemu/qemu-test.RNYtim/build/tests/qemu-iotests/001.out.bad
>  2020-06-23 10:56:47.833020000 +0000
> @@ -1,5 +1,5 @@
>  QA output created by 001
> -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
> +Formatting 'TEST_DIR/t.IMGFMT'x0IMGFMT cluster_size=65536
> compression_type=zlib size=134217728 compat=1.1 lazy_refcounts=off
> refcount_bits=16
> 
>  == reading whole image ==
>  read 134217728/134217728 bytes at offset 0
> 
> 
> thanks

Thank you!

Max

Re: [PULL 00/18] Block patches
Posted by Thomas Huth 3 years, 9 months ago
On 24/06/2020 09.27, Max Reitz wrote:
> On 23.06.20 14:55, Peter Maydell wrote:
>> On Mon, 22 Jun 2020 at 16:11, Max Reitz <mreitz@redhat.com> wrote:
>>>
>>> The following changes since commit bae31bfa48b9caecee25da3d5333901a126a06b4:
>>>
>>>    Merge remote-tracking branch 'remotes/kraxel/tags/audio-20200619-pull-request' into staging (2020-06-19 22:56:59 +0100)
>>>
>>> are available in the Git repository at:
>>>
>>>    https://github.com/XanClic/qemu.git tags/pull-block-2020-06-22
>>>
>>> for you to fetch changes up to 74c55e4142a7bb835c38d3770c74210cbb1e4fab:
>>>
>>>    iotests: don't test qcow2.py inside 291 (2020-06-22 16:05:23 +0200)
>>>
>>> ----------------------------------------------------------------
>>> Block patches:
>>> - Support modifying a LUKS-encrypted image's keyslots
>>> - iotest fixes
>>>
>>> ----------------------------------------------------------------
>>
>> Hi; I see various iotest failures, different things on
>> PPC64 Linux, OpenBSD and FreeBSD, and on an AArch32 build
>> that happens to not have optional crypto libs installed.
> 
> OK.  Sorry.  None of this looks easily fixable, so I suppose I’ll have
> to drop everything but the last two patches for now.

At least the problem with "seq" in test 293 should be easy to fix, since 
we're requiring bash for the iotests. See e.g. commit 30edd9fa50e86fbf 
as an example.

  Thomas