
On Tue, Oct 15, 2013 at 02:30:33PM +0200, Peter Krempa wrote:
From: Jiri Denemark <jdenemar@redhat.com>
This patch adds cpuDataFormat and cpuDataParse APIs to be used in unit tests for testing APIs that deal with virCPUData. In the x86 world, this means we can now store/load arbitrary CPUID data in the test suite to check correctness of CPU related APIs that could not be tested before.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/cpu/cpu.c | 41 ++++++++++++++ src/cpu/cpu.h | 14 +++++ src/cpu/cpu_x86.c | 135 +++++++++++++++++++++++++++++++++++++++-------- src/libvirt_private.syms | 2 + 4 files changed, 171 insertions(+), 21 deletions(-)
ACK
diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 9eb7df5..548edc7 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -442,6 +442,47 @@ cpuHasFeature(const virCPUData *data, return driver->hasFeature(data, feature); }
+char * +cpuDataFormat(const virCPUData *data)
Site-note: one day we should change all these methods to have a 'virCPU' prefix. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|