Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion src/lib/readiness/platform-qualification.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import {
type PlatformQualificationInput,
projectPlatformQualification,
} from "./platform-qualification";
import { isStationGb300PciDevice, isStationGb300ProductName } from "./station-qualification";
import {
isStationGb300PciDevice,
isStationGb300ProductName,
STATION_RELEASE_MARKER_MAX_BYTES,
} from "./station-qualification";

function input(overrides: Partial<PlatformQualificationInput> = {}): PlatformQualificationInput {
return {
Expand Down Expand Up @@ -410,6 +414,52 @@ describe("platform readiness qualification (#7410)", () => {
});
});

it("classifies an oversized DGX Station release marker as unqualified (#7877)", () => {
const identity = collectStationIdentity(
noOtaStationRelease(),
trustedMarkerStat({ size: STATION_RELEASE_MARKER_MAX_BYTES + 1 }),
);
const result = projectPlatformQualification(
input({
architecture: "arm64",
hasNvidiaGpu: true,
...identity,
}),
);

expect(identity.stationProfile).toBe("unsupported-dgx-os");
expect(qualification(result, "host.platform.dgx_station")).toBe("unqualified");
expect(result.findings.map(({ id }) => id)).toContain("host.platform.dgx_station_unqualified");
});

it("classifies an unopenable DGX Station release marker as inconclusive (#7877)", () => {
const identity = collectPlatformIdentity({
productNamePath: "/fixtures/product_name",
osReleasePath: "/fixtures/os-release",
stationReleasePath: "/fixtures/dgx-release",
pciDevicesPath: "/fixtures/pci",
readFile: stationFixtureReadFile,
readdir: () => ["0000:01:00.0"],
openFile: () => {
throw Object.assign(new Error("release marker is a symbolic link"), { code: "ELOOP" });
},
statFileDescriptor: () => trustedMarkerStat(),
readFileDescriptor: () => noOtaStationRelease(),
closeFileDescriptor: () => undefined,
});
const result = projectPlatformQualification(
input({
architecture: "arm64",
hasNvidiaGpu: true,
...identity,
}),
);

expect(identity.stationProfile).toBe("unknown");
expect(qualification(result, "host.platform.dgx_station")).toBe("unknown");
expect(result.findings.map(({ id }) => id)).toContain("host.platform.dgx_station_inconclusive");
});

it("collects only bounded identity reads and never invokes host preparation", () => {
const readFile = vi.fn(stationFixtureReadFile);
const readdir = vi.fn(() => ["0000:01:00.0"]);
Expand Down
Loading