I don't have any SAS drives that are currently failing self tests, but these changes work fine on my servers with healthy SAS drives. They detect the "passing" state of no LBA or KCQ listed in the self test result (i.e. "- [ - - - ]") and set the color to the normal background color. Any deviation from this expected pattern would indicate a self test failure and use the critical color instead.
I set it up to mimic the previous code on SATA drives, and to be "ready" for if json format is supported in the future.
I don't have any SAS drives that are currently failing self tests, but these changes work fine on my servers with healthy SAS drives. They detect the "passing" state of no LBA or KCQ listed in the self test result (i.e. "- [ - - - ]") and set the color to the normal background color. Any deviation from this expected pattern would indicate a self test failure and use the critical color instead.
I set it up to mimic the previous code on SATA drives, and to be "ready" for if json format is supported in the future.