- 03 4月, 2019 40 次提交
-
-
由 Ján Tomko 提交于
Add ATTRIBUTE_UNUSED to the volStorageBackendRBDGetFlags stub. Fixes: 21deeaf0Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
We do not care about the portability warnings implied by the implicit 'gnu' option. Switch to 'foreign' to opt out of checking the files present in the top directory to let us drop ChangeLog completely. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ján Tomko 提交于
Even Ubuntu 16.04 has automake 1.11. Now that we no longer cater to automake 1.9, drop the comment as well as the -Wno-obsolete option, since it does not seem to generate any warnings anymore. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ján Tomko 提交于
Make it work better with git history. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ján Tomko 提交于
Now that we do not need to cater to YAJL 1, move the check for the return value of yajl_gen_alloc earlier, so that we can assume it was successful in later code. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ján Tomko 提交于
Now that we require YAJL2, drop the code dealing with YAJL 1. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ján Tomko 提交于
The pkg-config file was introduced by commit b729ded which was released in yajl 2.0.3. Since all our supported platforms include at least yajl 2.0.4, use pkg-config to detect the library and set the minimum to 2.0.3. https://repology.org/project/yajl/versionsSigned-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ján Tomko 提交于
Even Debian 8 which we no longer support has 2.1.26. https://repology.org/project/cyrus-sasl/versionsSigned-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Nikolay Shirokovskiy 提交于
qemuMigrationSrcPerform callers expect it to call virDomainObjEndAPI in any case so on error paths we miss the virDomainObjEndAPI call. To fix this let's make qemuMigrationSrcPerform callers responsible for the virDomainObjEndAPI call. ACKed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Daniel P. Berrangé 提交于
The Windows printf functions don't support %llu/%lld for printing 64-bit integers. For most of libvirt this doesn't matter as we rely on gnulib which provides a replacement printf that is sane. The example code is designed to compile against the normal OS headers, with no use of gnulib and thus has to use the platform specific printf. To deal with this we must use the macros PRI* macros from inttypes.h to get the platform specific format string. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The use of d_type is non-portable and leads to surprises when the OS does not fill in any value except DT_UNKNOWN. Blacklist its usage except in files which inherantly don't require portability (cgroups). Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The d_type field cannot be assumed to be filled. Some filesystems, such as older XFS, will simply report DT_UNKNOWN. Even if the d_type is filled in, the use of it in the SELinux functions is dubious. If labelling all files in a directory there's no reason to skip things which are not regular files. We merely need to skip "." and "..", which is done by virDirRead() already. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
d_type is a non-portable extension to the struct dirent and even if it exists, its value may be DT_UNKNOWN if the filesystem doesn't support it. This is common with older versions of XFS which have ftype=0 feature. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Quite a few of the tests have a need to mock the stat() / lstat() functions and they are taking somewhat different & inconsistent approaches none of which are actually fully correct. This is shown by fact that 'make check' fails on 32-bit hosts. Investigation revealed that the code was calling into the native C library impl, not getting intercepted by our mocks. The POSIX stat() function might resolve to any number of different symbols in the C library. The may be an additional stat64() function exposed by the headers too. On 64-bit hosts the stat & stat64 functions are identical, always refering to the 64-bit ABI. On 32-bit hosts they refer to the 32-bit & 64-bit ABIs respectively. Libvirt uses _FILE_OFFSET_BITS=64 on 32-bit hosts, which causes the C library to transparently rewrite stat() calls to be stat64() calls. Libvirt will never see the 32-bit ABI from the traditional stat() call. We cannot assume this rewriting is done using a macro. It might be, but on GLibC it is done with a magic __asm__ statement to apply the rewrite at link time instead of at preprocessing. In GLibC there may be two additional functions exposed by the headers, __xstat() and __xstat64(). When these exist, stat() and stat64() are transparently rewritten to call __xstat() and __xstat64() respectively. The former symbols will not actally exist in the library at all, only the header. The leading "__" indicates the symbols are a private impl detail of the C library that applications should not care about. Unfortunately, because we are trying to mock replace the C library, we need to know about this internal impl detail. With all this in mind the list of functions we have to mock will depend on several factors - If _FILE_OFFSET_BITS is set, then we are on a 32-bit host, and we only need to mock stat64 and __xstat64. The other stat / __xstat functions exist, but we'll never call them so they can be ignored for mocking. - If _FILE_OFFSET_BITS is not set, then we are on a 64-bit host and we should mock stat, stat64, __xstat & __xstat64. Either may be called by app code. - If __xstat & __xstat64 exist, then stat & stat64 will not exist as symbols in the library, so the latter should not be mocked. The same all applies to lstat() These rules are complex enough that we don't want to duplicate them across every mock file, so this centralizes all the logic in a helper file virmockstathelper.c that should be #included when needed. The code merely need to provide a filename rewriting callback called virMockStatRedirect(). Optionally VIR_MOCK_STAT_HOOK can be defined as a macro if further processing is needed inline. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
Use virJSONValueToBuffer so that we can append the command terminator string without copying of the string again. Also avoid a 'strlen' as we can query the buffer use size. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Peter Krempa 提交于
The internal qemu machinery already logs the sent message via the PROBE point in qemuMonitorSend and the monitor receive function. Those are way better as they are easy grepable. Remove the additional ones from the monitor code which just duplicate the sent data. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Peter Krempa 提交于
We have tests that validate the XML formatter. Additionally almost every guide tells users to disable JSON logging. Drop logging of output string in virJSONValueToString. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Peter Krempa 提交于
The last step of the conversion involves copying of the generated JSON into a separate string. We can use a virBuffer to do this as this will also allow to subsequently use the buffer when we actually need to do some other formatting of the string. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Peter Krempa 提交于
Use size_t for all sizes. The '*' modifier unfortunately does require an int so a temporary variable is necessary in the tests. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Peter Krempa 提交于
This was meant to stop abusing the members directly, but we don't do this for other internal structs. Additionally this did not stop the test from touching the members. Remove the header obscurization. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Refactor code paths which clear strings on cleanup paths to use the automatic helper. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
VIR_AUTODISPOSE_STR is similar to VIR_AUTOFREE(char *) but uses virDispose for clearing of the stored string. This patch also refactors VIR_DISPOSE to use the new helper which is used for the new macro. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
'blockdev-snapshot-sync' is present in QEMU since v0.14.0-rc0 and 'transaction' since v1.1.0 (52e7c241ac766406f05fa) Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
qemu added the 'drive-mirror' command in v1.3.0 (d9b902db3fb71fdc) Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
qemu added the 'block-commit' command in v1.3.0 (ed61fc10e8c8d2) Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
It always returns true. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
This was detected by the presence of 'block-stream' which is present in qemu since v1.1 (db58f9c0605fa151b8c4) Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Similarly to the disk source we need to keep the disk index (which is in the qemu driver used for identification of the source for block jobs) for the <mirror> element so that when it's replaced as a disk source after pivoting all the allocated data is present. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
When the block copy operation is started with a reused external file in incremental mode libvirt will need to open and insert the backing chain for that file into qemu (in -blockdev mode). This means that we'll need to track the backing chain and metadata such as node names for the full chain of <mirror>. This patch invokes the full backing chain formatter and parser for <mirror> so that the chain can be kept with <mirror>. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use virDomainStorageSourceParseBase and other tricks. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
We have the proper flags available so we can pass them to the fomatter. The added bonus is that private data may be formatted into the status XML. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Drop the local call in favor of passing in xmlopt. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Pass in 'src' rather than the backing store of it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-