[libvirt] [PATCH 1/2] Add test for linuxNodeGetCPUStats
Ján Tomko
jtomko at redhat.com
Wed Jan 22 09:36:20 UTC 2014
On 01/21/2014 02:08 PM, Ján Tomko wrote:
> Check if cpu stats are read correctly from a sample
> /proc/stat collected from a 24 CPU machine.
> ---
> src/libvirt_linux.syms | 1 +
> src/nodeinfo.c | 6 +-
> tests/nodeinfodata/linux-cpustat-24cpu.out | 150 ++++++++++++++++++++++++++++
> tests/nodeinfodata/linux-cpustat-24cpu.stat | 25 +++++
> tests/nodeinfotest.c | 128 ++++++++++++++++++++++++
> 5 files changed, 309 insertions(+), 1 deletion(-)
> create mode 100644 tests/nodeinfodata/linux-cpustat-24cpu.out
> create mode 100644 tests/nodeinfodata/linux-cpustat-24cpu.stat
>
> @@ -681,7 +685,7 @@ cleanup:
>
> # define TICK_TO_NSEC (1000ull * 1000ull * 1000ull / sysconf(_SC_CLK_TCK))
>
This makes the test result depend on the _SC_CLK_TCK value, I'll send a v2
using tick in the expected output instead of nsecs.
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140122/6cd15c85/attachment-0001.sig>
More information about the libvir-list
mailing list