[libvirt] [PATCH] virsh nodecpustats returns incorrect stats of cpu on Linux when the number of online cpu exceed 9.

Daniel P. Berrange berrange at redhat.com
Thu Jan 16 13:26:47 UTC 2014

On Thu, Jan 16, 2014 at 06:06:57AM -0700, Eric Blake wrote:
> On 01/16/2014 01:09 AM, Bing Bu Cao wrote:
> >> Can you also provide a test case to validate this. You just
> >> need to get a suitable /proc/cpustat file and save it in the
> >> tests/ dir and then include linuxNodeGetCPUStats() using that
> >> file.
> > I found there is no test case for linuxNodeGetCPUStats() right now, it
> > is 'static' there.

For something which is static, the approach would be to add a
new header file  'nodeinfopriv.h' which exports this. The header
would only be used by the test suite

> > I think adding a new test case to validate linuxNodeGetCPUStats() should
> > not only cover this patch.
> > 
> > What do you think posting another patch to adding the test case?
> Adding patches to enhance the testsuite is always a good idea.  Go for it!

|: 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 :|

More information about the libvir-list mailing list