Problem / Background
The vGPU mock is gated behind ALL_SMI_MOCK_VGPU and the MIG mock behind ALL_SMI_MOCK_MIG, allowing developers to test behavior with and without these features. However, the extended hardware detail fields (NUMA node ID, GSP firmware mode/version, NvLink remote device types, thermal thresholds, performance state) added in PRs #173 and #175 are emitted unconditionally by src/mock/templates/nvidia.rs.
This makes it impossible to mock-test how all-smi behaves when hardware details are absent (e.g., simulating an older NVIDIA driver that doesn't support GSP or NvLink queries).
Goal
Add an ALL_SMI_MOCK_HARDWARE_DETAILS environment variable gate around the extended hardware detail block in the NVIDIA mock template, consistent with the vGPU and MIG gating patterns.
Scope
- Gate the hardware detail metrics block in
src/mock/templates/nvidia.rs behind ALL_SMI_MOCK_HARDWARE_DETAILS
- When the env var is unset, the mock should emit basic GPU metrics without NUMA, GSP, NvLink, or GPM fields
- Thermal thresholds and P-state may be gated separately or together with hardware details (decide during implementation)
- Update README mock server section to document the new env var
Problem / Background
The vGPU mock is gated behind
ALL_SMI_MOCK_VGPUand the MIG mock behindALL_SMI_MOCK_MIG, allowing developers to test behavior with and without these features. However, the extended hardware detail fields (NUMA node ID, GSP firmware mode/version, NvLink remote device types, thermal thresholds, performance state) added in PRs #173 and #175 are emitted unconditionally bysrc/mock/templates/nvidia.rs.This makes it impossible to mock-test how all-smi behaves when hardware details are absent (e.g., simulating an older NVIDIA driver that doesn't support GSP or NvLink queries).
Goal
Add an
ALL_SMI_MOCK_HARDWARE_DETAILSenvironment variable gate around the extended hardware detail block in the NVIDIA mock template, consistent with the vGPU and MIG gating patterns.Scope
src/mock/templates/nvidia.rsbehindALL_SMI_MOCK_HARDWARE_DETAILS