Skip to content

Commit 3f50209

Browse files
committed
Merge rust-bitcoin#5094: Add excludes for new mutants
8da0bec Add mutation exclude for timeouts (Jamil Lambert, PhD) 90ce314 Add mutation excludes for impl encoding::Decoder (Jamil Lambert, PhD) d4b8d6c Make mutation testing exclude more specific (Jamil Lambert, PhD) Pull request description: New mutants were found in the weekly mutation testing. One set is from a function that is for optimization and testing it is unnecessary, the other causes a timeout by changing the return of functions which are used in testing to exit loops. - Edit an existing exclude to make it more specific and only exclude the needed function. - Exclude the optimization functions `min_bytes_needed`. - Exclude the `WitnessEncoder` functions that cause an infinite loop in mutation testing. Closes rust-bitcoin#5088 ACKs for top commit: apoelstra: ACK 8da0bec; successfully ran local tests tcharding: ACK 8da0bec Tree-SHA512: 8077157d29397a1b0f05bd29c1030086e0dfe3a0fca2d6252b1173cd9f99b49f425457638f1ec68931d4e24973a79b212bd150186d391aa3907d82debff04065
2 parents 5e907bc + 8da0bec commit 3f50209

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.cargo/mutants.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ exclude_re = [
1111
"deserialize", # Skip serde mutation tests
1212
"serde_details::<impl de::Visitor<'_>", # Skip serde mutation tests
1313
"Iterator", # Mutating operations in an iterator can result in an infinite loop
14-
"impl encoding::Decodable", # Mutant replacing Default::default() is equivalent to returning new()
14+
"<impl encoding::Decodable for .*>::decoder", # Mutant replacing Default::default() is equivalent to returning new()
15+
"<impl encoding::Decoder for .*>::min_bytes_needed", # Function is just a cast for optimization.
16+
1517

1618
# ----------------------------------Crate-specific exclusions----------------------------------
1719
# Units
@@ -44,4 +46,6 @@ exclude_re = [
4446
"Script<T>::to_hex", # Deprecated
4547
"ScriptBuf::to_hex", # Deprecated
4648
"ScriptBuf<T>::to_hex", # Deprecated
49+
"<impl Encoder for WitnessEncoder<'a>>::current_chunk", # Replacing the return with Some(vec![]) causes an infinite loop.
50+
"<impl Encoder for WitnessEncoder<'a>>::advance", # Replacing the return with true causes an infinite loop.
4751
]

0 commit comments

Comments
 (0)