[PATCH v2 17/23] iotests/208: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/208 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/208 b/tests/qemu-iotests/208 index 1e202388dc..546eb1de3e 100755 --- a/tests/qemu-iotests/208 +++ b/tests/qemu-iotests/208 @@ -26,7

[PATCH v2 11/23] iotests/182: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth --- tests/qemu-iotests/182 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/182 b/tests/qemu-iotests/182 index 7f494eb9bb..1ccb850055 100755 --- a/tests/qemu-iotests/182 +++

[PATCH v2 13/23] iotests/192: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/192 | 4 ++-- tests/qemu-iotests/192.out | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/192 b/tests/qemu-iotests/192 index 034432272f..d2ba55dd90 100755 ---

[PATCH v2 09/23] iotests/147: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth --- tests/qemu-iotests/147 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147 index ab8480b9a4..03fc2fabcf 100755 --- a/tests/qemu-iotests/147 +++

[PATCH v2 04/23] iotests: Filter $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/common.filter | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index 9f418b4881..0ee6042524 100644 ---

Re: [PULL 33/36] block/backup: use backup-top instead of write notifiers

2019-10-17 Thread Vladimir Sementsov-Ogievskiy
17.10.2019 15:04, Peter Maydell wrote: > On Thu, 10 Oct 2019 at 12:44, Max Reitz wrote: >> >> From: Vladimir Sementsov-Ogievskiy >> >> Drop write notifiers and use filter node instead. > > Hi; after this change Coverity complains about dead code in > backup_job_create() (CID 1406402): Oops,

[PATCH v2 16/23] iotests/205: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/205 b/tests/qemu-iotests/205 index 76f6c5fa2b..4bb2c21e8b 100755 --- a/tests/qemu-iotests/205 +++ b/tests/qemu-iotests/205 @@ -24,7

[PATCH v2 18/23] iotests/209: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/209 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/209 b/tests/qemu-iotests/209 index 259e991ec6..e0f464bcbe 100755 --- a/tests/qemu-iotests/209 +++ b/tests/qemu-iotests/209 @@

[PATCH v2 14/23] iotests/194: Create sockets in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/194 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194 index d746ab1e21..72e47e8833 100755 --- a/tests/qemu-iotests/194 +++ b/tests/qemu-iotests/194 @@

[PATCH v2 00/23] iotests: Add and use $SOCK_DIR

2019-10-17 Thread Max Reitz
Hi, Perhaps the main reason we cannot run important tests such as 041 in CI is that when they care Unix sockets in $TEST_DIR, the path may become too long to connect to them. To get by this problem, this series lets the check script create a new temporary directory (mktemp -d) and then makes the

[PATCH v2 06/23] iotests/083: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth --- tests/qemu-iotests/083 | 6 +++--- tests/qemu-iotests/083.out | 34 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/qemu-iotests/083

[PATCH v2 20/23] iotests/223: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/223 | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/qemu-iotests/223 b/tests/qemu-iotests/223 index 2ba3d8124b..b5a80e50bb 100755 --- a/tests/qemu-iotests/223 +++

[PATCH v2 21/23] iotests/240: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/240 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/240 b/tests/qemu-iotests/240 index f73bc07d80..8b4337b58d 100755 --- a/tests/qemu-iotests/240 +++ b/tests/qemu-iotests/240 @@

Re: [PATCH v2 2/3] iotests: Include QMP input in .out files

2019-10-17 Thread Eric Blake
On 10/17/19 7:59 AM, Max Reitz wrote: On 15.10.19 21:35, Eric Blake wrote: We generally include relevant HMP input in .out files, by virtue of the fact that HMP echoes its input. But QMP does not, so we have to explicitly inject it in the output stream, in order to make it easier to read .out

Re: [PATCH v2 01/23] iotests: Introduce $SOCK_DIR

2019-10-17 Thread Eric Blake
On 10/17/19 8:31 AM, Max Reitz wrote: Unix sockets generally have a maximum path length. Depending on your $TEST_DIR, it may be exceeded and then all tests that create and use Unix sockets there may fail. Circumvent this by adding a new scratch directory specifically for Unix socket files. It

[PATCH v2 07/23] iotests/140: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth --- tests/qemu-iotests/140 | 8 tests/qemu-iotests/140.out | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/140 b/tests/qemu-iotests/140 index b965b1dd5d..8d2ce5d9e3

[PATCH v2 10/23] iotests/181: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth --- tests/qemu-iotests/181 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/181 b/tests/qemu-iotests/181 index e317e63422..378c2899d1 100755 --- a/tests/qemu-iotests/181 +++

[PATCH v2 12/23] iotests/183: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth --- tests/qemu-iotests/183 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/183 b/tests/qemu-iotests/183 index 04fb344d08..bced83fae0 100755 --- a/tests/qemu-iotests/183 +++

[PATCH v2 01/23] iotests: Introduce $SOCK_DIR

2019-10-17 Thread Max Reitz
Unix sockets generally have a maximum path length. Depending on your $TEST_DIR, it may be exceeded and then all tests that create and use Unix sockets there may fail. Circumvent this by adding a new scratch directory specifically for Unix socket files. It defaults to a temporary directory

[PATCH v2 05/23] iotests: Let common.nbd create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
In addition, drop the nbd_unix_socket assignment in 241 because it does not really do anything. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/241| 2 -- tests/qemu-iotests/common.nbd | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH v2 03/23] iotests.py: Add @base_dir to FilePaths etc.

2019-10-17 Thread Max Reitz
Specifying this optional parameter allows creating temporary files in other directories than the test_dir; for example in sock_dir. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/iotests.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH v2 02/23] iotests.py: Store socket files in $SOCK_DIR

2019-10-17 Thread Max Reitz
iotests.py itself does not store socket files, but machine.py and qtest.py do. iotests.py needs to pass the respective path to them, and they need to adhere to it. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth --- python/qemu/machine.py| 15 ---

[PATCH v2 23/23] iotests: Drop TEST_DIR filter from _filter_nbd

2019-10-17 Thread Max Reitz
Sockets should be placed into $SOCK_DIR instead of $TEST_DIR, so remove the $TEST_DIR filter from _filter_nbd. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/common.filter | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/qemu-iotests/common.filter

[PATCH v2 15/23] iotests/201: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/201 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/201 b/tests/qemu-iotests/201 index 7abf740fe4..86fa37e714 100755 --- a/tests/qemu-iotests/201 +++ b/tests/qemu-iotests/201 @@ -24,7

[PATCH v2 08/23] iotests/143: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth --- tests/qemu-iotests/143 | 6 +++--- tests/qemu-iotests/143.out | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/143 b/tests/qemu-iotests/143 index 92249ac8da..f649b36195

[PATCH v2 22/23] iotests/267: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/267 | 4 ++-- tests/qemu-iotests/267.out | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/267 b/tests/qemu-iotests/267 index d37a67c012..170e173c0a 100755 ---

[PATCH v2 19/23] iotests/222: Create socket in $SOCK_DIR

2019-10-17 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/222 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/222 b/tests/qemu-iotests/222 index 0ead56d574..3f9f934ad8 100644 --- a/tests/qemu-iotests/222 +++ b/tests/qemu-iotests/222 @@ -48,7

[PATCH] block/backup: drop dead code from backup_job_create

2019-10-17 Thread Vladimir Sementsov-Ogievskiy
After commit 00e30f05de1d195, there is no more "goto error" points after job creation, so after "error:" @job is always NULL and we don't need roll-back job creation. Reported-by: Coverity (CID 1406402) Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 5 + 1 file changed, 1

Re: [PATCH v2 1/3] iotests: Fix 173

2019-10-17 Thread Max Reitz
On 15.10.19 21:35, Eric Blake wrote: > This test has been broken since 3.0. It used TEST_IMG to influence > the name of a file created during _make_test_img, but commit 655ae6bb > changed things so that the wrong file name is being created, which > then caused _launch_qemu to fail. In the

Re: [PATCH v2 1/3] iotests: Fix 173

2019-10-17 Thread Max Reitz
On 17.10.19 13:46, Max Reitz wrote: > On 15.10.19 21:35, Eric Blake wrote: >> This test has been broken since 3.0. It used TEST_IMG to influence >> the name of a file created during _make_test_img, but commit 655ae6bb >> changed things so that the wrong file name is being created, which >> then

[RFC PATCH 11/18] monitor: Move monitor option parsing to monitor/monitor.c

2019-10-17 Thread Kevin Wolf
Both the system emulators and the storage daemon will need to parse monitor options, so move that code to monitor/monitor.c, which can be linked into binaries that aren't a system emulator. This patch moves the monitor option parsing from vl.c and adds an allow_hmp parameter so that callers can

[RFC PATCH 10/18] qemu-storage-daemon: Add --chardev option

2019-10-17 Thread Kevin Wolf
This adds a --chardev option to the storage daemon that works the same as the -chardev option of the system emulator. Signed-off-by: Kevin Wolf --- qemu-storage-daemon.c | 19 +++ Makefile | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git

[RFC PATCH 08/18] qemu-storage-daemon: Add --export option

2019-10-17 Thread Kevin Wolf
Add a --export option to qemu-storage-daemon to export a block node. For now, only NBD exports are implemented. Apart from the 'type' option (which is the implied key), it maps the arguments for nbd-server-add to the command line. Example: --export nbd,device=disk,name=test-export,writable=on

[RFC PATCH 12/18] stubs: Update monitor stubs for qemu-storage-daemon

2019-10-17 Thread Kevin Wolf
Before we can add the monitor to qemu-storage-daemon, we need to add a few monitor stubs, and we need to make sure that stubs that are actually implemented in the monitor core aren't linked so that we don't get linker errors because of duplicate symbols. Signed-off-by: Kevin Wolf ---

[RFC PATCH 00/18] Add qemu-storage-daemon

2019-10-17 Thread Kevin Wolf
This series adds a new tool 'qemu-storage-daemon', which can be used to export and perform operations on block devices. There is some overlap between qemu-img/qemu-nbd and the new qemu-storage-daemon, but there are a few important differences: * The qemu-storage-daemon has QMP support. The

Re: [PATCH v2 2/3] iotests: Include QMP input in .out files

2019-10-17 Thread Max Reitz
On 15.10.19 21:35, Eric Blake wrote: > We generally include relevant HMP input in .out files, by virtue of > the fact that HMP echoes its input. But QMP does not, so we have to > explicitly inject it in the output stream, in order to make it easier > to read .out files to see what behavior is

[RFC PATCH 03/18] stubs: Add arch_type

2019-10-17 Thread Kevin Wolf
blockdev.c uses the arch_type constant, so before we can use the file in tools (i.e. outside of the system emulator), we need to add a stub for it. A new QEMU_ARCH_NONE is introduced for this case. Signed-off-by: Kevin Wolf --- include/sysemu/arch_init.h | 2 ++ stubs/arch_type.c | 4

[RFC PATCH 05/18] qemu-storage-daemon: Add --blockdev option

2019-10-17 Thread Kevin Wolf
This adds a --blockdev option to the storage daemon that works the same as the -blockdev option of the system emulator. In order to be able to link with blockdev.o, we also need to change stream.o from common-obj to block-obj, which is where all other block jobs already are. Signed-off-by: Kevin

Re: iotest 260 failure (linux host): "OSError: AF_UNIX path too long"

2019-10-17 Thread Peter Maydell
On Thu, 17 Oct 2019 at 11:20, Max Reitz wrote: > > On 17.10.19 12:04, Peter Maydell wrote: > > On Thu, 17 Oct 2019 at 10:53, Max Reitz wrote: > >> > >> On 17.10.19 11:51, Peter Maydell wrote: > >>> I just got this iotest 260 failure processing an > >>> unrelated merge on my x86-64 Ubuntu box. I

Re: [PULL v2 00/19] Bitmaps patches

2019-10-17 Thread Peter Maydell
On Mon, 14 Oct 2019 at 20:29, John Snow wrote: > > The following changes since commit c760cb77e511eb05094df67c1b30029a952efa35: > > Merge remote-tracking branch > 'remotes/dgilbert/tags/pull-migration-20191011a' into staging (2019-10-14 > 16:09:52 +0100) > > are available in the Git

[RFC PATCH 06/18] qemu-storage-daemon: Add --nbd-server option

2019-10-17 Thread Kevin Wolf
Add a --nbd-server option to qemu-storage-daemon to start the built-in NBD server right away. It maps the arguments for nbd-server-start to the command line. Example (only with required options): --nbd-server addr.type=inet,addr.host=localhost,addr.port=10809 Signed-off-by: Kevin Wolf ---

[RFC PATCH 13/18] qapi: Create module 'monitor'

2019-10-17 Thread Kevin Wolf
misc.json contains definitions that are related to the system emulator, so it can't be used for the storage daemon. This patch moves basic functionality that is related to the monitor itself into a new monitor.json, which could be used in tools as well. Signed-off-by: Kevin Wolf ---

Re: [PATCH v2 1/3] iotests: Fix 173

2019-10-17 Thread Max Reitz
On 15.10.19 21:35, Eric Blake wrote: > This test has been broken since 3.0. It used TEST_IMG to influence > the name of a file created during _make_test_img, but commit 655ae6bb > changed things so that the wrong file name is being created, which > then caused _launch_qemu to fail. In the

Re: [PULL 33/36] block/backup: use backup-top instead of write notifiers

2019-10-17 Thread Peter Maydell
On Thu, 10 Oct 2019 at 12:44, Max Reitz wrote: > > From: Vladimir Sementsov-Ogievskiy > > Drop write notifiers and use filter node instead. Hi; after this change Coverity complains about dead code in backup_job_create() (CID 1406402): > @@ -382,6 +353,8 @@ BlockJob *backup_job_create(const

[RFC PATCH 02/18] qemu-storage-daemon: Add --object option

2019-10-17 Thread Kevin Wolf
Add a command line option to create user-creatable QOM objects. Signed-off-by: Kevin Wolf --- qemu-storage-daemon.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/qemu-storage-daemon.c b/qemu-storage-daemon.c index a251dc255c..48d6af43a6 100644 ---

[RFC PATCH 01/18] qemu-storage-daemon: Add barebone tool

2019-10-17 Thread Kevin Wolf
This adds a new binary qemu-storage-daemon that doesn't yet do more than some typical initialisation for tools and parsing the basic command options --version, --help and --trace. Signed-off-by: Kevin Wolf --- configure | 2 +- qemu-storage-daemon.c | 141

[RFC PATCH 04/18] stubs: Add blk_by_qdev_id()

2019-10-17 Thread Kevin Wolf
blockdev.c uses the blk_by_qdev_id() function, so before we can use the file in tools (i.e. outside of the system emulator), we need to add a stub for it. The function always returns an error. Signed-off-by: Kevin Wolf --- stubs/blk-by-qdev-id.c | 9 + stubs/Makefile.objs| 1 + 2

[RFC PATCH 07/18] blockdev-nbd: Boxed argument type for nbd-server-add

2019-10-17 Thread Kevin Wolf
Move the arguments of nbd-server-add to a new struct BlockExportNbd and convert the command to 'boxed': true. This makes it easier to share code with the storage daemon. Signed-off-by: Kevin Wolf --- qapi/block.json| 20 +++- blockdev-nbd.c | 25 -

[RFC PATCH 09/18] qemu-storage-daemon: Add main loop

2019-10-17 Thread Kevin Wolf
Instead of exiting after processing all command line options, start a main loop and keep processing events until exit is requested with a signal (e.g. SIGINT). Now qemu-storage-daemon can be used as an alternative for qemu-nbd that provides a few features that were previously only available from

[RFC PATCH 14/18] monitor: Create monitor/qmp-cmds-monitor.c

2019-10-17 Thread Kevin Wolf
Move all of the QMP commands handlers to implement the 'monitor' module (qapi/monitor.json) that can be shared between the system emulator and the storage daemon to a new file monitor/qmp-cmds-monitor.c. Signed-off-by: Kevin Wolf --- monitor/misc.c | 110 --

[RFC PATCH 16/18] qapi: Create 'pragma' module

2019-10-17 Thread Kevin Wolf
We want to share the whitelists between the system emulator schema and the storage daemon schema, so move all the pragmas from the main schema file into a separate file that can be included from both. Signed-off-by: Kevin Wolf --- qapi/pragma.json | 24

[RFC PATCH 17/18] monitor: Move qmp_query_qmp_schema to qmp-cmds-monitor.c

2019-10-17 Thread Kevin Wolf
monitor/misc.c contains code that works only in the system emulator, so it can't be linked to the storage daemon. In order to make schema introspection available for the storage daemon, move the function to monitor/qmp-cmds-monitor.c, which can be linked into the storage daemon. Signed-off-by:

[RFC PATCH 15/18] qapi: Support empty modules

2019-10-17 Thread Kevin Wolf
If you added an include file that doesn't contain any definitions, no source files would be generated for it. However, in other source files, you would still get an #include for the header files of the empty module. The intended behaviour is that empty source files are created for empty modules.

[RFC PATCH 18/18] qemu-storage-daemon: Add --monitor option

2019-10-17 Thread Kevin Wolf
This adds and parses the --monitor option, so that a QMP monitor can be used in the storage daemon. The monitor offers commands defined in the QAPI schema at storage-daemon/qapi/qapi-schema.json. Signed-off-by: Kevin Wolf --- storage-daemon/qapi/qapi-schema.json | 15

Re: [PATCH v2 3/3] tests: More iotest 223 improvements

2019-10-17 Thread Max Reitz
On 15.10.19 21:35, Eric Blake wrote: > Run the core of the test twice, once without iothreads, and again > with, for more coverage of both setups. > > Suggested-by: Nir Soffer > Signed-off-by: Eric Blake > --- > tests/qemu-iotests/223 | 16 ++- > tests/qemu-iotests/223.out | 85

Re: [PATCH 02/10] image-fuzzer: Write bytes instead of string to image file

2019-10-17 Thread Philippe Mathieu-Daudé
On 10/16/19 9:24 PM, Eduardo Habkost wrote: This is necessary for Python 3 compatibility. Signed-off-by: Eduardo Habkost --- tests/image-fuzzer/qcow2/layout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/image-fuzzer/qcow2/layout.py

Re: iotest 260 failure (linux host): "OSError: AF_UNIX path too long"

2019-10-17 Thread Max Reitz
On 17.10.19 12:04, Peter Maydell wrote: > On Thu, 17 Oct 2019 at 10:53, Max Reitz wrote: >> >> On 17.10.19 11:51, Peter Maydell wrote: >>> I just got this iotest 260 failure processing an >>> unrelated merge on my x86-64 Ubuntu box. I assume >>> it's an intermittent (have just kicked off a retry)

iotest 260 failure (linux host): "OSError: AF_UNIX path too long"

2019-10-17 Thread Peter Maydell
I just got this iotest 260 failure processing an unrelated merge on my x86-64 Ubuntu box. I assume it's an intermittent (have just kicked off a retry) but post the backtrace in case it's of interest: TESTiotest-qcow2: 260 [fail] QEMU --

Re: iotest 260 failure (linux host): "OSError: AF_UNIX path too long"

2019-10-17 Thread Max Reitz
On 17.10.19 11:51, Peter Maydell wrote: > I just got this iotest 260 failure processing an > unrelated merge on my x86-64 Ubuntu box. I assume > it's an intermittent (have just kicked off a retry) but > post the backtrace in case it's of interest: I hope it’s intermittent, although I presume it

Re: iotest 260 failure (linux host): "OSError: AF_UNIX path too long"

2019-10-17 Thread Peter Maydell
On Thu, 17 Oct 2019 at 10:53, Max Reitz wrote: > > On 17.10.19 11:51, Peter Maydell wrote: > > I just got this iotest 260 failure processing an > > unrelated merge on my x86-64 Ubuntu box. I assume > > it's an intermittent (have just kicked off a retry) but > > post the backtrace in case it's of

Re: [PATCH 07/10] image-fuzzer: Use bytes constant for field values

2019-10-17 Thread Philippe Mathieu-Daudé
On 10/16/19 9:24 PM, Eduardo Habkost wrote: Field values are supposed to be bytes objects, not unicode strings. Change two constants that were declared as strings. Signed-off-by: Eduardo Habkost --- tests/image-fuzzer/qcow2/layout.py | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH 01/10] image-fuzzer: Open image files in binary mode

2019-10-17 Thread Philippe Mathieu-Daudé
On 10/16/19 9:24 PM, Eduardo Habkost wrote: This probably never caused problems because on Linux there's no actual newline conversion happening, but on Python 3 the binary/text distinction is stronger and we must explicitly open the image file in binary mode. Signed-off-by: Eduardo Habkost ---

Re: [PATCH v2 15/23] iotests/201: Create socket in $SOCK_DIR

2019-10-17 Thread Thomas Huth
On 17/10/2019 15.31, Max Reitz wrote: > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > --- > tests/qemu-iotests/201 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qemu-iotests/201 b/tests/qemu-iotests/201 > index 7abf740fe4..86fa37e714 100755 > ---

Re: [PATCH v2 05/23] iotests: Let common.nbd create socket in $SOCK_DIR

2019-10-17 Thread Thomas Huth
On 17/10/2019 15.31, Max Reitz wrote: > In addition, drop the nbd_unix_socket assignment in 241 because it does > not really do anything. Right, common.nbd is included afterwards, so it gets overwritten. Reviewed-by: Thomas Huth

Re: iotest failure -- test possibly not using sufficiently unique temp filename?

2019-10-17 Thread Peter Maydell
On Fri, 27 Sep 2019 at 17:44, Max Reitz wrote: > > On 27.09.19 18:39, Peter Maydell wrote: > > Hi; I just saw this iotest failure (on an s390x box, as it happens): > > > > TESTiotest-qcow2: 130 [fail] > > QEMU -- > >

Re: [PATCH v2 00/23] iotests: Add and use $SOCK_DIR

2019-10-17 Thread Eric Blake
On 10/17/19 8:31 AM, Max Reitz wrote: Hi, Perhaps the main reason we cannot run important tests such as 041 in CI is that when they care Unix sockets in $TEST_DIR, the path may become too long to connect to them. To get by this problem, this series lets the check script create a new temporary

Re: [PATCH v2 13/23] iotests/192: Create socket in $SOCK_DIR

2019-10-17 Thread Thomas Huth
On 17/10/2019 15.31, Max Reitz wrote: > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > --- > tests/qemu-iotests/192 | 4 ++-- > tests/qemu-iotests/192.out | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Thomas Huth

Re: [PATCH v2 21/23] iotests/240: Create socket in $SOCK_DIR

2019-10-17 Thread Thomas Huth
On 17/10/2019 15.31, Max Reitz wrote: > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > --- > tests/qemu-iotests/240 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Thomas Huth

Re: [PATCH v4 3/4] tests/qemu-iotests: add case to write compressed data of multiple clusters

2019-10-17 Thread Vladimir Sementsov-Ogievskiy
16.10.2019 19:28, Andrey Shinkevich wrote: > Add the test case to the iotest #214 that checks possibility of writing > compressed data of more than one cluster size. > > Signed-off-by: Andrey Shinkevich > --- > tests/qemu-iotests/214 | 35 +++ >

Re: [PATCH v4 4/4] tests/qemu-iotests: add case for block-stream compress

2019-10-17 Thread Vladimir Sementsov-Ogievskiy
16.10.2019 19:28, Andrey Shinkevich wrote: > Add a case to the iotest #030 that tests the 'compress' option for a > block-stream job. > > Signed-off-by: Andrey Shinkevich > --- > tests/qemu-iotests/030 | 51 > +- > tests/qemu-iotests/030.out |

Re: [PATCH v2 04/23] iotests: Filter $SOCK_DIR

2019-10-17 Thread Thomas Huth
On 17/10/2019 15.31, Max Reitz wrote: > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > --- > tests/qemu-iotests/common.filter | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Thomas Huth

Re: [PATCH v2 16/23] iotests/205: Create socket in $SOCK_DIR

2019-10-17 Thread Thomas Huth
On 17/10/2019 15.31, Max Reitz wrote: > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > --- > tests/qemu-iotests/205 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qemu-iotests/205 b/tests/qemu-iotests/205 > index 76f6c5fa2b..4bb2c21e8b 100755 > ---

Re: [PATCH v2 23/23] iotests: Drop TEST_DIR filter from _filter_nbd

2019-10-17 Thread Thomas Huth
On 17/10/2019 15.31, Max Reitz wrote: > Sockets should be placed into $SOCK_DIR instead of $TEST_DIR, so remove > the $TEST_DIR filter from _filter_nbd. > > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > --- > tests/qemu-iotests/common.filter | 1 - > 1 file changed, 1 deletion(-) > >

Re: [PATCH v2 22/23] iotests/267: Create socket in $SOCK_DIR

2019-10-17 Thread Thomas Huth
On 17/10/2019 15.31, Max Reitz wrote: > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > --- > tests/qemu-iotests/267 | 4 ++-- > tests/qemu-iotests/267.out | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Thomas Huth

Re: [PATCH v4 1/4] block: support compressed write at generic layer

2019-10-17 Thread Vladimir Sementsov-Ogievskiy
16.10.2019 19:28, Andrey Shinkevich wrote: > To inform the block layer about writing all the data compressed, we > introduce the 'compress' command line option. Based on that option, the > written data will be aligned by the cluster size at the generic layer. > > Suggested-by: Roman Kagan >

Re: [PATCH v2 20/23] iotests/223: Create socket in $SOCK_DIR

2019-10-17 Thread Thomas Huth
On 17/10/2019 15.31, Max Reitz wrote: > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > --- > tests/qemu-iotests/223 | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) Reviewed-by: Thomas Huth

Re: [PATCH v4 2/4] qcow2: Allow writing compressed data of multiple clusters

2019-10-17 Thread Vladimir Sementsov-Ogievskiy
16.10.2019 19:28, Andrey Shinkevich wrote: > QEMU currently supports writing compressed data of the size equal to > one cluster. This patch allows writing QCOW2 compressed data that > exceed one cluster. Now, we split buffered data into separate clusters > and write them compressed using the

Re: [PATCH 00/10] image-fuzzer: Port to Python 3

2019-10-17 Thread John Snow
On 10/16/19 3:24 PM, Eduardo Habkost wrote: > This series ports image-fuzzer to Python 3. > > Eduardo Habkost (10): > image-fuzzer: Open image files in binary mode > image-fuzzer: Write bytes instead of string to image file > image-fuzzer: Explicitly use integer division operator >

Re: [PATCH 05/10] image-fuzzer: Use %r for all fiels at Field.__repr__()

2019-10-17 Thread John Snow
"fields" in the commit message. On 10/16/19 3:24 PM, Eduardo Habkost wrote: > This makes the formatting code simpler, and safer if we change > the type of self.value from str to bytes. > > Signed-off-by: Eduardo Habkost > --- > tests/image-fuzzer/qcow2/layout.py | 4 ++-- > 1 file changed, 2

Re: [PULL v2 00/19] Bitmaps patches

2019-10-17 Thread John Snow
On 10/17/19 7:07 AM, Peter Maydell wrote: > On Mon, 14 Oct 2019 at 20:29, John Snow wrote: >> >> The following changes since commit c760cb77e511eb05094df67c1b30029a952efa35: >> >> Merge remote-tracking branch >> 'remotes/dgilbert/tags/pull-migration-20191011a' into staging (2019-10-14 >>

[PULL v3 01/19] util/hbitmap: strict hbitmap_reset

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy hbitmap_reset has an unobvious property: it rounds requested region up. It may provoke bugs, like in recently fixed write-blocking mode of mirror: user calls reset on unaligned region, not keeping in mind that there are possible unrelated dirty bytes, covered

[PULL v3 00/19] Bitmaps patches

2019-10-17 Thread John Snow
The following changes since commit f22f553efffd083ff624be116726f843a39f1148: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20191013' into staging (2019-10-17 16:48:56 +0100) are available in the Git repository at: https://github.com/jnsnow/qemu.git tags/bitmaps-pull-request for

[PULL v3 02/19] block: move bdrv_can_store_new_dirty_bitmap to block/dirty-bitmap.c

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy block/dirty-bitmap.c seems to be more appropriate for it and bdrv_remove_persistent_dirty_bitmap already in it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 20190920082543.23444-2-vsement...@virtuozzo.com Signed-off-by: John

[PULL v3 05/19] block/dirty-bitmap: drop meta

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Drop meta bitmaps, as they are unused. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 20190916141911.5255-2-vsement...@virtuozzo.com Signed-off-by: John Snow --- include/block/dirty-bitmap.h | 5 block/dirty-bitmap.c

[PULL v3 03/19] block/dirty-bitmap: return int from bdrv_remove_persistent_dirty_bitmap

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy It's more comfortable to not deal with local_err. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 20190920082543.23444-3-vsement...@virtuozzo.com Signed-off-by: John Snow --- block/qcow2.h| 5 ++---

[PULL v3 04/19] block/qcow2: proper locking on bitmap add/remove paths

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy qmp_block_dirty_bitmap_add and do_block_dirty_bitmap_remove do acquire aio context since 0a6c86d024c52b. But this is not enough: we also must lock qcow2 mutex when access in-image metadata. Especially it concerns freeing qcow2 clusters. To achieve this, move

[PULL v3 09/19] block: switch reopen queue from QSIMPLEQ to QTAILQ

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy We'll need reverse-foreach in the following commit, QTAILQ support it, so move to QTAILQ. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20190927122355.7344-2-vsement...@virtuozzo.com Signed-off-by: John Snow ---

[PULL v3 11/19] iotests: add test-case to 165 to test reopening qcow2 bitmaps to RW

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Reopening bitmaps to RW was broken prior to previous commit. Check that it works now. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20190927122355.7344-4-vsement...@virtuozzo.com Signed-off-by: John Snow --- tests/qemu-iotests/165 | 57

[PULL v3 08/19] block/dirty-bitmap: refactor bdrv_dirty_bitmap_next

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy bdrv_dirty_bitmap_next is always used in same pattern. So, split it into _next and _first, instead of combining two functions into one and add FOR_EACH_DIRTY_BITMAP macro. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id:

[PULL v3 16/19] block/qcow2-bitmap: fix and improve qcow2_reopen_bitmaps_rw

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy - Correct check for write access to file child, and in correct place (only if we want to write). - Support reopen rw -> rw (which will be used in following commit), for example, !bdrv_dirty_bitmap_readonly() is not a corruption if bitmap is marked IN_USE

[PULL v3 13/19] block/qcow2-bitmap: drop qcow2_reopen_bitmaps_rw_hint()

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy The function is unused, drop it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 20190927122355.7344-6-vsement...@virtuozzo.com Signed-off-by: John Snow --- block/qcow2.h| 2 -- block/qcow2-bitmap.c | 15

[PULL v3 19/19] dirty-bitmaps: remove deprecated autoload parameter

2019-10-17 Thread John Snow
This parameter has been deprecated since 2.12.0 and is eligible for removal. Remove this parameter as it is actually completely ignored; let's not give false hope. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id:

Re: [PATCH 00/10] image-fuzzer: Port to Python 3

2019-10-17 Thread Eduardo Habkost
On Thu, Oct 17, 2019 at 05:11:29PM -0400, John Snow wrote: > > > On 10/16/19 3:24 PM, Eduardo Habkost wrote: > > This series ports image-fuzzer to Python 3. > > > > Eduardo Habkost (10): > > image-fuzzer: Open image files in binary mode > > image-fuzzer: Write bytes instead of string to

[PULL v3 10/19] block: reverse order for reopen commits

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy It's needed to fix reopening qcow2 with bitmaps to RW. Currently it can't work, as qcow2 needs write access to file child, to mark bitmaps in-image with IN_USE flag. But usually children goes after parents in reopen queue and file child is still RO on qcow2

[PULL v3 12/19] block/qcow2-bitmap: get rid of bdrv_has_changed_persistent_bitmaps

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Firstly, no reason to optimize failure path. Then, function name is ambiguous: it checks for readonly and similar things, but someone may think that it will ignore normal bitmaps which was just unchanged, and this is in bad relation with the fact that we should

[PULL v3 06/19] block/dirty-bitmap: add bs link

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Add bs field to BdrvDirtyBitmap structure. Drop BlockDriverState parameter from bitmap APIs where possible. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 20190916141911.5255-3-vsement...@virtuozzo.com [Rebased on top of

[PULL v3 07/19] block/dirty-bitmap: drop BdrvDirtyBitmap.mutex

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy mutex field is just a pointer to bs->dirty_bitmap_mutex, so no needs to store it in BdrvDirtyBitmap when we have bs pointer in it (since previous patch). Drop mutex field. Constantly use bdrv_dirty_bitmaps_lock/unlock in block/dirty-bitmap.c to make it more

[PULL v3 14/19] block/qcow2-bitmap: do not remove bitmaps on reopen-ro

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy qcow2_reopen_bitmaps_ro wants to store bitmaps and then mark them all readonly. But the latter don't work, as qcow2_store_persistent_dirty_bitmaps removes bitmaps after storing. It's OK for inactivation but bad idea for reopen-ro. And this leads to the

[PULL v3 17/19] qcow2-bitmap: move bitmap reopen-rw code to qcow2_reopen_commit

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy The only reason I can imagine for this strange code at the very-end of bdrv_reopen_commit is the fact that bs->read_only updated after calling drv->bdrv_reopen_commit in bdrv_reopen_commit. And in the same time, prior to previous commit, qcow2_reopen_bitmaps_rw

[PULL v3 15/19] iotests: add test 260 to check bitmap life after snapshot + commit

2019-10-17 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20190927122355.7344-8-vsement...@virtuozzo.com [Maintainer edit: removed 260 from auto group per Peter Maydell. --js] Signed-off-by: John Snow --- tests/qemu-iotests/260 | 89

  1   2   >