On a Monday in 2024, Peter Krempa wrote:
TL;DR: Patch 23/23 is optional, read below! This patch saga aims to improve and simplify testing of qemu XML configs. Part 1 ensured that all input XMLs are invoked from qemuxml2argvtest In part 2 I've focused on untangling xml->xml testing, explaining and cleaning up cases which don't make sense and finally strictly enforcing a xml->xml invocation for each xml->argv invocation. The last part is done by merging xml->xml testing into qemuxml2argvtest. As a final, but optional step qemuxml2argvtest is then renamed to qemuxmlconftest to avoid confsion. I can understand that muscle memory can be hard to change, and thus this step is optional and I have no problem in dropping that patch. This had negligible impact on the run-time of qemuxml2argvtest(qemuxmlconftest): Before: Benchmark 1: ./tests/qemuxml2argvtest Time (mean ?? ??): 1.709 s ?? 0.023 s [User: 1.461 s, System: 0.236 s] Range (min ??? max): 1.672 s ??? 1.744 s 10 runs Benchmark 1: ./tests/qemuxml2xmltest Time (mean ?? ??): 671.2 ms ?? 11.9 ms [User: 591.7 ms, System: 75.0 ms] Range (min ??? max): 656.3 ms ??? 684.9 ms 10 runs After: Benchmark 1: ./tests/qemuxmlconftest Time (mean ?? ??): 1.748 s ?? 0.024 s [User: 1.500 s, System: 0.236 s] Range (min ??? max): 1.721 s ??? 1.788 s 10 runs Part 3 will then deal with ensuring that libvirt-generated XML can be parsed back and formatted identically, including fixes to ensure that it is actually the case. Parsing the libvirt-generated XML, formatting it back and checking it for identity can expose problems in formatting of auto-filled values (I've caught one such case in review, but not with the test, but rather with seing that the code is broken).
Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> Jano
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx