Re: [PATCH kvm-unit-test 6/6] Add a test for kvm-clock

Glauber Costa
2010-08-27T11:27:04Z

On Fri, Aug 27, 2010 at 01:49:53PM +0800, Jason Wang wrote:
> This patch implements two tests for kvmclock. First one check whether
> the date of time returned by kvmclock matches the value got from
> host. Second one check whether the cycle of kvmclock grows
> monotonically in smp guest.
>
> Three parameters were accepted by the test: test loops, seconds
> since 1970-01-01 00:00:00 UTC which could be easily get through date
> +%s and the max accepted offset value between the tod of guest and
> host.
Good.

I liked the flag usage. Might help us in the future, when we apply
zach's series plus a couple of ideas we have, to see if it the
problem indeed goes away.

A minor tip, not strong feelings towards this, would be to extract
some information from host cpu, and print it too.
It would be easier when we're analyzing this reports in the future.

tsc-based mechanisms are very sensible to:
- vendor
- # of cpus
- # of sockets
- tsc flags

Sure we can get all this information from /proc/cpuinfo, but having it
in your final report automatically would be convenient, I think.