MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / test_sysfs_root_iommu_group

Function test_sysfs_root_iommu_group

crates/openshell-vfio/src/sysfs.rs:305–319  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303
304 #[test]
305 fn test_sysfs_root_iommu_group() {
306 let (tmp, sysfs) = setup_mock_sysfs();
307 create_pci_device(
308 &sysfs,
309 tmp.path(),
310 "0000:2d:00.0",
311 "0x10de",
312 "0x2684",
313 "0x030000",
314 42,
315 );
316
317 assert_eq!(sysfs.iommu_group("0000:2d:00.0").unwrap(), 42);
318 assert!(sysfs.iommu_group("0000:ff:ff.f").is_err());
319 }
320
321 #[test]
322 fn test_iommu_group_devices_lists_all_members() {

Callers

nothing calls this directly

Calls 3

setup_mock_sysfsFunction · 0.85
create_pci_deviceFunction · 0.85
pathMethod · 0.80

Tested by

no test coverage detected