Topology mapped one NUMA node per CPU, so on a 2-socket SNC2 host (nodes 0-3) node 1 went to CPU1 and nodes 2-3 got no CPU: the second BlueField-3, four GPUs and several NICs rendered unattached. Use numa-nodes.txt (node=N package=P), now carried by parser v26 as TopologyEvidence.NUMANodes; without it, fall back to contiguous per-socket blocks of zero-based node ids. Pin parser v26.0.0. ADL-082. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
689 B
Go
21 lines
689 B
Go
package server
|
|
|
|
import (
|
|
"git.mchus.pro/reanimator/parser/v26/models"
|
|
"testing"
|
|
)
|
|
|
|
func TestNormalizePCIeSerialComponentName_PrefersPartOverGenericClass(t *testing.T) {
|
|
got := normalizePCIeSerialComponentName(models.PCIeDevice{DeviceClass: "Display Controller", PartNumber: "GH100 [H200 NVL]"})
|
|
if got != "GH100 [H200 NVL]" {
|
|
t.Fatalf("expected part number, got %q", got)
|
|
}
|
|
}
|
|
|
|
func TestNormalizePCIeSerialComponentName_UsesClassWhenSpecific(t *testing.T) {
|
|
got := normalizePCIeSerialComponentName(models.PCIeDevice{DeviceClass: "I350 Gigabit Network Connection", PartNumber: "I350T4V2"})
|
|
if got != "I350T4V2" {
|
|
t.Fatalf("expected part number for readability, got %q", got)
|
|
}
|
|
}
|