On 12/8/20 11:20 PM, Daniel Henrique Barboza wrote:
This is the v3 of https://www.redhat.com/archives/libvir-list/2020-December/msg00419.html Michal mentioned in his v2 review that we should move these validations out of domain_conf.c to a new file. Let's create a new file called domain_validate.c and start move the validations done in v2 into it, instead of pushing the already reviewed v2 series just to have more stuff to be moved later on. A follow up series will push more validations from domain_conf.c to domain_validate.c. Michal's R-bs were kept in all patches but patch 01. Daniel Henrique Barboza (14): domain_conf: move boot timeouts check to domain_validate.c domain_conf.c: move primary video check to validate callback domain_conf.c: move virDomainVideoDefValidate() to domain_validate.c domain_conf.c: move QXL attributes check to virDomainVideoDefValidate() domain_conf: move virDomainDiskDefValidate() to domain_validate.c domain_conf: move vendor, product and tray checks to domain_validate.c domain_validate.c: rename virSecurityDeviceLabelDefValidateXML() domain_conf: move all ChrSource checks to domain_validate.c domain_conf.c: move smartcard address check to domain_validate.c domain_conf.c: move blkio path check to domain_validate.c domain_conf.c: move virDomainControllerDefValidate() to domain_validate.c domain_conf: move virDomainPCIControllerOpts checks to domain_validate.c domain_conf: move pci-root/pcie-root address check to domain_validate.c domain_conf.c: move idmapEntry checks to domain_validate.c po/POTFILES.in | 1 + src/conf/domain_conf.c | 562 +-------------- src/conf/domain_validate.c | 637 ++++++++++++++++++ src/conf/domain_validate.h | 47 ++ src/conf/meson.build | 1 + tests/qemuxml2argvdata/pci-root-address.err | 2 +- .../pseries-default-phb-numa-node.err | 2 +- .../video-multiple-primaries.err | 1 + .../video-multiple-primaries.xml | 32 + tests/qemuxml2argvtest.c | 14 +- 10 files changed, 756 insertions(+), 543 deletions(-) create mode 100644 src/conf/domain_validate.c create mode 100644 src/conf/domain_validate.h create mode 100644 tests/qemuxml2argvdata/video-multiple-primaries.err create mode 100644 tests/qemuxml2argvdata/video-multiple-primaries.xml
Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx> Michal