CPER Tests fix

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I5c1b85c37df07b912ad82b50a3658a8a7edaccb1
This commit is contained in:
Maisam Arif
2025-04-14 17:30:08 -05:00
committed by Arif, Maisam
vanhempi 49aa2af045
commit 81c53e179d
12 muutettua tiedostoa jossa 13 lisäystä ja 5 poistoa
+3 -2
Näytä tiedosto
@@ -6383,8 +6383,9 @@ class AMDSMICommands():
except amdsmi_exception.AmdSmiLibraryException as e:
if e.get_error_code() == amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_NO_PERM:
raise PermissionError('Error opening CPER file. This command requires elevation') from e
if e.get_error_code() == amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_FILE_NOT_FOUND:
raise FileNotFoundError('Error opening CPER file. This command requires a CPER to be enabled.') from e
if e.get_error_code() == amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_NOT_SUPPORTED or \
e.get_error_code() == amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_FILE_NOT_FOUND:
raise FileNotFoundError('Error accessing CPER files. This command requires CPER to be enabled.') from e
if e.get_error_code() == amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_FILE_ERROR:
raise FileExistsError('Error opening CPER file. Unable to read CPER File') from e
else:
+2
Näytä tiedosto
@@ -1062,6 +1062,7 @@ class AMDSMIHelpers():
print(msg)
logging.warning(msg)
def hexdump(self, data, size, filepath):
"""
Converts binary data to a hex dump string, similar to the hexdump utility.
@@ -1078,6 +1079,7 @@ class AMDSMIHelpers():
print(f"{offset:08x} {hex_values:<48} |{ascii_values}|", file=f)
offset += 16
def dump_entries(self, folder, entries, cper_data):
if folder:
folder = Path(folder)