- 25 10月, 2019 2 次提交
-
-
由 Peter Krempa 提交于
There's no point in clearing the current snapshot when we are just changing the definition of the current snapshot as by the virtue of the 'update_current' flag the same snapshot would become current in qemuDomainSnapshotCreateXML. 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 14 次提交
-
-
由 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>
-
由 Pavel Hrdina 提交于
Libtool gets a wrong order of arguments of libraries to install and it fails when installing libvirt-admin.so that libvirt.so is not yet installed. Caused by commit <3097282d>. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@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 24 次提交
-
-
由 Michal Privoznik 提交于
In v5.8.0-332-g3097282d the libvirt-admin.so was moved into src/admin/ directory. However, corresponding .gitignore change was left out. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
These two functions have pattern that's preventing us from simpler virAsprintf() -> g_strdup_printf() transition. Modify their logic a bit. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
In a few places our code relies on the fact that virAsprintf() not only prints to allocated string but also that it returns the length of that string. Fortunately, only few such places were identified: https://www.redhat.com/archives/libvir-list/2019-September/msg01382.html In case of virNWFilterSnoopLeaseFileWrite() and virFilePrintf() we can use strlen() right after virAsprintf() to calculate the length. In case of virDoubleToStr() it's only caller checks for error case only, so we can limit the set of returned values to just [-1, 0]. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
Historically we did not support VPATH builds and everything was generated into source directory. The introduction of VPATH builds did not changed the way how our documentation is handled. This patch changes the rules to generate everything into build directory and stops distributing generated files in order to have properly separated VPATH builds. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
There is no need to keep old compatibility code around as it it will never be used in our current source tree. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
Commit <124f0653> moved remote related build rules into separate makefile but forgot to move this part as well. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
There is no need to have the libvirt-admin.so library definition in the src directory. In addition the library uses directly code from admin sub-directory so move the remaining bits there as well. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
Follow the same pattern as for other sub-directories where we create a static library that is linked into libvirt.so. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
Follow the same pattern as for other sub-directories where we create a static library that is linked into libvirt.so. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 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>
-
由 Pavel Hrdina 提交于
This version is available on all supported OSes and includes the transaction APIs. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
All supported OSes have libnl-3.0 and netcf uses it so there is no need to keep libnl-1.0 compatibility code. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
In domain_conf.c we have virDomainSCSIDriveAddressIsUsed() function which returns true or false if given drive address is already in use for given domain config or not. However, it also takes a shortcut and returns true (meaning address in use) if the unit number equals 7. This is because for some controllers this is reserved address. The limitation comes mostly from vmware and applies to lsilogic, buslogic, spapr-vscsi and vmpvscsi models. On the other hand, we were not checking for the maximum unit number (aka LUN number) which is also relevant and differs from model to model. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
So far, the virDomainDeviceFindSCSIController() takes virDomainDeviceInfo structure which is an overkill. It assumes that the passed structure is type of VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE which is not obvious. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ján Tomko 提交于
s/verca/versa/ Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Include the 'semi-automatic' updates in the list of patches pushed at maintainers' discretion to match current practice. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Replace reference to VIR_FREE with g_free and mention the use of g_auto cleanup attributes that eliminate most of label use. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Prefer G_GNUC_PRINTF. Also, pick another example than virAsprintf since it may get removed in the future. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Recommend GString for generic strings and virBuffer for strings that need helpers for other uses, like XML or command line formatting. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Recommend g_str(n)dup instead of VIR_STRDUP. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Document the preferred alternatives to existing libvirt macros for allocating strings. These cannot be deleted just yet because converting them will require a lot of work. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Document the preferred alternatives to existing libvirt macros for memory allocation. These cannot be deleted just yet because converting them will require a lot of work. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-