[PATCH 7/7] rteval: Include --warn-non-isolated-core-sharing warnings in XML report

John Kacur
2026-04-21T18:26:48Z

Extend the add_core_sharing_warnings() method to accept the warn_non_isolated
parameter and pass it through to validate_core_sharing(). This ensures that
warnings generated by the --warn-non-isolated-core-sharing flag are included
in the XML report's CoreSharingWarnings section.

Previously, the flag only affected console warnings. Now the warnings are
also preserved in the XML report and will appear in text reports generated
with -Z option, since the XSLT stylesheet already displays any warnings
found in the CoreSharingWarnings section.

Changes:
- rteval/sysinfo/cputopology.py: Add warn_non_isolated parameter to
add_core_sharing_warnings() and pass it to validate_core_sharing()
- rteval-cmd: Pass cmd_opts.rteval___warn_non_isolated_core_sharing to
add_core_sharing_warnings() when adding warnings to XML

This completes the --warn-non-isolated-core-sharing feature by ensuring
warnings appear in console output, XML reports, and text summaries.

Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval-cmd | 3 ++-
rteval/sysinfo/cputopology.py | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/rteval-cmd b/rteval-cmd
index 3180e1a7857a..f730d3177290 100755
--- a/rteval-cmd
+++ b/rteval-cmd
@@ -494,7 +494,8 @@ if __name__ == '__main__':
rteval = RtEval(config, loadmods, measuremods, logger)

# Add core sharing warnings to the XML report now that CPU lists are finalized
- rteval._sysinfo.add_core_sharing_warnings(housekeeping_cpus, msrcfg_cpus, ldcfg_cpus)
+ rteval._sysinfo.add_core_sharing_warnings(housekeeping_cpus, msrcfg_cpus, ldcfg_cpus,
+ cmd_opts.rteval___warn_non_isolated_core_sharing)

rteval.Prepare(rtevcfg.onlyload)

diff --git a/rteval/sysinfo/cputopology.py b/rteval/sysinfo/cputopology.py
index a21c19179f28..f650eca8db8d 100644
--- a/rteval/sysinfo/cputopology.py
+++ b/rteval/sysinfo/cputopology.py
@@ -94,7 +94,7 @@ class CPUtopology:
return self.__cputop_n

- def add_core_sharing_warnings(self, housekeeping_cpus, measurement_cpus, load_cpus):
+ def add_core_sharing_warnings(self, housekeeping_cpus, measurement_cpus, load_cpus, warn_non_isolated=False):
"""
Add core sharing warnings to the CPUtopology XML node.
Should be called after CPU lists are finalized.
@@ -102,6 +102,7 @@ class CPUtopology:
:param housekeeping_cpus: List of housekeeping CPU integers
:param measurement_cpus: List of measurement CPU integers
:param load_cpus: List of load CPU integers
+ :param warn_non_isolated: If True, also warn about measurement vs load sharing even when neither is isolated
"""
if self.__cputop_n is None:
return
@@ -118,7 +119,8 @@ class CPUtopology:
warnings = validate_core_sharing(
housekeeping_cpus or [],
measurement_cpus or [],
- load_cpus or []
+ load_cpus or [],
+ warn_non_isolated
)

# Add warnings to XML if any were found
--
2.53.0