()
| 172 | |
| 173 | #[test] |
| 174 | fn test_probe_discovers_nvidia_gpu() { |
| 175 | let (tmp, sysfs) = setup_mock_sysfs(); |
| 176 | create_pci_device( |
| 177 | &sysfs, |
| 178 | tmp.path(), |
| 179 | "0000:2d:00.0", |
| 180 | "0x10de", |
| 181 | "0x2684", |
| 182 | "0x030000", |
| 183 | 42, |
| 184 | ); |
| 185 | |
| 186 | let gpus = probe_host_nvidia_vfio_readiness(&sysfs); |
| 187 | assert_eq!(gpus.len(), 1); |
| 188 | assert_eq!(gpus[0].bdf, "0000:2d:00.0"); |
| 189 | assert_eq!(gpus[0].vendor, "0x10de"); |
| 190 | assert_eq!(gpus[0].device, "0x2684"); |
| 191 | assert_eq!(gpus[0].iommu_group, 42); |
| 192 | } |
| 193 | |
| 194 | #[test] |
| 195 | fn test_probe_skips_non_nvidia() { |
nothing calls this directly
no test coverage detected