Hi Daniel,
Thanks for taking a look.
On 11/30/2011 06:00 PM, Daniel P. Berrange wrote:
On Tue, Nov 29, 2011 at 08:26:57PM +0530, Prerna Saxena wrote:
From: Prerna Saxena<prerna@xxxxxxxxxxxxxxxxxx>
Date: Mon, 3 Oct 2011 05:45:30 -0700
Subject: [PATCH 1/5] Use sysfs to gather host topology, in place of
/proc/cpuinfo
Libvirt at present depends on /proc/cpuinfo to gather host
details such as CPUs, cores, threads, etc. This is an architecture-
dependent approach. An alternative is to use 'Sysfs', which provides
a platform-agnostic interface to parse host CPU topology.
Signed-off-by: Prerna Saxena<prerna@xxxxxxxxxxxxxxxxxx>
---
src/nodeinfo.c | 114 +++++++++++++++++++-------------------------------------
1 files changed, 39 insertions(+), 75 deletions(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 6448b79..f70654a 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
[...snip...]
There's nothing particularly wrong with the idea here, but as Stefan
mentions this has broken the test suite, because the nodeinfotest.c
now tries to read /sys from the test machine, instead of reading
our dummy data files in tests/nodeinfodata/
I think we'd probably need to create some dummy sysfs trees under
tests/nodeinfodata/test1/sys/..../ and make sure we can pass in
a path to the linuxNodeInfoCPUPopulate API so we cna point the
test at our sysfs, instead of the real machine
Daniel
Thanks for the pointer. I'll now modify this test to use sysfs.
--
Prerna Saxena
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list