From f19c4b2422b593e8769fb2c7f6fb617aff63c577 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 22 May 2023 20:57:04 -0700 Subject: [PATCH] Update self-test data before checking result Addresses #209 --- scripts/wk/hw/smart.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/wk/hw/smart.py b/scripts/wk/hw/smart.py index ebce3dbf..9bce00f9 100644 --- a/scripts/wk/hw/smart.py +++ b/scripts/wk/hw/smart.py @@ -317,7 +317,7 @@ def run_self_test(test_obj, log_path) -> None: def run_smart_self_test(test_obj, log_path) -> None: - """Run SMART self-test and check if it passed, returns bool. + """Run SMART self-test and check if it passed, returns None. NOTE: An exception will be raised if the disk lacks SMART support. """ @@ -374,6 +374,7 @@ def run_smart_self_test(test_obj, log_path) -> None: # Check result if finished: + test_details = get_smart_self_test_details(test_obj.dev) test_obj.passed = test_details.get('status', {}).get('passed', False) test_obj.failed = test_obj.failed or not test_obj.passed