diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 807965ae..b1284989 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -90,6 +90,7 @@ TESTS = { 'NVMe/SMART': { 'Enabled': False, 'Quick': False, + 'Short Test': {}, 'Status': {}, }, 'badblocks': { @@ -601,6 +602,12 @@ def post_drive_results(ticket_number): report[-1] = report[-1].replace('_', ' ') report.append('') + # SMART Short test result + if TESTS['NVMe/SMART']['Short Test'][name]: + report.append('SMART short test result: {}'.format( + TESTS['NVMe/SMART']['Short Test'][name])) + report.append('') + # badblocks bb_status = TESTS['badblocks']['Status'].get(name, None) if TESTS['badblocks']['Enabled'] and bb_status not in ['Denied', 'Skipped', 'Aborted']: @@ -1122,6 +1129,7 @@ def run_nvme_smart(ticket_number): # Run for name, dev in sorted(TESTS['NVMe/SMART']['Devices'].items()): + TESTS['NVMe/SMART']['Short Test'][name] = None cur_status = TESTS['NVMe/SMART']['Status'][name] if cur_status == 'OVERRIDE': # Skipping test per user request @@ -1187,8 +1195,10 @@ def run_nvme_smart(ticket_number): 'passed', False) if test_passed: TESTS['NVMe/SMART']['Status'][name] = 'CS' + TESTS['NVMe/SMART']['Short Test'][name] = 'CS' else: TESTS['NVMe/SMART']['Status'][name] = 'NS' + TESTS['NVMe/SMART']['Short Test'][name] = 'NS' update_progress() print_standard('Done', timestamp=False)