[libvirt] [PATCH] tests: Only format the CPU frequency if it's known

Peter Krempa pkrempa at redhat.com
Mon Jan 8 14:50:43 UTC 2018


On Mon, Jan 08, 2018 at 15:10:29 +0100, Andrea Bolognani wrote:
> Instead of formatting 'MHz: 0', which can be confusing, skip the
> field altogether. This behavior is consistent with that of 'virsh
> nodeinfo'.
> 
> Suggested-by: John Ferlan <jferlan at redhat.com>
> Signed-off-by: Andrea Bolognani <abologna at redhat.com>
> ---
>  .../linux-aarch64-f21-mustang.expected             |  2 +-
>  .../linux-aarch64-rhel74-moonshot.expected         |  2 +-
>  .../linux-aarch64-rhelsa-3.19.0-mustang.expected   |  2 +-
>  .../linux-armv6l-raspberrypi.expected              |  2 +-
>  tests/virhostcputest.c                             | 28 +++++++++++++++++-----
>  5 files changed, 26 insertions(+), 10 deletions(-)

Well, these are tests, so confusion really should not be a problem.
Formatting all the values unconditionally has a benefit that you don't
have to look at the code to see when some are formatted, but rather know
the raw value instead.

I'd suggest to not push this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180108/50f478c9/attachment-0001.sig>


More information about the libvir-list mailing list