Commit Graph

6 Commits

Author SHA1 Message Date
Olaf Hering
e8fd24d810 libxl: add API wrapper for libxl_get_free_memory
Upcoming changes will use different LIBXL_API_VERSION variants.

Prepare libxl_get_free_memory, which changed storage size of parameter
"memkb" in Xen 4.8.

No functional change intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2021-04-01 14:01:06 -06:00
Ján Tomko
a97e17c4e2 tests: libxl: do not run the emulator
Ever since commit c5a00350 the libxl parser invokes the emulator
to probe which device model to use.

Commit b90c4b5 introduced a workaround that used a stable path
which was very likely to result in the answer matching the default.
However the test is still affected by the host state and the binary
gets invoked if present.

Mock the libxlDomainGetEmulatorType function to stop wasting CPU
cycles every time a 'make check' is run on a system with xen installed.

For example xlconfigtest gets faster by 90 %

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: b90c4b5f50
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2020-02-25 12:05:01 +01:00
Ján Tomko
e19343c35d libxl: do not mock virFileMakePath
Point the logDir to abs_builddir instead.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2020-02-25 12:05:00 +01:00
Daniel P. Berrangé
fc920f704c src: convert all code to use virsocket.h
There are a large number of different header files that
are related to the sockets APIs. The virsocket.h header
includes all of the relevant headers for Windows and UNIX
in one convenient place. If virsocketaddr.h is already
included, then there's no need for virsocket.h

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-29 14:51:40 +00:00
Pavel Hrdina
43b01ef2d6 replace use of gnulib snprintf by g_snprintf
Glib implementation follows the ISO C99 standard so it's safe to replace
the gnulib implementation.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2019-11-15 15:07:40 +01:00
Cole Robinson
49a0bcfdf2 tests: Rename virmocklibxl.c -> libxlmock.c
Every other mock library is named ending in mock.c, move
virmocklibxl.c to follow that pattern

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-02-11 17:40:44 -05:00