- 11 11月, 2019 3 次提交
-
-
由 Peter Krempa 提交于
Since 6a077cf2 domaincapstest does not run through all cases on failure but terminates right away. This makes it super annoying to debug or use in combination with VIR_TEST_REGENERATE_OUTPUT. Fix it by remembering failure and still running through all cases. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Daniel P. Berrangé 提交于
There should be a single space either side of operators. Inline comments should have two spaces before the '#' src/hyperv/hyperv_wmi_generator.py:130:45: E261 at least two spaces before inline comment source += ' { "", "", 0 },\n' # null terminated ^ src/esx/esx_vi_generator.py:417:25: E221 multiple spaces before operator FEATURE__DESERIALIZE = (1 << 6) ^ tests/cputestdata/cpu-cpuid.py:187:78: E225 missing whitespace around operator f.write(" <msr index='0x%x' edx='0x%08x' eax='0x%08x'/>\n" %( ^ docs/apibuild.py:524:47: E226 missing whitespace around arithmetic operator self.line = line[i+2:] ^ ...more... Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Coding style expects 1 blank line between each method and 2 blank lines before each class. docs/apibuild.py:171:5: E303 too many blank lines (2) def set_header(self, header): ^ docs/apibuild.py:230:1: E302 expected 2 blank lines, found 1 class index: ^ docs/apibuild.py:175:5: E301 expected 1 blank line, found 0 def set_module(self, module): ^ ...more... Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 09 11月, 2019 2 次提交
-
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
This affects more than src/Makefile.am as the rule to generate source files for protocols is generic for all sub-directories. Affected files are: src/admin/admin_protocol.{h,c} src/locking/lock_protocol.{h,c} src/logging/log_protocol.{h,c} src/lxc/lxc_monitor_protocol.{h,c} src/remote/{lxc,qemu,remote}_protocol.{h,c} src/rpc/{virkeepalive,virnet}protocol.{h,c} Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 07 11月, 2019 9 次提交
-
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Tested-by: NAndrew Jones <drjones@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
The ARM implementation of query-cpu-model-expansion only supports full expansion, so we have to make sure we're using that expansion mode if we want to obtain any useful data. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Tested-by: NAndrew Jones <drjones@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Tested-by: NAndrew Jones <drjones@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
Mirrors the existing QEMU_CAPS_X86_MAX_CPU. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Tested-by: NAndrew Jones <drjones@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
Unfortunately this results in a lot of churn because of the eigth hundred and change QEMU commits since the file was last touched, but the only part we actually care about is the fact that the query-cpu-model-expansion QMP command is now available on aarch64. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Tested-by: NAndrew Jones <drjones@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
It's possible that virBitmapNewString returns NULL with an error string (and not an allocation failure that would abort); however, if virBitmapToString is called with a NULL @bitmap, then it will fail in an ugly manner. So rather than have if (!map && !str) logic, split the checks for each variable. Found by Coverity Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 John Ferlan 提交于
Commit 1c8113f9 added the call to virTypedParamsGetString without a return value check which caused Coverity to complain especially since other checks for the same function are made. Found by Coverity Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 John Ferlan 提交于
The @ifname is listed as an ATTRIBUTE_NONNULL(1) parameter, so checking for _NULLABLE causes a coverity build failure - remove that and if it's NULL for the test let's fail miserably. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 John Ferlan 提交于
Commit 944a35d7 added @fakerootdir; however, there are multiple paths out of mymain that didn't free the memory - so just use the g_autofree to resolve the potential leak. Found by Coverity Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 25 10月, 2019 12 次提交
-
-
由 Peter Krempa 提交于
The function now does not return an error so we can drop it fully. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The function now does not return an error so we can drop it fully. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
rfc3986 uses uppercase characters so switch to using them as well. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
According to rfc3986: 2.3. Unreserved Characters Characters that are allowed in a URI but do not have a reserved purpose are called unreserved. These include uppercase and lowercase letters, decimal digits, hyphen, period, underscore, and tilde. unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" URIs that differ in the replacement of an unreserved character with its corresponding percent-encoded US-ASCII octet are equivalent: they identify the same resource. However, URI comparison implementations do not always perform normalization prior to comparison (see Section 6). For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved characters by URI normalizers. Thus we must not include few other characters which don't match c_isalpha to conform to the rules. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
After the conversion of all callers that would pass true as @dynamic to a different function we can remove the unused argument now. Additionally modify the return type to 'size_t' as indentation can't be negative and remove checks whether @buf is passed as it's caller's duty to do so. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The function basically does two very distinct things depending on a bool. As a first step of conversion split out the case when @dynamic is true and implement it as a new function and convert all callers. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The DO_TEST macro initializes 'struct testInfo' but it's not used by any of the tests. Remove it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The tests are deeply based on internals of virBuffer which will be replaced in an upcoming patch with glib's GString. Remove the tests. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Rather than setting usage error truncate the indentation level. Having the output string misformated is way more useful to figure out where the error lies rather than reporting an error after a giant formatter function. In testBufAutoIndent we now validate that the indentation is truncated and testBufAddBuffer2 is removed since it became bogus. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Usage errors in the virBuffer are hard to track anyways. Just trim noting if the user requests the trimming string to be used without providing it. The change in the test proves that it's a no-op now. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Introduce qemuMonitorTransactionBitmapMergeSourceAddBitmap which adds the appropriate entry into a virJSONValue array to be used with qemuMonitorTransactionBitmapMerge. Bitmap merging supports two possible formats and this new helper implements the more universal one specifying also the source node name. In addition use the new helper in the testQemuMonitorJSONTransaction test. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
doTestQemuInternal and doTestQemu are used only when WITH_QEMU is enabled. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 24 10月, 2019 13 次提交
-
-
由 Andrea Bolognani 提交于
Now that the only data we need for fully testing a QEMU binary is the (version, arch) combo, we can stop providing that information ourselves and instead rely on testQemuCapsIterate() automatically picking up new input files as they are added to the repository, the same way the qemucapabilities and qemucaps2xml tests already behave. Unsurprisingly, this change results in a bunch of extra output files being created, significantly expanding our test coverage. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Andrea Bolognani 提交于
For each QEMU version there are usually several different, architecture-dependedn scenarios that we're interested in testing; however, since the test matrix has to be explicitly created by calling DO_TEST_QEMU() multiple times with different arguments, we end up with spotty coverage. Fix this by implementing the arch-specific rules in code, which result in the full coverage for a (version, arch) combo being automatically achieved with a single call to DO_TEST_QEMU(). Unsurprisingly, this change results in a bunch of extra output files being created. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Andrea Bolognani 提交于
The full name of the test case, as well as the name of the QEMU binary and corresponding capabilities file, can all be derived from other information passed to the test, so there's no point in asking the user to provide them. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Andrea Bolognani 提交于
Macros become less and less appealing the more work you perform inside them: DO_TEST_QEMU() has arguably already crossed that threshold, and we're going to add even more code later on. While factoring the code out of the macro, convert it to use the GLib string manipulation functions and take advantage of autofree. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Andrea Bolognani 提交于
Requiring the user to provide the final string themselves will make subsequent changes easier to implement. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Andrea Bolognani 提交于
The usual convention is to use ${foo}test.c for the test program itself and either ${foo}data/ or ${foo}outdata/, depending on whether it contains both input and output files or only the latter, for the corresponding data directory. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Andrea Bolognani 提交于
Right now we're passing a "base" string that contains both, separated by an underscore. Some changes that we're going to introduce later will require us to have the version number on its own, and instead of delegating the task of splitting the two apart to the callback it make more sense to perform it upfront. This change results in quite a bit of churn because we're now using the version number only, without the prefix, to calculate the dummy microcodeVersion. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Andrea Bolognani 提交于
Right now users need to hardcode the suffix, which is not a big deal since they're the ones who passed it to testQemuCapsIterate() in the first place; however, since we're already passing most of the information to the callback and we're going to add more later on, it makes sense to be consistent and pass the suffix too. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Andrea Bolognani 提交于
Right now users need to know input file live inside TEST_QEMU_CAPS_PATH, which is bad layering. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Andrea Bolognani 提交于
We're going to depend on the fact that the suffix starts with a dot later on, so we better ensure that it does. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Andrea Bolognani 提交于
If files whose name doesn't follow the expected format are added to the repository, it's better to make the test suite fail than to silently ignore them. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Andrea Bolognani 提交于
We'll need this later. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
In few places we have the following code pattern: int ret; ... /* @ret is not accessed here */ ret = f(...); return ret; This pattern can be written less verbose: ... return f(...); This patch was generated with following coccinelle spatch: @@ type T; constant C; expression f; identifier ret; @@ -T ret = C; ... when != ret -ret = f; -return ret; +return f; Afterwards I needed to fix a few places, e.g. comment in virDomainNetIPParseXML() was removed too because coccinelle thinks it refers to @ret while in fact it doesn't. Also in few places it replaced @ret declaration with a few spaces instead of removing the line. But nothing terribly wrong. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 23 10月, 2019 1 次提交
-
-
由 Pavel Hrdina 提交于
All OSes that we support have libselinux >= 2.5 except for Ubuntu 16.04 where the version is 2.4. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-