Skip to content

Commit

Permalink
Bug fix: the logic to match the vendor specific attribute is not accu…
Browse files Browse the repository at this point in the history
…rate (#483)

Signed-off-by: Stephen Sun <[email protected]>
  • Loading branch information
stephenxs authored Aug 5, 2024
1 parent e902592 commit 4db745d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sonic_platform_base/sonic_ssd/ssd_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,4 @@ def get_vendor_output(self):
return self.vendor_ssd_info

def parse_id_number(self, id):
return self._parse_re('{}\s*(.+?)\n'.format(id), self.ssd_info)
return self._parse_re('\n{}\s*(.+?)\n'.format(id), self.ssd_info)
2 changes: 1 addition & 1 deletion tests/ssd_generic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@
199 UDMA_CRC_Error_Count 0x000b 100 100 000 Pre-fail Always - 0
215 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 4275
231 Unknown_SSD_Attribute 0x1913 100 100 025 Pre-fail Always - 100
235 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 1302467136
235 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 1302467248
237 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 0
241 Total_LBAs_Written 0x0012 100 100 000 Old_age Always - 1186450104
242 Total_LBAs_Read 0x0012 100 100 000 Old_age Always - 2257141451
Expand Down

0 comments on commit 4db745d

Please sign in to comment.