mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Not all invariants can be effectively enforced by Rust's type system and when this is the case we typically want tests that assert that the promised invariants do indeed hold. To get good confidence that our invariants do indeed hold we want to check against many inputs, but having to write down many inputs is tedious, and we may also be "biased" in our choices. Property based testing helps here as it provides several randomly generated inputs for us and we can focus on just writing the test logic. We thus add the popular user friendly `proptest` library as a dev-dependency in order to write property based tests in follow up commits. We emphasize that this will be particularly important in a follow up PR where we have some relatively complex logic for filtering MSRs. Signed-off-by: Oliver Anderson <oliver.anderson@cyberus-technology.de> On-behalf-of: SAP oliver.anderson@sap.com