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)
This commit is contained in:
2Shirt 2018-10-01 19:40:21 -06:00
parent 6c37c344ce
commit 6854d5bad7
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -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(