[libvirt] Re: [PATCH] test: Implement BlockStats and InterfaceStats
Cole Robinson
crobinso at redhat.com
Fri Jul 24 15:17:34 UTC 2009
Cole Robinson wrote:
> We fake stats values based on the current time, similar to how it's done
> for cpu time.
> ---
> src/test.c | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 114 insertions(+), 2 deletions(-)
>
Of course, I do all this, then don't even test that InterfaceStats actually
works. The following additive patch is required:
@@ -2170,7 +2170,7 @@ static int testDomainInterfaceStats(virDomainPtr domain,
for (i = 0 ; i < privdom->def->nnets ; i++) {
if (privdom->def->nets[i]->ifname &&
STREQ (privdom->def->nets[i]->ifname, path)) {
- ret = 0;
+ found = 1;
break;
}
}
Thanks,
Cole
More information about the libvir-list
mailing list