Skip to content

global-ctx: add nvme_sysfs_ctrl_path() for mockable sysfs paths - #4047

Open
brgoing wants to merge 1 commit into
linux-nvme:masterfrom
Micron-TPG-OSS:bgoing/nvme-cli-mockable-sys-paths
Open

brgoing wants to merge 1 commit into
linux-nvme:masterfrom
Micron-TPG-OSS:bgoing/nvme-cli-mockable-sys-paths

Conversation

@brgoing

@brgoing brgoing commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

nvme-cli code that reads controller sysfs attributes directly (rather than through libnvme) hardcoded "/sys/class/nvme/", so it could not be redirected under --set-options test-sysfs-dir= the way libnvme itself can. Add nvme_sysfs_ctrl_path() to mirror libnvme's test sysfs root and use it in the Micron PCIe BDF lookup and the PCI-IDs sysfs lookup.

nvme-cli code that reads controller sysfs attributes directly (rather
than through libnvme) hardcoded "/sys/class/nvme/<ctrl>", so it could
not be redirected under --set-options test-sysfs-dir= the way libnvme
itself can. Add nvme_sysfs_ctrl_path() to mirror libnvme's test sysfs
root and use it in the Micron PCIe BDF lookup and the PCI-IDs sysfs
lookup.

Signed-off-by: Broc Going <bgoing@micron.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant