[libvirt PATCH 0/2] Tiny misc clean-ups

Some whitespaces were wrong and one debug message was confusing to newcomers. Martin Kletzander (2): util: Make one debug message nicer whitespace clean-ups docs/schemas/capability.rng | 10 +++++----- src/conf/capabilities.c | 2 +- src/util/virresctrl.c | 4 ++-- .../vircaps-x86_64-resctrl-fake-feature.xml | 4 ++-- tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) -- 2.32.0

This was bothering someone as the debug message looked like there was an issue despite it being just a debug message. Change it to what is actually happening and why the name is being skipped. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/util/virresctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index a7d36f492cd2..2a3bcda6f59b 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -542,7 +542,7 @@ virResctrlGetCacheInfo(virResctrlInfo *resctrl, type = virResctrlTypeFromString(endptr); if (type < 0) { - VIR_DEBUG("Cannot parse resctrl cache info type '%s'", endptr); + VIR_DEBUG("Ignoring resctrl cache info with suffix '%s'", endptr); continue; } -- 2.32.0

Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- docs/schemas/capability.rng | 10 +++++----- src/conf/capabilities.c | 2 +- src/util/virresctrl.c | 2 +- .../vircaps-x86_64-resctrl-fake-feature.xml | 4 ++-- tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/schemas/capability.rng b/docs/schemas/capability.rng index 66dba829a826..7747a0155854 100644 --- a/docs/schemas/capability.rng +++ b/docs/schemas/capability.rng @@ -283,11 +283,11 @@ <attribute name="granularity"> <ref name="unsignedInt"/> </attribute> - <optional> - <attribute name="min"> - <ref name="unsignedInt"/> - </attribute> - </optional> + <optional> + <attribute name="min"> + <ref name="unsignedInt"/> + </attribute> + </optional> <attribute name="maxAllocs"> <ref name="unsignedInt"/> </attribute> diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index f311377469df..15c76d791a4b 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -1056,7 +1056,7 @@ virCapabilitiesFormatMemoryBandwidth(virBuffer *buf, node->id, cpus_str); virBufferAsprintf(&childrenBuf, - "<control granularity='%u' min ='%u' " + "<control granularity='%u' min='%u' " "maxAllocs='%u'/>\n", control->granularity, control->min, control->max_allocation); diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 2a3bcda6f59b..1c41d1d35603 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -662,7 +662,7 @@ virResctrlGetMemoryBandwidthInfo(virResctrlInfo *resctrl) rv = virFileReadValueUint(&i_membw->max_allocation, SYSFS_RESCTRL_PATH "/info/MB/num_closids"); if (rv == -2) { - /* Similar reasoning to min_bandwidth above. */ + /* Similar reasoning to min_bandwidth above. */ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Cannot get max allocation from resctrl memory info")); } diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml index 5f3678e0726b..1327d85c9815 100644 --- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml +++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml @@ -56,10 +56,10 @@ </cache> <memory_bandwidth> <node id='0' cpus='0-5'> - <control granularity='10' min ='10' maxAllocs='4'/> + <control granularity='10' min='10' maxAllocs='4'/> </node> <node id='1' cpus='6-11'> - <control granularity='10' min ='10' maxAllocs='4'/> + <control granularity='10' min='10' maxAllocs='4'/> </node> <monitor maxMonitors='176'> <feature name='mbm_total_bytes'/> diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml index c386edd4b0ca..b638bbd1c96d 100644 --- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml +++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml @@ -54,10 +54,10 @@ </cache> <memory_bandwidth> <node id='0' cpus='0-5'> - <control granularity='10' min ='10' maxAllocs='4'/> + <control granularity='10' min='10' maxAllocs='4'/> </node> <node id='1' cpus='6-11'> - <control granularity='10' min ='10' maxAllocs='4'/> + <control granularity='10' min='10' maxAllocs='4'/> </node> <monitor maxMonitors='176'> <feature name='mbm_total_bytes'/> -- 2.32.0

On Thu, Jul 15, 2021 at 02:04:22PM +0200, Martin Kletzander wrote:
Some whitespaces were wrong and one debug message was confusing to newcomers.
Martin Kletzander (2): util: Make one debug message nicer whitespace clean-ups
Reviewed-by: Andrea Bolognani <abologna@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization

On 7/15/21 2:04 PM, Martin Kletzander wrote:
Some whitespaces were wrong and one debug message was confusing to newcomers.
Martin Kletzander (2): util: Make one debug message nicer whitespace clean-ups
docs/schemas/capability.rng | 10 +++++----- src/conf/capabilities.c | 2 +- src/util/virresctrl.c | 4 ++-- .../vircaps-x86_64-resctrl-fake-feature.xml | 4 ++-- tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-)
Looks good to me. Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com> -- Mit freundlichen Grüßen/Kind regards Boris Fiuczynski IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Gregor Pillen Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294
participants (3)
-
Andrea Bolognani
-
Boris Fiuczynski
-
Martin Kletzander