[libvirt] Re: [PATCH] test: Implement BlockStats and InterfaceStats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]