From 6854d5bad7d53e563e4f0eb9af318127f70b3e82 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 1 Oct 2018 19:40:21 -0600 Subject: [PATCH] Adjust NVMe test status logic * If the quick check is ok then the normal check is also ok * (Because there's no NVMe short test as there is in SMART) --- .bin/Scripts/functions/hw_diags.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 1239182d..90dcf671 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -1237,6 +1237,12 @@ def scan_disks(full_paths=False, only_path=None): ] if data.get('NVMe Disk', False): crit_warn = data['nvme-cli'].get('critical_warning', 1) + if crit_warn == 0: + dev_name = data['lsblk']['name'] + data['Quick Health OK'] = True + TESTS['NVMe/SMART']['Status'][dev_name] = 'CS' + else: + data['Quick Health OK'] = False data['Quick Health OK'] = True if crit_warn == 0 else False elif set(wanted_smart_list).issubset(data['smartctl'].keys()): data['SMART Pass'] = data['smartctl'].get('smart_status', {}).get(