Re: [PATCH 1/1] iotests: fix 051.out expected output after error text touchups

2021-03-23 Thread John Snow
On 3/18/21 4:09 PM, Connor Kuehl wrote: A patch was recently applied that touched up some error messages that pertained to key names like 'node-name'. The trouble is it only updated tests/qemu-iotests/051.pc.out and not tests/qemu-iotests/051.out as well. Do that now. Fixes: 785ec4b1b9

Re: [PATCH v2 4/5] qemu-iotests: let "check" spawn an arbitrary test command

2021-03-23 Thread Paolo Bonzini
On 23/03/21 20:12, Vladimir Sementsov-Ogievskiy wrote: Move the trailing empty line to print_env(), since it always looks better and one caller was not adding it. Seems you've moved this fix from one unrelated commit to another.. And it touches two extra files. I'd just make it a separate

Re: [PATCH v2 2/5] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Paolo Bonzini
On 23/03/21 20:17, Vladimir Sementsov-Ogievskiy wrote: +    unittest.main(argv=argv, +  testRunner=ReproducibleTestRunner, +  verbosity=2 if debug else 1, +  warnings=None if sys.warnoptions else 'ignore')   def

Re: [PATCH v2 1/5] qemu-iotests: do not buffer the test output

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 21:19, Paolo Bonzini wrote: Instead of buffering the test output into a StringIO, patch it on the fly by wrapping sys.stdout's write method. This can be done unconditionally, even if using -d, which makes execute_unittest a bit simpler. Signed-off-by: Paolo Bonzini Reviewed-by:

Re: [PATCH v2 1/5] qemu-iotests: do not buffer the test output

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 21:54, Vladimir Sementsov-Ogievskiy wrote: +class ReproducibleTestRunner(unittest.TextTestRunner): +    def __init__(self, stream: Optional[io.TextIOBase] = None, + resultclass: Type = ReproducibleTestResult, *args, **kwargs): actually, neither stream nor resultclass

Re: [PATCH v2 2/5] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 21:19, Paolo Bonzini wrote: Python test scripts that use unittest consist of multiple tests. unittest.main allows selecting which tests to run, but currently this is not possible because the iotests wrapper ignores sys.argv. unittest.main command line options also allow the user to

Re: [PATCH v2 4/5] qemu-iotests: let "check" spawn an arbitrary test command

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 21:19, Paolo Bonzini wrote: Right now there is no easy way for "check" to print a reproducer command. Because such a reproducer command line would be huge, we can instead teach check to start a command of our choice. This can be for example a Python unit test with arguments to only

[PATCH v2 4/5] qemu-iotests: let "check" spawn an arbitrary test command

2021-03-23 Thread Paolo Bonzini
Right now there is no easy way for "check" to print a reproducer command. Because such a reproducer command line would be huge, we can instead teach check to start a command of our choice. This can be for example a Python unit test with arguments to only run a specific subtest. Move the trailing

[PATCH v2 0/5] qemu-iotests: quality of life improvements

2021-03-23 Thread Paolo Bonzini
This series adds a few usability improvements to qemu-iotests, in particular: - arguments can be passed to Python unittests scripts, for example to run only a subset of the test cases (patches 1-2) - it is possible to do "./check -- ../../../tests/qemu-iotests/055 args..." and specify

[PATCH v2 3/5] qemu-iotests: move command line and environment handling from TestRunner to TestEnv

2021-03-23 Thread Paolo Bonzini
In the next patch, "check" will learn how to execute a test script without going through TestRunner. To enable this, keep only the text output and subprocess handling in the TestRunner; move into TestEnv the logic to prepare for running a subprocess. Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH v2 5/5] qemu-iotests: fix case of SOCK_DIR already in the environment

2021-03-23 Thread Paolo Bonzini
Due to a typo, in this case the SOCK_DIR was not being created. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Paolo Bonzini --- tests/qemu-iotests/testenv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/testenv.py

[PATCH v2 1/5] qemu-iotests: do not buffer the test output

2021-03-23 Thread Paolo Bonzini
Instead of buffering the test output into a StringIO, patch it on the fly by wrapping sys.stdout's write method. This can be done unconditionally, even if using -d, which makes execute_unittest a bit simpler. Signed-off-by: Paolo Bonzini --- tests/qemu-iotests/iotests.py | 68

Re: [PATCH v2 2/5] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 21:19, Paolo Bonzini wrote: Python test scripts that use unittest consist of multiple tests. unittest.main allows selecting which tests to run, but currently this is not possible because the iotests wrapper ignores sys.argv. unittest.main command line options also allow the user to

Re: [PATCH 3/4] qemu-iotests: let "check" spawn an arbitrary test command

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 20:22, Paolo Bonzini wrote: On 23/03/21 18:11, Vladimir Sementsov-Ogievskiy wrote: If you have positional arguments that must begin with - and don’t look like negative numbers, you can insert the pseudo-argument '--' which tells parse_args() that everything after that is a

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Paolo Bonzini
On 23/03/21 18:27, Vladimir Sementsov-Ogievskiy wrote: Sounds good :) We'll see dots appearing dynamically during test run, yes? Yes, exactly! :) Paolo

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 20:04, Paolo Bonzini wrote: On 23/03/21 17:56, Vladimir Sementsov-Ogievskiy wrote: hmm, just use a separate call of unittest.main, or honestly define a varaible as Union[] or just Any ? All the ugliness goes away if the implementation is done properly. :) For me normal

Re: [PATCH 3/4] qemu-iotests: let "check" spawn an arbitrary test command

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 20:00, Paolo Bonzini wrote: On 23/03/21 17:43, Vladimir Sementsov-Ogievskiy wrote: Interesting that REMAINDER documentation disappeared from latest (3.9) python documentation https://docs.python.org/3.9/library/argparse.html , but exists here

[PATCH v2 2/5] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Paolo Bonzini
Python test scripts that use unittest consist of multiple tests. unittest.main allows selecting which tests to run, but currently this is not possible because the iotests wrapper ignores sys.argv. unittest.main command line options also allow the user to pick the desired options for verbosity,

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Paolo Bonzini
On 23/03/21 17:56, Vladimir Sementsov-Ogievskiy wrote: hmm, just use a separate call of unittest.main, or honestly define a varaible as Union[] or just Any ? All the ugliness goes away if the implementation is done properly. :) For me normal try-finally is a lot more clean than calling

Re: [PATCH 3/4] qemu-iotests: let "check" spawn an arbitrary test command

2021-03-23 Thread Paolo Bonzini
On 23/03/21 17:43, Vladimir Sementsov-Ogievskiy wrote: Interesting that REMAINDER documentation disappeared from latest (3.9) python documentation https://docs.python.org/3.9/library/argparse.html , but exists here https://docs.python.org/3.8/library/argparse.html  (and no mark of

[PATCH v2 21/22] iotests: iothreads need ioeventfd

2021-03-23 Thread Alex Bennée
From: Laurent Vivier And ioeventfd are only available with virtio-scsi-pci or virtio-scsi-ccw, use the alias but add a rule to require virtio-scsi-pci or virtio-scsi-ccw for the tests that use iothreads. Signed-off-by: Laurent Vivier Reviewed-by: Thomas Huth Message-Id:

[PATCH v2 19/22] iotests: Revert "iotests: use -ccw on s390x for 040, 139, and 182"

2021-03-23 Thread Alex Bennée
From: Laurent Vivier Commit f1d5516ab583 introduces a test in some iotests to check if the machine is a s390-ccw-virtio and to select virtio-*-ccw rather than virtio-*-pci. We don't need that because QEMU already provides aliases to use the correct virtio interface according to the machine

[PATCH v2 20/22] iotests: test m68k with the virt machine

2021-03-23 Thread Alex Bennée
From: Laurent Vivier This allows to cover the virtio tests with a 32bit big-endian virtio-mmio machine. Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck Message-Id: <20210319202335.2397060-6-laur...@vivier.eu> Signed-off-by: Alex Bennée ---

[PATCH v2 18/22] blockdev: with -drive if=virtio, use generic virtio-blk

2021-03-23 Thread Alex Bennée
From: Laurent Vivier Rather than checking if the machine is an s390x to use virtio-blk-ccw instead of virtio-blk-pci, use the alias virtio-blk that is set to the expected target. This also enables the use of virtio-blk-device for targets without PCI or CCW. Signed-off-by: Laurent Vivier

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 18:29, Paolo Bonzini wrote: On 23/03/21 15:34, Vladimir Sementsov-Ogievskiy wrote: +    def __init__(self, *args, **kwargs): +    super().__init__(stream=ReproducibleTextTestRunner.output, *args, **kwargs) over-79 line (PEP8) Ok, thanks. + +def execute_unittest(argv,

Re: [PATCH 3/4] qemu-iotests: let "check" spawn an arbitrary test command

2021-03-23 Thread Paolo Bonzini
On 23/03/21 18:11, Vladimir Sementsov-Ogievskiy wrote: If you have positional arguments that must begin with - and don’t look like negative numbers, you can insert the pseudo-argument '--' which tells parse_args() that everything after that is a positional argument: So, as I understand

Re: [PATCH 4/4] qemu-iotests: fix case of SOCK_DIR already in the environment

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 16:06, Paolo Bonzini wrote: Due to a typo, in this case the SOCK_DIR was not being created. Signed-off-by: Paolo Bonzini --- tests/qemu-iotests/testenv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/testenv.py

Re: [PATCH 2/4] qemu-iotests: move command line and environment handling from TestRunner to TestEnv

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 16:06, Paolo Bonzini wrote: In the next patch, "check" will learn how to execute a test script without going through TestRunner. To enable this, keep only the text output and subprocess handling in the TestRunner; move into TestEnv the logic to prepare for running a subprocess.

Re: [PATCH 3/4] qemu-iotests: let "check" spawn an arbitrary test command

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 16:06, Paolo Bonzini wrote: Right now there is no easy way for "check" to print a reproducer command. Because such a reproducer command line would be huge, we can instead teach check to start a command of our choice. This can be for example a Python unit test with arguments to only

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 18:29, Paolo Bonzini wrote: On 23/03/21 15:34, Vladimir Sementsov-Ogievskiy wrote: +    def __init__(self, *args, **kwargs): +    super().__init__(stream=ReproducibleTextTestRunner.output, *args, **kwargs) over-79 line (PEP8) Ok, thanks. + +def execute_unittest(argv,

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Paolo Bonzini
On 23/03/21 15:34, Vladimir Sementsov-Ogievskiy wrote: +    def __init__(self, *args, **kwargs): +    super().__init__(stream=ReproducibleTextTestRunner.output, *args, **kwargs) over-79 line (PEP8) Ok, thanks. + +def execute_unittest(argv, debug=False): +    """Executes unittests

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 16:06, Paolo Bonzini wrote: Python test scripts that use unittest consist of multiple tests. unittest.main allows selecting which tests to run, but currently this is not possible because the iotests wrapper ignores sys.argv. unittest.main command line options also allow the user to

[PATCH v3 8/9] simplebench/bench-backup: add --drop-caches argument

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Add an option to drop caches before each test run. It may probably improve reliability of results when testing in cached mode. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/simplebench/bench-backup.py | 6 +- scripts/simplebench/simplebench.py | 11 ++- 2 files changed,

[PATCH v3 7/9] simplebench/bench-backup: add --count and --no-initial-run

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Add arguments to set number of test runs per table cell and to disable initial run that is not counted in results. It's convenient to set --count 1 --no-initial-run to fast run test onece, and to set --count to some large enough number for good precision of the results. Signed-off-by: Vladimir

[PATCH v3 5/9] simplebench/bench_block_job: handle error in BLOCK_JOB_COMPLETED

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
We should not report success if there is an error in final event. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- scripts/simplebench/bench_block_job.py | 4 1 file changed, 4 insertions(+) diff --git a/scripts/simplebench/bench_block_job.py

[PATCH v3 2/9] simplebench: bench_one(): support count=1

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
statistics.stdev raises if sequence length is less than two. Support that case by hand. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- scripts/simplebench/simplebench.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH v3 9/9] MAINTAINERS: update Benchmark util: add git tree

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9147e9a429..7d83d64d14 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2531,6 +2531,7 @@ Benchmark util M: Vladimir Sementsov-Ogievskiy S: Maintained

[PATCH v3 6/9] simplebench/bench-backup: support qcow2 source files

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Add support for qcow2 source. New option says to use test-source.qcow2 instead of test-source. Of course, test-source.qcow2 should be precreated. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- scripts/simplebench/bench-backup.py| 5 +

[PATCH v3 3/9] simplebench/bench-backup: add --compressed option

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Allow bench compressed backup. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/simplebench/bench-backup.py| 55 ++ scripts/simplebench/bench_block_job.py | 23 +++ 2 files changed, 62 insertions(+), 16 deletions(-) diff --git

[PATCH v3 4/9] simplebench/bench-backup: add target-cache argument

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Allow benchmark with different kinds of target cache. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- scripts/simplebench/bench-backup.py| 33 -- scripts/simplebench/bench_block_job.py | 10 +--- 2 files changed, 33 insertions(+), 10

[PATCH v3 1/9] simplebench: bench_one(): add slow_limit argument

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Sometimes one of cells in a testing table runs too slow. And we really don't want to wait so long. Limit number of runs in this case. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/simplebench/simplebench.py | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff

[PATCH v3 0/9] simplebench improvements

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here are some improvements to simplebench lib, to support my "qcow2: compressed write cache" series. v3: 01: use simpler logic 02,04-06: add John's r-b 07: use BooleanOptionalAction and initial_run=args.initial_run 08: rewrite so that we have a new --drop-caches option Vladimir

[PATCH 3/4] qemu-iotests: let "check" spawn an arbitrary test command

2021-03-23 Thread Paolo Bonzini
Right now there is no easy way for "check" to print a reproducer command. Because such a reproducer command line would be huge, we can instead teach check to start a command of our choice. This can be for example a Python unit test with arguments to only run a specific subtest. Signed-off-by:

[PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Paolo Bonzini
Python test scripts that use unittest consist of multiple tests. unittest.main allows selecting which tests to run, but currently this is not possible because the iotests wrapper ignores sys.argv. unittest.main command line options also allow the user to pick the desired options for verbosity,

[PATCH 0/4] qemu-iotests: quality of life improvements

2021-03-23 Thread Paolo Bonzini
This series adds a few usability improvements to qemu-iotests, in particular: - arguments can be passed to Python unittests scripts, for example to run only a subset of the test cases (patch 1) - it is possible to do "./check -- ../../../tests/qemu-iotests/055 args..." and specify arbitrary

[PATCH 4/4] qemu-iotests: fix case of SOCK_DIR already in the environment

2021-03-23 Thread Paolo Bonzini
Due to a typo, in this case the SOCK_DIR was not being created. Signed-off-by: Paolo Bonzini --- tests/qemu-iotests/testenv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py index 6767eeeb25..169268f61a 100644

[PATCH 2/4] qemu-iotests: move command line and environment handling from TestRunner to TestEnv

2021-03-23 Thread Paolo Bonzini
In the next patch, "check" will learn how to execute a test script without going through TestRunner. To enable this, keep only the text output and subprocess handling in the TestRunner; move into TestEnv the logic to prepare for running a subprocess. Signed-off-by: Paolo Bonzini ---

Re: "make check" broken with everything but tools disabled

2021-03-23 Thread Claudio Fontana
On 3/18/21 11:03 AM, Paolo Bonzini wrote: > On 18/03/21 10:16, Claudio Fontana wrote: >> my experience with the new build system (meson-based), is that I have to do: >> >> make >> >> first, and then >> >> make check >> >> later, or bugs start happening > > This shouldn't be needed. > > Paolo >

Re: [PATCH] hw/block/nvme: remove description for zoned.append_size_limit

2021-03-23 Thread Klaus Jensen
On Mar 23 11:18, Niklas Cassel wrote: > From: Niklas Cassel > > The description was originally removed in commit 578d914b263c > ("hw/block/nvme: align zoned.zasl with mdts") together with the removal > of the zoned.append_size_limit parameter itself. > > However, it was (most likely

[PATCH] hw/block/nvme: remove description for zoned.append_size_limit

2021-03-23 Thread Niklas Cassel
From: Niklas Cassel The description was originally removed in commit 578d914b263c ("hw/block/nvme: align zoned.zasl with mdts") together with the removal of the zoned.append_size_limit parameter itself. However, it was (most likely accidentally), re-added in commit f7dcd31885cb ("hw/block/nvme:

Re: [PULL 0/7] SD/MMC patches for 2021-03-21

2021-03-23 Thread Peter Maydell
On Mon, 22 Mar 2021 at 17:23, Philippe Mathieu-Daudé wrote: > > The following changes since commit b184750926812cb78ac0caf4c4b2b13683b5bde3: > > Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into > staging (2021-03-22 11:24:55 +) > > are available in the Git

Re: [PATCH] block: Remove monitor command block_passwd

2021-03-23 Thread Daniel P . Berrangé
On Tue, Mar 23, 2021 at 11:19:51AM +0100, Markus Armbruster wrote: > Command block_passwd always fails since > > Commit c01c214b69 "block: remove all encryption handling APIs" > (v2.10.0) turned block_passwd into a stub that always fails, and > hardcoded encryption_key_missing to false in

[PATCH] block: Remove monitor command block_passwd

2021-03-23 Thread Markus Armbruster
Command block_passwd always fails since Commit c01c214b69 "block: remove all encryption handling APIs" (v2.10.0) turned block_passwd into a stub that always fails, and hardcoded encryption_key_missing to false in query-named-block-nodes and query-block. Commit ad1324e044 "block: remove

Re: [RFC v5 1/6] qmp: add QMP command x-debug-query-virtio

2021-03-23 Thread Jonah Palmer
On 3/18/21 4:46 PM, Eric Blake wrote: On 3/18/21 11:29 AM, Jonah Palmer wrote: From: Laurent Vivier This new command lists all the instances of VirtIODevice with their path and virtio type Signed-off-by: Laurent Vivier Reviewed-by: Eric Blake Signed-off-by: Jonah Palmer --- We've missed