feat: add preliminary miri support

- Adds a devShell with Miri
- Marks some of the tests which Miri cannot execute as ignored for Miri

Signed-off-by: wucke13 <wucke13+github@gmail.com>
This commit is contained in:
wucke13
2025-08-30 13:26:20 +02:00
committed by Karolin Varner
parent aa42ba070b
commit 49be83847b
9 changed files with 42 additions and 0 deletions

View File

@@ -128,6 +128,7 @@ mod tests {
use crate::key::{genkey, pubkey, WG_B64_LEN};
#[test]
#[cfg_attr(miri, ignore)] // Miri does not support calls to mmap with protections other than PROT_READ|PROT_WRITE
fn test_key_loopback() {
secret_policy_try_use_memfd_secrets();
let private_keys_dir = tempdir().unwrap();

View File

@@ -2,6 +2,7 @@ use std::process::Command;
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
#[test]
#[cfg_attr(miri, ignore)] // unsupported operation: extern static `pidfd_spawnp` is not supported by Miri
fn smoketest() -> anyhow::Result<()> {
let tmpdir = tempfile::tempdir()?;