Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manually impl Deserialize for PciPath for validation purposes #801

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

gjcolombo
Copy link
Contributor

Fixes #800.

@gjcolombo
Copy link
Contributor Author

Just for fun, I also wrote and ran an exhaustive version of the deserialization test (for each bus/device/function in 0..256, call PciPath::new, then format a JSON version of that path and see if deserialization produces a result that matches what new returned). This takes about a minute to run on my Zen 2 dev machine, which is slow enough that I'm reluctant to check it in, especially given that this code doesn't change very often. But wanted to note that this seems to work for all otherwise-well-formed BDF JSON blobs.

@gjcolombo gjcolombo merged commit 7627cff into master Oct 25, 2024
11 checks passed
@gjcolombo gjcolombo deleted the gjcolombo/pci-path-deserialize branch October 25, 2024 04:20
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.

PciPath deserialization allows paths rejected by PciPath::new
2 participants