tools:sst-compare-redfish-os: Handle missing properties
Turns out there are some properties not exposed by the
intel-speed-select tool, so we need to handle missing values without
failing the test.
Tested: Ran sst-compare-redfish-os.py:
...
Junction Temperature:
Redfish: 81
Linux: 81
SSE Max Turbo Speed: MISSING VALUE
Redfish: 3500
Linux: None
TDP:
Redfish: 250
Linux: 250
...
Everything matched! :)
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Change-Id: Ia34ee13879801eb0c351508ccc7d906bf5e122e0
diff --git a/tools/sst-compare-redfish-os.py b/tools/sst-compare-redfish-os.py
index 03fcf20..d29ea45 100755
--- a/tools/sst-compare-redfish-os.py
+++ b/tools/sst-compare-redfish-os.py
@@ -52,7 +52,9 @@
def compare(redfish_val, linux_val, description):
err = ""
- if redfish_val != linux_val:
+ if None in (redfish_val, linux_val):
+ err = "MISSING VALUE"
+ elif redfish_val != linux_val:
err = "!! MISMATCH !!"
global success
success = False
@@ -105,8 +107,9 @@
compare(redfish_config["MaxJunctionTemperatureCelsius"],
int(linux_config["tjunction-max(C)"]),
"Junction Temperature")
+ # There is no equivalent value in linux for the per-level P0_1 freq.
compare(redfish_config["MaxSpeedMHz"],
- int(linux_config["turbo-ratio-limits-sse"]["bucket-0"]["max-turbo-frequency(MHz)"]),
+ None,
"SSE Max Turbo Speed")
compare(redfish_config["TDPWatts"],
int(linux_config["thermal-design-power(W)"]),