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

Function setup_mock_sysfs

crates/openshell-vfio/src/test_support.rs:10–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8use tempfile::TempDir;
9
10pub fn setup_mock_sysfs() -> (TempDir, SysfsRoot) {
11 let tmp = TempDir::new().unwrap();
12 let sysfs = SysfsRoot::new(tmp.path());
13 (tmp, sysfs)
14}
15
16pub fn create_pci_device(
17 sysfs: &SysfsRoot,

Calls 1

pathMethod · 0.80

Tested by

no test coverage detected