summaryrefslogtreecommitdiff
path: root/tests/metadatatest.c
Commit message (Collapse)AuthorAgeFilesLines
* tests: remove pointless labelsJán Tomko2021-09-091-19/+9
| | | | | Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
* tests: use g_autofreeJán Tomko2021-09-091-6/+3
| | | | | Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
* Remove redundant labelsJán Tomko2021-08-171-9/+4
| | | | | | Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
* Use g_autofree in affected functionsJán Tomko2021-08-171-2/+1
| | | | | | | | | | Add g_autofree to functions changed in previous commits doing g_auto cleanup for libxml2-related variables, where it could lead to removal of a label. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
* Use g_auto for xmlFreeDoc everywhereJán Tomko2021-08-171-2/+1
| | | | | | Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
* Use g_auto for xmlXPathContext everywhereJán Tomko2021-08-171-2/+1
| | | | | | Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
* conf: fix title and description for virDomainSetMetadata APIPavel Hrdina2019-03-081-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | If we pass XML to virDomainDefineXML API with these two elements: ... <title></title> <description></description> ... libvirt correctly ignores these two elements and they will not appear in the parsed XML. However, if we use virDomainSetMetadata API and with "" as value for title or description we will end up with the parsed XML that contains these empty elements. Let's fix the behavior of this API to behave the same as virDomainDefineXML. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1518042 Reviewed-by: John Ferlan <jferlan@redhat.com> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
* Remove all Author(s): lines from source file headersDaniel P. Berrangé2018-12-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many files there are header comments that contain an Author: statement, supposedly reflecting who originally wrote the code. In a large collaborative project like libvirt, any non-trivial file will have been modified by a large number of different contributors. IOW, the Author: comments are quickly out of date, omitting people who have made significant contribitions. In some places Author: lines have been added despite the person merely being responsible for creating the file by moving existing code out of another file. IOW, the Author: lines give an incorrect record of authorship. With this all in mind, the comments are useless as a means to identify who to talk to about code in a particular file. Contributors will always be better off using 'git log' and 'git blame' if they need to find the author of a particular bit of code. This commit thus deletes all Author: comments from the source and adds a rule to prevent them reappearing. The Copyright headers are similarly misleading and inaccurate, however, we cannot delete these as they have legal meaning, despite being largely inaccurate. In addition only the copyright holder is permitted to change their respective copyright statement. Reviewed-by: Erik Skultety <eskultet@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* tests: initialize some variablesJán Tomko2018-05-301-1/+1
| | | | | | | | | Found by cppcheck: [tests/metadatatest.c:284]: (error) Uninitialized variable: test [tests/objecteventtest.c:855]: (error) Uninitialized variable: test Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
* Remove backslash alignment attemptsAndrea Bolognani2017-11-031-9/+9
| | | | | | | | | | | | | | | | | | Right-aligning backslashes when defining macros or using complex commands in Makefiles looks cute, but as soon as any changes is required to the code you end up with either distractingly broken alignment or unnecessarily big diffs where most of the changes are just pushing all backslashes a few characters to one side. Generated using $ git grep -El '[[:blank:]][[:blank:]]\\$' | \ grep -E '*\.([chx]|am|mk)$$' | \ while read f; do \ sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \ done Signed-off-by: Andrea Bolognani <abologna@redhat.com>
* tests: Rename VIRT_TEST_* macros to VIR_TEST_*Andrea Bolognani2017-04-041-1/+1
| | | | | | We use the "vir" prefix pretty consistently in our APIs, both external and internal, which made these macros stood out.
* tests: Rename virtTestQuiesceLibvirtErrors to virTestQuiesceLibvirtErrors.Tomáš Ryšavý2016-06-081-1/+1
| | | | This function doesn't follow our convention of naming functions.
* tests: Rename virtTestRun to virTestRun.Tomáš Ryšavý2016-06-081-5/+5
| | | | This function doesn't follow our convention of naming functions.
* test: metadata: Improve test coveragePeter Krempa2014-07-171-0/+64
| | | | Test also the TITLE and DESCRIPTION metadata types.
* Indent top-level labels by one space in tests/Ján Tomko2014-03-251-2/+2
|
* Remove test case average timingDaniel P. Berrange2013-10-081-3/+3
| | | | | | | The test case average timing code has not been used by any test case ever. Delete it to remove complexity. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* tests: metadatatest: Quiesce errors on expected pathsPeter Krempa2013-09-171-0/+2
| | | | | Use the helper added in previous patch to quiesce errors from this test that was spamming logs on normal test runs.
* tests: Add metadata testsPeter Krempa2013-09-171-0/+245
This test exercises the virDomain[Get|Set]Metadata API and tests it for regressions