aboutsummaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_parser.py
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2025-09-19 06:58:30 -0700
committerFabiano Rosas <farosas@suse.de>2025-10-01 17:09:21 -0300
commite16d7a732124ccaf9960920a9b64f4cf95f8fdab (patch)
treed991f1e70bc5a8cdffbb382b89579153d634a5cd /scripts/lib/kdoc/kdoc_parser.py
parentbfa07595eb6652a3b2599bb2eb3a82f14f75497b (diff)
downloadqemu-e16d7a732124ccaf9960920a9b64f4cf95f8fdab.zip
qemu-e16d7a732124ccaf9960920a9b64f4cf95f8fdab.tar.gz
qemu-e16d7a732124ccaf9960920a9b64f4cf95f8fdab.tar.bz2
tests/qtest: optimize qtest_get_machines
qtest_get_machines returns the machines supported by the QEMU binary described by an environment variable and caches the result. If the next call to qtest_get_machines passes the same variable name, the cached result is returned, but if the name changes, the caching is defeated. To make caching more effective, remember the path of the QEMU binary instead. Different env vars, eg QTEST_QEMU_BINARY_SRC and QTEST_QEMU_BINARY_DST, usually resolve to the same path. Before the optimization, the test /x86_64/migration/precopy/unix/plain exec's QEMU and calls query-machines 3 times. After optimization, that only happens once. This does not significantly speed up the tests, but it reduces QTEST_LOG output, and launches fewer QEMU instances, making it easier to debug problems. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Message-ID: <87h5ymdzrf.fsf@pond.sub.org> Link: https://lore.kernel.org/qemu-devel/1758290310-349623-1-git-send-email-steven.sistare@oracle.com Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions