Add DMI test fixtures from linuxhw/DMI and expand placeholder detection
Adds board and memory parser test fixtures based on real dmidecode output from Dell PowerEdge R740xd, HPE ProLiant DL380 Gen10, and Supermicro SYS-6028R-WTR sourced from the linuxhw/DMI dataset. Extends cleanDMIValue with four additional vendor placeholder strings found in the dataset: "0123456789", "1234567890", "NOT AVAILABLE", and "TO BE FILLED BY O.E.M" (without trailing dot). Adds memory_test.go covering mixed populated/empty DIMM slots and both GB and MB size formats. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -174,15 +174,19 @@ func cleanDMIValue(v string) string {
|
||||
upper := strings.ToUpper(v)
|
||||
placeholders := []string{
|
||||
"TO BE FILLED BY O.E.M.",
|
||||
"TO BE FILLED BY O.E.M",
|
||||
"NOT SPECIFIED",
|
||||
"NOT SETTABLE",
|
||||
"NOT PRESENT",
|
||||
"NOT AVAILABLE",
|
||||
"UNKNOWN",
|
||||
"N/A",
|
||||
"NONE",
|
||||
"NULL",
|
||||
"DEFAULT STRING",
|
||||
"0",
|
||||
"0123456789",
|
||||
"1234567890",
|
||||
}
|
||||
for _, p := range placeholders {
|
||||
if upper == p {
|
||||
|
||||
Reference in New Issue
Block a user