- 27 8月, 2019 9 次提交
-
-
由 Michal Privoznik 提交于
If a libvirt error occurred during a test, then virTestRun() reports it (regardless of test returning success or failure). For instance, in this specific case, a hostdev is detached twice and the second attempt is expected to fail. It does fail and libvirt error is reported which is then printed onto stderr. Insert virResetLastError() calls on appropriate places to avoid that. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
There's no need to have VIR_DEBUG() really. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
The virTestRun() already reports the same. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
In this test there is this macro CHECK_LIST_COUNT() which checks if a list of PCI devices contains expected count. If it doesn't an error is reported and 'goto cleanup' is invoked. There's no real reason for that as even since its introduction there is no cleanup done and all 'cleanup' labels contain nothing but 'return'. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
There are few functions called from the test which return an integer but their retval is compared as if it was a pointer. Now, there is nothing wrong with that from machine POV, but from readability perspective it's wrong. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
Similarly to the previous commit, VIR_TEST_VERBOSE should put '\n' at the end of each call so that the output is not broken. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
There is an inconsistency with VIR_TEST_DEBUG() calls. One half (roughly) of calls does have the newline character the other one doesn't. Well, it doesn't have it because it assumed blindly that new line will be printed, which is not the case. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jim Fehlig 提交于
After the legacy xen driver was removed the libxl driver became the only consumer of xenconfig. Move the few files in xenconfig to the libxl driver and remove the directory. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 26 8月, 2019 9 次提交
-
-
由 Jonathon Jongsma 提交于
This function adds the complete filesystem information returned by the qemu agent to an array of typed parameters with field names intended to to be returned by virDomainGetGuestInfo() Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Jonathon Jongsma 提交于
This function queries timezone information within the guest and adds the information to an array of typed parameters with field names intended to be returned to virDomainGetGuestInfo() Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Jonathon Jongsma 提交于
This function queries the guest operating system information and adds the returned information to an array of typed parameters with field names intended to be returned in virDomainGetGuestInfo(). Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Jonathon Jongsma 提交于
This function fetches the list of logged-in users from the qemu agent and adds them to a list of typed parameters so that they can be used internally in libvirt. Also add some basic tests for the function. Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Peter Krempa 提交于
Using inline authentication for storage volumes will not work properly as libvirt requires use of the secret driver for the auth data and thus would not be able to represent the passwords stored in the backing store string. Make sure that the backing store parsers return 1 which is a sign for the caller to not use the file in certain cases. The test data include iscsi via a json pseudo-protocol string and URIs with the userinfo part being present. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Modify testBackingParse to allow testing other return values of the backing store string parser. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Return the parsed storage source via an pointer in arguments and return an integer from the function. Describe the semantics with a comment for the function and adjust callers to the new semantics. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Automatically clean the temporary buffer and get rid of the cleanup label. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
While it's a bad idea to use userinfo to pass credentials via a URI add a test that we at least do the correct thing. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 23 8月, 2019 15 次提交
-
-
由 Roman Bolshakov 提交于
A library has to be built with -flat_namespace to get all references to global symbols indirected. That can also be achieved with two-level namespace interposition but we're not using explicit symbol interposition since it's more verbose and requires massive changes to the mocks. This provides a way to interpose a mock for virQEMUCapsProbeHostCPU from qemucpumock and fixes domaincapstest on macOS. Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com>
-
由 Roman Bolshakov 提交于
gnulib headers change stat, lstat and open to replacement functions, even for function definitions. This effectively disables standard library overrides in virfilewrapper and virmockstathelpers since they are never reached. Rename the functions and provide a declartion that uses correct assembler name for the mocks. This fixes firmware lookup in domaincapstest on macOS. Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com>
-
由 Roman Bolshakov 提交于
Test executables and mocks have assumption that any symbol can be replaced with LD_PRELOAD. That's not a case for macOS unless flat namespace is used, because every external symbol reference records the library to be looked up. And the symbols cannot be replaced unless dyld interposing is used. Setting DYLD_FORCE_FLAT_NAMESPACE changes symbol lookup behaviour to be similar to Linux dynamic linker. It's more lightweight solution than explicitly decorating all mock symbols as interpositions and building libvirt as interposable dynamic library. This fixes vircryptotest and allows to proceed other tests that rely on mocks a little bit further. Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com>
-
由 Roman Bolshakov 提交于
macOS syscall interface (/usr/lib/system/libsystem_kernel.dylib) has three kinds of stat but only one of them can be used to fill "struct stat": stat$INODE64. virmockstathelpers looks up regular stat instead of stat$INODE64. That causes a failure in qemufirmwaretest because "struct stat" is laid out differently from the values returned by stat. Introduce VIR_MOCK_REAL_INIT_ALIASED that can be used to lookup stat$INODE64 and lstat$INODE64 and use it to setup real functions on macOS. Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com>
-
由 Roman Bolshakov 提交于
/tmp is a symbolic link to /private/tmp on macOS. That causes failures in commandtest, because getcwd returns /private/tmp and the expected output doesn't match to "CWD: /tmp". Rathern than making a copy of commanddata solely for macOS, the /private prefix is stripped. Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com>
-
由 Roman Bolshakov 提交于
macOS has two kinds of loadable libraries: MH_BUNDLE, and MH_DYLIB. bundle is used for plugins that are loaded with dlopen/dlsym/dlclose. And there's no way to preload a bundle into an application. dynamic linker (dyld) will reject it when finds it in DYLD_INSERT_LIBRARIES. Unfortunately, a bundle is built if -module flag is provided to libtool. The flag has been removed to build dylibs with ".dylib" suffix. Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com>
-
由 Roman Bolshakov 提交于
In preparation libtool "-module" flag removal, add lib prefix to all mock shared objects. While at it, introduce VIR_TEST_MOCK macros that makes path out of mock name to be used with VIR_TEST_PRELOAD or VIR_TEST_MAIN_PRELOAD. That, hopefully, improves readability, reduces line length and allows to tailor VIR_TEST_MOCK for specific platform if it has shared library suffix different from ".so". Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com>
-
由 Roman Bolshakov 提交于
LD_PRELOAD has no effect on macOS. Instead, dyld(1) provides a way for symbol hooking via DYLD_INSERT_LIBRARIES. The variable should contain colon-separated paths to the dylibs to be inserted. Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com>
-
由 Roman Bolshakov 提交于
getnameinfo on macOS formats certain IPv6 addresses as IPv4-translated addresses. The following pattern has been observed: ::ffff is formated as ::0.0.255.255 ::fffe is formated as ::0.0.255.254 ::ffff:0 is formated as ::255.255.0.0 ::fffe:0 is formated as ::255.254.0.0 ::ffff:0:0 is formated as ::ffff:0.0.0.0 ::fffe:0:0 is formated as ::fffe:0:0 ::ffff:0:0:0 is formated as ::ffff:0:0:0 The getnameinfo behavior causes a failure for: DO_TEST_PARSE_AND_FORMAT("::ffff", AF_UNSPEC, true); Use non-ambigious IPv6 for parse/format testing. Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com>
-
由 Roman Bolshakov 提交于
getaddrinfo on macOS doesn't interpret octal IPv4 addresses. Only inet_aton can be used for that. Therefore, from macOS standpoint "0177.0.0.01" is not the same as "127.0.0.1". The issue was also discovered by python and dotnet core: https://bugs.python.org/issue27612 https://github.com/dotnet/corefx/issues/8362Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com>
-
由 Michal Privoznik 提交于
This enum was introduced to model how RHEL-7 kernel behaves - for some reason going with the old way (via new_id + bind) fails but using driver_override succeeds. Well, we don't need to care about that anymore since we don't create new_id file. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Michal Privoznik 提交于
Now that PCI attach/detach happens solely via driver_override these two files are no longer needed. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Michal Privoznik 提交于
Now that nothing supports "pci-stub" driver (aka KVM style of PCI device assignment) there is no need for virpcimock to create it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Michal Privoznik 提交于
The KVM assignment was removed in qemu driver in previous commit. Remove it from domaincapstest too which is hard coding it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Michal Privoznik 提交于
KVM style of PCI devices assignment was dropped in kernel in favor of vfio pci (see kernel commit v4.12-rc1~68^2~65). Since vfio is around for quite some time now and is far superior discourage people in using KVM style. Ideally, I'd make QEMU_CAPS_VFIO_PCI implicitly assumed but turns out qemu-3.0.0 doesn't support vfio-pci device for RISC-V. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 22 8月, 2019 2 次提交
-
-
由 Michal Privoznik 提交于
It may happen that we leave some XATTRs behind. For instance, on a sudden power loss, the host just shuts down without calling restore on domain paths. This creates a problem, because when the host starts up again, the XATTRs are there but they don't reflect the true state and this may result in libvirt denying start of a domain. To solve this, save a unique timestamp (host boot time) among with our XATTRs. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1741140Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
In preparation to moving the validation to the parser, we need to supply the correct caps. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 20 8月, 2019 3 次提交
-
-
由 Wang Huaqiang 提交于
resctrl object stored in def->resctrls is shared by cachetune and memorytune. The domain xml configuration is parsed firstly for cachetune then memorytune, and the resctrl object will not be created in parsing settings for memorytune once it found sharing exists. But resctrl is improperly freed when sharing happens. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel P. Berrangé 提交于
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Mocking of the __open_2 function was added in commit 459f071c Author: Michal Privoznik <mprivozn@redhat.com> Date: Thu Aug 15 16:37:17 2019 +0200 virpcimock: Mock __open_2() This function only exists in glibc, however, and the mocking code runs on systems not using glibc, such as FreeBSD. Even Linux hosts might be using a different libc impl, though we don't actively try to support that. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 19 8月, 2019 2 次提交
-
-
由 Daniel P. Berrangé 提交于
The nwfilter XML configs are not merely examples, they are data that is actively shipped and used in production by users. Reviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Vitaly Kuznetsov 提交于
QEMU-4.1 supports 'Direct Mode' for Hyper-V synthetic timers (hv-stimer-direct CPU flag): Windows guests can request that timer expiration notifications are delivered as normal interrupts (and not VMBus messages). This is used by Hyper-V on KVM. Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-