summaryrefslogtreecommitdiff
path: root/tests/qemucommandutiltest.c
Commit message (Collapse)AuthorAgeFilesLines
* tests: replace references to yajlJán Tomko2018-05-111-1/+1
| | | | | | | Use "libvirt not compiled with JSON support" instead of mentioning yajl specifically. Signed-off-by: Ján Tomko <jtomko@redhat.com>
* Remove backslash alignment attemptsAndrea Bolognani2017-11-031-11/+11
| | | | | | | | | | | | | | | | | | 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.
* util: qemu: Add support for numbered array membersPeter Krempa2016-07-271-3/+33
| | | | | | Add support for converting objects nested in arrays with a numbering discriminator on the command line. This syntax is used for the object-based specification of disk source properties.
* util: qemu: Don't generate any extra commas in virQEMUBuildCommandLineJSONPeter Krempa2016-07-271-8/+2
| | | | | | The function would generate a leading comma. Let the callers properly add commas by formatting the commas at the end and trimming the trailing one.
* util: qemu: Allow for different approaches to format JSON arraysPeter Krempa2016-07-271-1/+2
| | | | | | | | | | For use with memory hotplug virQEMUBuildCommandLineJSONRecurse attempted to format JSON arrays as bitmap on the command line. Make the formatter function configurable so that it can be reused with different syntaxes of arrays such as numbered arrays for use with disk sources. This patch extracts the code and adds a parameter for the function that will allow to plug in different formatters.
* util: qemu: Allow nested objects in JSON -> commandline generatorPeter Krempa2016-07-271-0/+8
| | | | | Move the iterator of objects to the recursive function so that nested objects are supported by flattening the structure with '.' delimiters.
* util: qemu: Add support for user-passed strings in JSON->commandlinePeter Krempa2016-07-271-0/+1
| | | | | | Until now the JSON->commandline convertor was used only for objects created by qemu. To allow reusing it with disk formatter we'll need to escape ',' as usual in qemu commandlines.
* util: qemu: Add wrapper for JSON -> commandline conversionPeter Krempa2016-07-271-8/+14
| | | | | | | | | | Refactor the command line generator by adding a wrapper (with documentation) that will handle the outermost object iteration. This patch also renames the functions and tweaks the error message for nested arrays to be more universal. The new function is then reused to simplify qemucommandutiltest.
* tests: Rename virtTestCounterNext to virTestCounterNext.Tomáš Ryšavý2016-06-081-1/+1
| | | | This function doesn't follow our convention of naming functions.
* tests: Rename virtTestCounterReset to virTestCounterReset.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-3/+3
| | | | This function doesn't follow our convention of naming functions.
* qemu: Move and rename qemuBuildObjectCommandlineFromJSONJohn Ferlan2016-06-061-5/+4
| | | | | | | | | | Move the module from qemu_command.c to a new module virqemu.c and rename the API to virQEMUBuildObjectCommandline. This API will then be shareable with qemu-img and the need to build a security object for luks support. Signed-off-by: John Ferlan <jferlan@redhat.com>
* tests: fix some memleaks in testsZhang Bo2015-04-271-0/+1
| | | | Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
* qemu: command: Add helper to format -object strings from JSON representationPeter Krempa2015-01-311-0/+118
Unlike -device, qemu uses a JSON object to add backend "objects" via the monitor rather than the string that would be passed on the commandline. To be able to reuse code parts that configure backends for various devices, this patch adds a helper that will allow generating the command line representations from the JSON property object.