From a65d1d8b95156e98c9645e89d11e15f45443bf60 Mon Sep 17 00:00:00 2001 From: AM Date: Mon, 10 Mar 2025 12:17:04 +0800 Subject: [PATCH 1/2] docs: Update README to replace use of mutagen with cargo-mutants --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d51dcd37b..e96b90ed1 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ Unit and integration tests are available for those interested, along with benchm developers, especially new contributors looking for something to work on, we do: - Fuzz testing with [`Hongfuzz`](https://github.com/rust-fuzz/honggfuzz-rs) -- Mutation testing with [`Mutagen`](https://github.com/llogiq/mutagen) +- Mutation testing with [`cargo-mutants`](https://github.com/sourcefrog/cargo-mutants) - Code verification with [`Kani`](https://github.com/model-checking/kani) There are always more tests to write and more bugs to find, contributions to our testing efforts @@ -167,9 +167,9 @@ bench marks use: `RUSTFLAGS='--cfg=bench' cargo +nightly bench`. ### Mutation tests -We have started doing mutation testing with [mutagen](https://github.com/llogiq/mutagen). To run -these tests first install the latest dev version with `cargo +nightly install --git https://github.com/llogiq/mutagen` -then run with `RUSTFLAGS='--cfg=mutate' cargo +nightly mutagen`. +We are doing mutation testing with [cargo-mutants](https://github.com/sourcefrog/cargo-mutants). To run +these tests first install with `cargo install --locked cargo-mutants` then run with `cargo mutants --in-place --no-shuffle`. +Note that running these mutation tests will take on the order of 10's of minutes. ### Code verification From 199f57849acd9845902a8090ad6490a61ee03d24 Mon Sep 17 00:00:00 2001 From: AM Date: Mon, 10 Mar 2025 12:45:57 +0800 Subject: [PATCH 2/2] Remove references to cfg(mutate) from lint allow - no longer allowed Also fix incorrect spelling of honggfuzz --- README.md | 2 +- bitcoin/Cargo.toml | 2 +- primitives/Cargo.toml | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e96b90ed1..635741aa2 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ alias build-docs='RUSTDOCFLAGS="--cfg docsrs" cargo +nightly rustdoc --features= Unit and integration tests are available for those interested, along with benchmarks. For project developers, especially new contributors looking for something to work on, we do: -- Fuzz testing with [`Hongfuzz`](https://github.com/rust-fuzz/honggfuzz-rs) +- Fuzz testing with [`Honggfuzz`](https://github.com/rust-fuzz/honggfuzz-rs) - Mutation testing with [`cargo-mutants`](https://github.com/sourcefrog/cargo-mutants) - Code verification with [`Kani`](https://github.com/model-checking/kani) diff --git a/bitcoin/Cargo.toml b/bitcoin/Cargo.toml index d792a3a7e..7784efff7 100644 --- a/bitcoin/Cargo.toml +++ b/bitcoin/Cargo.toml @@ -95,4 +95,4 @@ name = "io" required-features = ["std"] [lints.rust] -unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(fuzzing)', 'cfg(kani)', 'cfg(mutate)'] } +unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(fuzzing)', 'cfg(kani)'] } diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 3a7feefc9..b8b0bdd4c 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -38,9 +38,6 @@ bincode = "1.3.1" all-features = true rustdoc-args = ["--cfg", "docsrs"] -[lints.rust] -unexpected_cfgs = { level = "deny", check-cfg = ['cfg(mutate)'] } - [lints.clippy] # Exclude lints we don't think are valuable. needless_question_mark = "allow" # https://github.com/rust-bitcoin/rust-bitcoin/pull/2134