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

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



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


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