#
d7a64c45 |
| 18-Jan-2024 |
Stefan Hajnoczi <stefanha@redhat.com> |
iotests: add filter_qmp_generated_node_ids()
Add a filter function for QMP responses that contain QEMU's automatically generated node ids. The ids change between runs and must be masked in the refer
iotests: add filter_qmp_generated_node_ids()
Add a filter function for QMP responses that contain QEMU's automatically generated node ids. The ids change between runs and must be masked in the reference output.
The next commit will use this new function.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20240118144823.1497953-2-stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit da62b507a20510d819bcfbe8f5e573409b954006) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
show more ...
|
#
b6aed193 |
| 06-Oct-2023 |
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> |
python: use vm.cmd() instead of vm.qmp() where appropriate
In many cases we just want an effect of qmp command and want to raise on failure. Use vm.cmd() method which does exactly this.
The commit
python: use vm.cmd() instead of vm.qmp() where appropriate
In many cases we just want an effect of qmp command and want to raise on failure. Use vm.cmd() method which does exactly this.
The commit is generated by command
git grep -l '\.qmp(' | xargs ./scripts/python_qmp_updater.py
And then, fix self.assertRaises to expect ExecuteError exception in tests/qemu-iotests/124
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-16-vsementsov@yandex-team.ru Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
#
39995e21 |
| 06-Oct-2023 |
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> |
iotests.py: pause_job(): drop return value
The returned value is unused. It's simple to check by command
git grep -B 3 '\.pause_job('
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yande
iotests.py: pause_job(): drop return value
The returned value is unused. It's simple to check by command
git grep -B 3 '\.pause_job('
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-13-vsementsov@yandex-team.ru Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
#
3a8736cf |
| 06-Oct-2023 |
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> |
iotests: QemuStorageDaemon: add cmd() method like in QEMUMachine.
Add similar method for consistency.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Eric Blake
iotests: QemuStorageDaemon: add cmd() method like in QEMUMachine.
Add similar method for consistency.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-8-vsementsov@yandex-team.ru Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
#
37274707 |
| 06-Oct-2023 |
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> |
python: rename QEMUMonitorProtocol.cmd() to cmd_raw()
Having cmd() and command() methods in one class doesn't look good. Rename cmd() to cmd_raw(), to show its meaning better.
We also want to renam
python: rename QEMUMonitorProtocol.cmd() to cmd_raw()
Having cmd() and command() methods in one class doesn't look good. Rename cmd() to cmd_raw(), to show its meaning better.
We also want to rename command() to cmd() in future, so this commit is a necessary step.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-5-vsementsov@yandex-team.ru Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
#
46d4747a |
| 27-Sep-2023 |
John Snow <jsnow@redhat.com> |
python/machine: remove unused sock_dir argument
By using a socketpair for all of the sockets managed by the VM class and its extensions, we don't need the sock_dir argument anymore, so remove it.
W
python/machine: remove unused sock_dir argument
By using a socketpair for all of the sockets managed by the VM class and its extensions, we don't need the sock_dir argument anymore, so remove it.
We only added this argument so that we could specify a second, shorter temporary directory for cases where the temp/log dirs were "too long" as a socket name on macOS. We don't need it for this class now. In one case, avocado testing takes over responsibility for creating an appropriate sockdir.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20230928044943.849073-7-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
#
bc05c638 |
| 25-May-2023 |
Kevin Wolf <kwolf@redhat.com> |
iotests: Make verify_virtio_scsi_pci_or_ccw() public
It has no internal callers, so its only use is being called from individual test cases. If the name starts with an underscore, it is considered p
iotests: Make verify_virtio_scsi_pci_or_ccw() public
It has no internal callers, so its only use is being called from individual test cases. If the name starts with an underscore, it is considered private and linters warn against calling it. 256 only gets away with it currently because it's on the exception list for linters.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230525124713.401149-12-kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
#
95fdd8db |
| 17-May-2023 |
Kevin Wolf <kwolf@redhat.com> |
iotests: Test commit with iothreads and ongoing I/O
This tests exercises graph locking, draining, and graph modifications with AioContext switches a lot. Amongst others, it serves as a regression te
iotests: Test commit with iothreads and ongoing I/O
This tests exercises graph locking, draining, and graph modifications with AioContext switches a lot. Amongst others, it serves as a regression test for bdrv_graph_wrlock() deadlocking because it is called with a locked AioContext and for AioContext handling in the NBD server.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230517152834.277483-4-kwolf@redhat.com> Tested-by: Eric Blake <eblake@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
Revision tags: v8.0.0 |
|
#
aef633e7 |
| 09-Feb-2023 |
John Snow <jsnow@redhat.com> |
python: support pylint 2.16
Pylint 2.16 adds a few new checks that cause the optional check-tox CI job to fail.
1. The superfluous-parens check seems to be a bit more aggressive, 2. broad-exception
python: support pylint 2.16
Pylint 2.16 adds a few new checks that cause the optional check-tox CI job to fail.
1. The superfluous-parens check seems to be a bit more aggressive, 2. broad-exception-raised is new; it discourages "raise Exception".
Fix these minor issues and turn the lights green.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Beraldo Leal <bleal@redhat.com> Message-id: 20230210003147.1309376-2-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
Revision tags: v7.2.0 |
|
#
bcc6777a |
| 20-Jun-2022 |
Hanna Reitz <hreitz@redhat.com> |
iotests: Filter child node information
Before we let qemu-img info print child node information, have common.filter, common.rc, and iotests.py filter it from the test output so we get as few referen
iotests: Filter child node information
Before we let qemu-img info print child node information, have common.filter, common.rc, and iotests.py filter it from the test output so we get as few reference output changes as possible.
Signed-off-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220620162704.80987-10-hreitz@redhat.com> Tested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
Revision tags: v7.0.0 |
|
#
40bfeae1 |
| 18-Apr-2022 |
John Snow <jsnow@redhat.com> |
iotests: make qemu_io_log() check return codes by default
Just like qemu_img_log(), upgrade qemu_io_log() to enforce a return code of zero by default.
Tests that use qemu_io_log(): 242 245 255 274
iotests: make qemu_io_log() check return codes by default
Just like qemu_img_log(), upgrade qemu_io_log() to enforce a return code of zero by default.
Tests that use qemu_io_log(): 242 245 255 274 303 307 nbd-reconnect-on-open
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220418211504.943969-13-jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
#
72cfb937 |
| 18-Apr-2022 |
John Snow <jsnow@redhat.com> |
iotests: remove qemu_io_silent() and qemu_io_silent_check().
Like qemu-img, qemu-io returning 0 should be the norm and not the exception. Remove all calls to qemu_io_silent that just assert the retu
iotests: remove qemu_io_silent() and qemu_io_silent_check().
Like qemu-img, qemu-io returning 0 should be the norm and not the exception. Remove all calls to qemu_io_silent that just assert the return code is zero (That's every last call, as it turns out), and replace them with a normal qemu_io() call.
qemu_io_silent_check() appeared to have been unused already.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220418211504.943969-12-jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
#
23d44dcb |
| 18-Apr-2022 |
John Snow <jsnow@redhat.com> |
iotests: remove qemu_io_pipe_and_status()
I know we just added it, sorry. This is done in favor of qemu_io() which *also* returns the console output and status, but with more robust error handling o
iotests: remove qemu_io_pipe_and_status()
I know we just added it, sorry. This is done in favor of qemu_io() which *also* returns the console output and status, but with more robust error handling on failure.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220418211504.943969-11-jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
#
6dede6a4 |
| 18-Apr-2022 |
John Snow <jsnow@redhat.com> |
iotests: rebase qemu_io() on top of qemu_tool()
Rework qemu_io() to be analogous to qemu_img(); a function that requires a return code of zero by default unless disabled explicitly.
Tests that use
iotests: rebase qemu_io() on top of qemu_tool()
Rework qemu_io() to be analogous to qemu_img(); a function that requires a return code of zero by default unless disabled explicitly.
Tests that use qemu_io(): 030 040 041 044 055 056 093 124 129 132 136 148 149 151 152 163 165 205 209 219 236 245 248 254 255 257 260 264 280 298 300 302 304 image-fleecing migrate-bitmaps-postcopy-test migrate-bitmaps-test migrate-during-backup migration-permissions
Test that use qemu_io_log(): 242 245 255 274 303 307 nbd-reconnect-on-open
Copy-pastables for testing/verification:
./check -qcow2 030 040 041 044 055 056 124 129 132 151 152 163 165 209 \ 219 236 242 245 248 254 255 257 260 264 274 \ 280 298 300 302 303 304 307 image-fleecing \ migrate-bitmaps-postcopy-test migrate-bitmaps-test \ migrate-during-backup nbd-reconnect-on-open ./check -raw 093 136 148 migration-permissions ./check -nbd 205
# ./configure configure --disable-gnutls --enable-gcrypt # this ALSO requires passwordless sudo. ./check -luks 149
# Just the tests that were edited in this commit: ./check -qcow2 030 040 242 245 ./check -raw migration-permissions ./check -nbd 205 ./check -luks 149
Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20220418211504.943969-8-jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
#
b2d68a8e |
| 18-Apr-2022 |
John Snow <jsnow@redhat.com> |
iotests: create generic qemu_tool() function
reimplement qemu_img() in terms of qemu_tool() in preparation for doing the same with qemu_io().
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by
iotests: create generic qemu_tool() function
reimplement qemu_img() in terms of qemu_tool() in preparation for doing the same with qemu_io().
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220418211504.943969-7-jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
#
37094b6d |
| 30-Mar-2022 |
John Snow <jsnow@redhat.com> |
python: rename qemu.aqmp to qemu.qmp
Now that we are fully switched over to the new QMP library, move it back over the old namespace. This is being done primarily so that we may upload this package
python: rename qemu.aqmp to qemu.qmp
Now that we are fully switched over to the new QMP library, move it back over the old namespace. This is being done primarily so that we may upload this package simply as "qemu.qmp" without introducing confusion over whether or not "aqmp" is a new protocol or not.
The trade-off is increased confusion inside the QEMU developer tree. Sorry!
Note: the 'private' member "_aqmp" in legacy.py also changes to "_qmp"; not out of necessity, but just to remove any traces of the "aqmp" name.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Beraldo Leal <bleal@redhat.com> Acked-by: Hanna Reitz <hreitz@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org> Message-id: 20220330172812.3427355-8-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
#
68e2e3dd |
| 21-Mar-2022 |
John Snow <jsnow@redhat.com> |
iotests: switch to AQMP
iotests is already using async QMP, but to finalize the switchover we only need to update any remaining import paths to rely solely on the new library instead.
Signed-off-by
iotests: switch to AQMP
iotests is already using async QMP, but to finalize the switchover we only need to update any remaining import paths to rely solely on the new library instead.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Beraldo Leal <bleal@redhat.com> Acked-by: Hanna Reitz <hreitz@redhat.com> Message-id: 20220321203315.909411-5-jsnow@redhat.com [Fixed minor rebase conflict. --js] Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
#
9ba271f0 |
| 23-Mar-2022 |
Hanna Reitz <hreitz@redhat.com> |
iotests.py: Add supports_qcow2_zstd_compression()
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220323105522.536
iotests.py: Add supports_qcow2_zstd_compression()
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220323105522.53660-2-hreitz@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <v.sementsov-og@mail.ru>
show more ...
|
#
da9d88d8 |
| 18-Mar-2022 |
Hanna Reitz <hreitz@redhat.com> |
iotests.py: Filters for VM.run_job()
Allow filters for VM.run_job(), and pass the filters given to VM.blockdev_create() to it.
(Use this opportunity to annotate VM.run_job()'s parameter types; unfo
iotests.py: Filters for VM.run_job()
Allow filters for VM.run_job(), and pass the filters given to VM.blockdev_create() to it.
(Use this opportunity to annotate VM.run_job()'s parameter types; unfortunately, for the filter, I could not come up with anything better than Callable[[Any], Any] that would pass mypy's scrutiny.)
At one point, a plain string is logged, so the filters passed to it must work fine with plain strings. The only filters passed to it at this point are the ones from VM.blockdev_create(), which are filter_qmp_test_files() (by default) and 207's filter_hash(). Both cannot handle plain strings yet, but we can make them by amending filter_qmp() to treat them as plain values with a None key.
Signed-off-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220318125304.66131-2-hreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
show more ...
|
#
8f685ac3 |
| 21-Mar-2022 |
John Snow <jsnow@redhat.com> |
iotests: make qemu_img_log and img_info_log raise on error
Add a `check: bool = True` parameter to both functions and make their qemu_img() invocations raise on error by default.
users of img_info_
iotests: make qemu_img_log and img_info_log raise on error
Add a `check: bool = True` parameter to both functions and make their qemu_img() invocations raise on error by default.
users of img_info_log: 206, 207, 210, 211, 212, 213, 237, 242, 266, 274, 302
users of qemu_img_log: 044, 209, 274, 302, 304
iotests 242 and 266 need to use check=False for their negative tests. iotests 206, 210, 211, 212, 213, 237, 274 and 302 continue working normally.
As of this commit, all calls to QEMU_IMG made from iotests enforce a return code of zero by default unless explicitly disabled or suppressed by passing check=False or with an exception handler.
Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20220321201618.903471-19-jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
#
f400e14d |
| 21-Mar-2022 |
John Snow <jsnow@redhat.com> |
iotests: remove qemu_img_pipe_and_status()
With the exceptional 'create' calls removed in the prior commit, change qemu_img_log() and img_info_log() to call qemu_img() directly instead.
For now, al
iotests: remove qemu_img_pipe_and_status()
With the exceptional 'create' calls removed in the prior commit, change qemu_img_log() and img_info_log() to call qemu_img() directly instead.
For now, allow these calls to qemu-img to return non-zero on the basis that any unusual output will be logged anyway. The very next commit begins to enforce a successful exit code by default even for the logged functions.
Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20220321201618.903471-18-jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
#
97576f8c |
| 21-Mar-2022 |
John Snow <jsnow@redhat.com> |
iotests: use qemu_img() in has_working_luks()
Admittedly a mostly lateral move, but qemu_img() is essentially the replacement for qemu_img_pipe_and_status(). It will give slightly better diagnostics
iotests: use qemu_img() in has_working_luks()
Admittedly a mostly lateral move, but qemu_img() is essentially the replacement for qemu_img_pipe_and_status(). It will give slightly better diagnostics on crash.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220321201618.903471-16-jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
#
78d04761 |
| 21-Mar-2022 |
John Snow <jsnow@redhat.com> |
iotests: change supports_quorum to use qemu_img
Similar to other recent changes: use the qemu_img() invocation that supports throwing loud, nasty exceptions when it fails for surprising reasons.
(W
iotests: change supports_quorum to use qemu_img
Similar to other recent changes: use the qemu_img() invocation that supports throwing loud, nasty exceptions when it fails for surprising reasons.
(Why would "--help" ever fail? I don't know, but eliminating *all* calls to qemu-img that do not go through qemu_img() is my goal, so qemu_img_pipe() has to be removed.)
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220321201618.903471-12-jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
#
1670ae7a |
| 21-Mar-2022 |
John Snow <jsnow@redhat.com> |
iotests: add qemu_img_map() function
Add a qemu_img_map() function by analogy with qemu_img_measure(), qemu_img_check(), and qemu_img_info() that all return JSON information.
Replace calls to qemu_
iotests: add qemu_img_map() function
Add a qemu_img_map() function by analogy with qemu_img_measure(), qemu_img_check(), and qemu_img_info() that all return JSON information.
Replace calls to qemu_img_pipe('map', '--output=json', ...) with this new function, which provides better diagnostic information on failure.
Note: The output for iotest 211 changes, because logging JSON after it was deserialized by Python behaves a little differently than logging the raw JSON document string itself. (iotests.log() sorts the keys for Python 3.6 support.)
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20220321201618.903471-11-jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
#
9ebb2b76 |
| 21-Mar-2022 |
John Snow <jsnow@redhat.com> |
iotests: add qemu_img_info()
Add qemu_img_info() by analogy with qemu_img_measure() and qemu_img_check(). Modify image_size() to use this function instead to take advantage of the better diagnostic
iotests: add qemu_img_info()
Add qemu_img_info() by analogy with qemu_img_measure() and qemu_img_check(). Modify image_size() to use this function instead to take advantage of the better diagnostic information on failure provided (ultimately) by qemu_img().
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220321201618.903471-9-jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|