summaryrefslogtreecommitdiff
path: root/tests/testutilsqemuschema.h
Commit message (Collapse)AuthorAgeFilesLines
* Enforce a standard header file guard symbol nameDaniel P. Berrangé2018-12-141-3/+3
| | | | | | | | | | | | | | Require that all headers are guarded by a symbol named LIBVIRT_$FILENAME where $FILENAME is the uppercased filename, with all characters outside a-z changed into '_'. Note we do not use a leading __ because that is technically a namespace reserved for the toolchain. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* Fix many mistakes & inconsistencies in header file layoutDaniel P. Berrangé2018-12-141-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a syntax-check script that validates header files use a common layout: /* ...copyright header... */ <one blank line> #ifndef SYMBOL # define SYMBOL ....content.... #endif /* SYMBOL */ For any file ending priv.h, before the #ifndef, we will require a guard to prevent bogus imports: #ifndef SYMBOL_ALLOW # error .... #endif /* SYMBOL_ALLOW */ <one blank line> The many mistakes this script identifies are then fixed. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* tests: qemu: Use qmp schema data from the qemucapabilities testPeter Krempa2018-07-101-0/+3
| | | | | | | | | Add helpers that allow using the latest schema from the replies from an actual qemu which are recorded for the purpose of the qemucapabilities test instead of an unsynced copy stored in qemuqapischema.json. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
* tests: qemu: Add infrastructure for QAPI schema testingPeter Krempa2018-03-231-0/+30
Add a function which will allow to test whether a JSON object conforms to the QAPI schema. This greatly helps when developing formatters for new JSON objects and will help make sure that the code will not break in cases which have unit tests but were actually not function-tested (mostly various disk access protocols). Signed-off-by: Peter Krempa <pkrempa@redhat.com>