]> git.ipfire.org Git - thirdparty/libvirt.git/commit
testutilsqemu: Introduce 'testQemuInsertRealCaps' helper
authorPeter Krempa <pkrempa@redhat.com>
Mon, 3 Jul 2023 13:25:30 +0000 (15:25 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 20 Jul 2023 13:23:00 +0000 (15:23 +0200)
commitbb142b6db1de8d2ef276b174565e185e5aad1003
tree373708e7e39b535414e2386d8ecdacad7cd936a8
parent4cac4867ad4961f1a30d680961bdf17b3c21ae05
testutilsqemu: Introduce 'testQemuInsertRealCaps' helper

'testQemuInsertRealCaps' looks up and inserts real capabilities into the
capability 'file cache' for testing purposes. Effectively this helper
replaces following steps:

1) testQemuGetRealCaps
2) virFileCacheClear
3) qemuTestCapsCacheInsert

This helper doesn't copy the capabilities that are borrowed from it's
internal cache thus they must not be modified afterwards in contrast to
the above steps.

The use of this helper is in simple tests which require some form of
capabilities to parse a definition but don't care about doctoring them
in any way.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/testutilsqemu.c
tests/testutilsqemu.h