- Sep 29, 2021
-
-
Nir Soffer authored
Both qemu and qemu-img use writeback cache mode by default, which is already documented in qemu(1). qemu-nbd uses writethrough cache mode by default, and the default cache mode is not documented. According to the qemu-nbd(8): --cache=CACHE The cache mode to be used with the file. See the documentation of the emulator's -drive cache=... option for allowed values. qemu(1) says: The default mode is cache=writeback. So users have no reason to assume that qemu-nbd is using writethough cache mode. The only hint is the painfully slow writing when using the defaults. Looking in git history, it seems that qemu used writethrough in the past to support broken guests that did not flush data properly, or could not flush due to limitations in qemu. But qemu-nbd clients can use NBD_CMD_FLUSH to flush data, so using writethrough does not help anyone. Change the default cache mode to writback, and document the default and available values properly in the online help and manual. With this change converting image via qemu-nbd is 3.5 times faster. $ qemu-img create dst.img 50g $ qemu-nbd -t -f raw -k /tmp/nbd.sock dst.img Before this change: $ hyperfine -r3 "./qemu-img convert -p -f raw -O raw -T none -W fedora34.img nbd+unix:///?socket=/tmp/nbd.sock" Benchmark #1: ./qemu-img convert -p -f raw -O raw -T none -W fedora34.img nbd+unix:///?socket=/tmp/nbd.sock Time (mean ± σ): 83.639 s ± 5.970 s [User: 2.733 s, System: 6.112 s] Range (min … max): 76.749 s … 87.245 s 3 runs After this change: $ hyperfine -r3 "./qemu-img convert -p -f raw -O raw -T none -W fedora34.img nbd+unix:///?socket=/tmp/nbd.sock" Benchmark #1: ./qemu-img convert -p -f raw -O raw -T none -W fedora34.img nbd+unix:///?socket=/tmp/nbd.sock Time (mean ± σ): 23.522 s ± 0.433 s [User: 2.083 s, System: 5.475 s] Range (min … max): 23.234 s … 24.019 s 3 runs Users can avoid the issue by using --cache=writeback[1] but the defaults should give good performance for the common use case. [1] https://bugzilla.redhat.com/1990656 Signed-off-by:
Nir Soffer <nsoffer@redhat.com> Message-Id: <20210813205519.50518-1-nsoffer@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> CC: qemu-stable@nongnu.org Signed-off-by:
Eric Blake <eblake@redhat.com>
-
- Sep 28, 2021
-
-
Peter Maydell authored
Python Pull request # gpg: Signature made Mon 27 Sep 2021 20:24:39 BST # gpg: using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full] # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E * remotes/jsnow-gitlab/tags/python-pull-request: (32 commits) python/aqmp-tui: Add syntax highlighting python: add optional pygments dependency python: Add entry point for aqmp-tui python/aqmp-tui: Add AQMP TUI python: Add dependencies for AQMP TUI python/aqmp: Add Coverage.py support python/aqmp: add LineProtocol tests python/aqmp: add AsyncProtocol unit tests python: bump avocado to v90.0 python/aqmp: add scary message python/aqmp: add asyncio_run compatibility wrapper python/aqmp: add _raw() execution interface python/aqmp: add execute() interfaces python/aqmp: Add message routing to QMP protocol python/pylint: disable no-member check python/aqmp: add QMP protocol support python/pylint: disable too-many-function-args python/aqmp: add QMP event support python/aqmp: add well-known QMP object models python/aqmp: add QMP Message format ... Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Sep 27, 2021
-
-
Peter Maydell authored
Integration testing patches - More Linux kernel record/replay tests (Pavel Dovgalyuk) - Various fixes (Willian Rampazzo, Cleber Rosa) - Split machine_ppc.py per machine (David Gibson) - Add AVOCADO_TESTS command line environment variable (Willian Rampazzo) - Test PowerPC PowerNV 8/9 machines (Cédric Le Goater) # gpg: Signature made Mon 27 Sep 2021 18:24:03 BST # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * remotes/philmd/tags/integration-testing-20210927: (22 commits) tests/acceptance: Test powernv machines tests/acceptance/ppc_prep_40p.py: clean up unused import tests/acceptance/ppc_prep_40p.py: NetBSD 7.1.2 location update tests/acceptance/boot_xen.py: removed unused import acceptance/tests/vnc.py: use explicit syntax for enabling passwords Acceptance Tests: improve check-acceptance description qemu: Split machine_ppc.py acceptance tests tests/Makefile: add AVOCADO_TESTS option to make check-acceptance docs/devel/testing: add instruction to run a single acceptance test tests/Makefile: allow control over tags during check-acceptance avocado_qemu: fix inheritance order on LinuxTest class avocado_qemu: explicitly return None to avoid R1710 avocado_qemu: tweak ssh connect method avocado_qemu: fix import module based on isort avocado_qemu: standardize super() call following PEP3135 Acceptance Tests: add standard clean up at test tearDown() Acceptance tests: add myself as a reviewer for the acceptance tests tests/acceptance: Linux boot test for record/replay tests/acceptance: add replay kernel test for alpha tests/acceptance: add replay kernel test for nios2 ... Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Cédric Le Goater authored
Fetch the OpenPOWER images to boot the powernv8 and powernv9 machines with a simple PCI layout. Cc: Cleber Rosa <crosa@redhat.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Wainer dos Santos Moschetta <wainersm@redhat.com> Signed-off-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210817093036.1288791-1-clg@kaod.org>
-
Cleber Rosa authored
Just a removal of an unused imported symbol. Signed-off-by:
Cleber Rosa <crosa@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210924185506.2542588-16-crosa@redhat.com>
-
Cleber Rosa authored
The NetBSD-7.1.2-prep.iso is no longer available on the CDN, but it's still available in the archive. Let's update its location so that users without the file on cache can still fetch it and run the test. Signed-off-by:
Cleber Rosa <crosa@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210924185506.2542588-15-crosa@redhat.com>
-
Cleber Rosa authored
Just a clean up for an unused import. Signed-off-by:
Cleber Rosa <crosa@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210924185506.2542588-13-crosa@redhat.com>
-
Cleber Rosa authored
This matches the command line on 82a17d1d, where the "on" or "off" should be explicitly given. Signed-off-by:
Cleber Rosa <crosa@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210924185506.2542588-9-crosa@redhat.com>
-
Cleber Rosa authored
The "check-acceptance" make rule won't necessarily run *all* available tests, because it employs a filter based on the currently configured targets. This change in the description of the rule makes that behavior extra clear. Signed-off-by:
Cleber Rosa <crosa@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210924185506.2542588-3-crosa@redhat.com>
-
David Gibson authored
machine_ppc.py contains tests for 3 different ppc based machine types. It is listed in MAINTAINERS along with the PPC TCG cpu code. That's not really accurate though, since it's really more about testing those machines than the CPUs. Therefore, split it up into separate files for the separate machine types, and list those along with their machine types in MAINTAINERS. Suggested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210927044808.73391-2-david@gibson.dropbear.id.au>
-
Willian Rampazzo authored
Add the possibility of running all the tests from a single file, or multiple files, running a single test within a file or multiple tests within multiple files using `make check-acceptance` and the AVOCADO_TESTS environment variable. Suggested-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210923161141.232208-4-willianr@redhat.com>
-
Willian Rampazzo authored
Add instructions to the Acceptance tests section about running a single test file or a test within the test file. Signed-off-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210923161141.232208-3-willianr@redhat.com>
-
Willian Rampazzo authored
Although it is possible to run a specific test using the avocado command-line, a user may want to use a specific tag while running the ``make check-acceptance`` during the development or debugging. This allows using the AVOCADO_TAGS environment variable where the user takes total control of which tests should run based on the tags defined. This also makes the check-acceptance command flexible to restrict tests based on tags while running on CI. e.g.: AVOCADO_TAGS="foo bar baz" make check-acceptance Signed-off-by:
Willian Rampazzo <willianr@redhat.com> Tested-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210923161141.232208-2-willianr@redhat.com>
-
Willian Rampazzo authored
Class hierarchy on Python is defined from right to left. Although the current code is not harmful, let's fix it to avoid problems in the future. Signed-off-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210920204932.94132-7-willianr@redhat.com>
-
Willian Rampazzo authored
The linter is complaining the `pick_default_qemu_bin` is not explicitly returning None. Fix it to explicitly return None and avoid R1710 inconsistent-return-statements. Signed-off-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210920204932.94132-6-willianr@redhat.com>
-
Willian Rampazzo authored
The current implementation will crash if the connection fails as the `time` module is not imported. Fix the import problem. While here, tweaks the connection to wait progressively when the connection fails. Signed-off-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> [PMD: Reworded description] Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210920204932.94132-5-willianr@redhat.com>
-
Willian Rampazzo authored
Signed-off-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210920204932.94132-4-willianr@redhat.com>
-
Willian Rampazzo authored
PEP3135 states when calling super(), there is no need to use arguments. This changes the calls on avocado_qemu to standardize according to PEP3135 and avoid warnings from linters. Signed-off-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210920204932.94132-3-willianr@redhat.com>
-
Cleber Rosa authored
The avocado.Test class, used as the basis of the avocado_qemu.Test class, performs a clean of temporary directories up as part of its own tearDown() implementation. But the avocado_qemu.Test class is currently missing the same clean up, as it implemented its own tearDown() method without resorting to the upper class behavior. This brings avocado_qemu.Test behavior in sync with the standard avocado.Test behavior and prevents temporary directories from cluttering the test results directory (unless instructed to do so with Avocado's "--keep-tmp" option). Reported-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Cleber Rosa <crosa@redhat.com> [willianr: respin to new Python super format] Signed-off-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210920204932.94132-2-willianr@redhat.com>
-
Willian Rampazzo authored
Signed-off-by:
Willian Rampazzo <willianr@redhat.com> Acked-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210809192907.42138-1-willianr@redhat.com>
-
Pavel Dovgalyuk authored
This patch adds a test for record/replay, which boots Linux image from the disk and interacts with the network. The idea and code of this test is borrowed from boot_linux.py This test includes only x86_64 platform. Other platforms and machines will be added later after testing and improving record/replay to completely support them. Each test consists of the following phases: - downloading the disk image - recording the execution - replaying the execution Replay does not validates the output, but waits until QEMU finishes the execution. This is reasonable, because QEMU usually hangs when replay goes wrong. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <162737554047.1735673.13133593401566029378.stgit@pasha-ThinkPad-X280>
-
Pavel Dovgalyuk authored
This patch adds record/replay test which boots Linux kernel on alpha platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <162737553482.1735673.10021851966976933952.stgit@pasha-ThinkPad-X280>
-
Pavel Dovgalyuk authored
This patch adds record/replay test which boots Linux kernel on nios2 platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <162737552919.1735673.12493523185952280539.stgit@pasha-ThinkPad-X280>
-
Pavel Dovgalyuk authored
This patch adds record/replay test which boots Linux kernel on openrisc platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <162737552350.1735673.14603125561530143423.stgit@pasha-ThinkPad-X280>
-
Pavel Dovgalyuk authored
This patch adds record/replay test which boots Linux kernel on s390x platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Acked-by:
Thomas Huth <thuth@redhat.com> [PMD: Drop default '-smp 1' as suggested by Thomas] Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <162737551785.1735673.6775108576116333386.stgit@pasha-ThinkPad-X280>
-
G S Niteesh Babu authored
Add syntax highlighting for the incoming and outgoing QMP messages. This is achieved using the pygments module which was added in a previous commit. The current implementation is a really simple one which doesn't allow for any configuration. In future this has to be improved to allow for easier theme config using an external config of some sort. Signed-off-by:
G S Niteesh Babu <niteesh.gs@gmail.com> Message-Id: <20210823220746.28295-6-niteesh.gs@gmail.com> Signed-off-by:
John Snow <jsnow@redhat.com>
-
G S Niteesh Babu authored
Added pygments as optional dependency for AQMP TUI. This is required for the upcoming syntax highlighting feature in AQMP TUI. The dependency has also been added in the devel optional group. Added mypy 'ignore_missing_imports' for pygments since it does not have any type stubs. Signed-off-by:
G S Niteesh Babu <niteesh.gs@gmail.com> Message-Id: <20210823220746.28295-5-niteesh.gs@gmail.com> Signed-off-by:
John Snow <jsnow@redhat.com>
-
G S Niteesh Babu authored
Add an entry point for aqmp-tui. This will allow it to be run from the command line using "aqmp-tui localhost:1234" More options available in the TUI can be found using "aqmp-tui -h" Signed-off-by:
G S Niteesh Babu <niteesh.gs@gmail.com> Message-Id: <20210823220746.28295-4-niteesh.gs@gmail.com> Signed-off-by:
John Snow <jsnow@redhat.com>
-
G S Niteesh Babu authored
Added AQMP TUI. Implements the follwing basic features: 1) Command transmission/reception. 2) Shows events asynchronously. 3) Shows server status in the bottom status bar. 4) Automatic retries on disconnects and error conditions. Also added type annotations and necessary pylint/mypy configurations. Signed-off-by:
G S Niteesh Babu <niteesh.gs@gmail.com> Message-Id: <20210823220746.28295-3-niteesh.gs@gmail.com> Signed-off-by:
John Snow <jsnow@redhat.com>
-
G S Niteesh Babu authored
Added dependencies for the upcoming AQMP TUI under the optional 'tui' group. The same dependencies have also been added under the devel group since no work around has been found for optional groups to imply other optional groups. Signed-off-by:
G S Niteesh Babu <niteesh.gs@gmail.com> Message-Id: <20210823220746.28295-2-niteesh.gs@gmail.com> Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
I'm not exposing this via the Makefile help, it's not likely to be useful to passersby. Switch the avocado runner to the 'legacy' runner for now, as the new runner seems to obscure coverage reports, again. Usage is to enter your venv of choice and then: `make check-coverage && xdg-open htmlcov/index.html`. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-28-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Tests a real connect, a real accept, and really sending and receiving a message over a UNIX socket. Brings coverage of protocol.py up to ~93%. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-27-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
This tests most of protocol.py -- From a hacked up Coverage.py run, it's at about 86%. There's a few error cases that aren't very well tested yet, they're hard to induce artificially so far. I'm working on it. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-26-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Avocado v90 includes improved support for running async unit tests. The workaround that existed prior to v90 causes the unit tests to fail afterwards, however, so upgrade our minimum version pin to the very latest and greatest. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-25-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Add a warning whenever AQMP is used to steer people gently away from using it for the time-being. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-24-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
As a convenience. It isn't used by the library itself, but it is used by the test suite. It will also come in handy for users of the library still on Python 3.6. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-23-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
This is added in anticipation of wanting it for a synchronous wrapper for the iotest interface. Normally, execute() and execute_msg() both raise QMP errors in the form of Python exceptions. Many iotests expect the entire reply as-is. To reduce churn there, add a private execution interface that will ease transition churn. However, I do not wish to encourage its use, so it will remain a private interface. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-22-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Add execute() and execute_msg(). _execute() is split into _issue() and _reply() halves so that hypothetical subclasses of QMP that want to support different execution paradigms can do so. I anticipate a synchronous interface may have need of separating the send/reply phases. However, I do not wish to expose that interface here and want to actively discourage it, so they remain private interfaces. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-21-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Add the ability to handle and route messages in qmp_protocol.py. The interface for actually sending anything still isn't added until next commit. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-20-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
mypy handles this better -- but we only need the workaround because pylint under Python 3.6 does not understand that a MutableMapping really does have a .get() method attached. We could remove this again once 3.7 is our minimum. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-19-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-