|
| 1 | +additional_cargo_args = ["--all-features"] |
| 2 | +examine_globs = ["consensus_encoding/src/**/*.rs", "units/src/**/*.rs", "primitives/src/**/*.rs"] |
| 3 | +exclude_globs = [ |
| 4 | + "units/src/amount/verification.rs" # kani tests |
| 5 | +] |
| 6 | +exclude_re = [ |
| 7 | + "impl Arbitrary", |
| 8 | + "impl Debug", |
| 9 | + "impl fmt::Debug", |
| 10 | + ".*Error", |
| 11 | + "deserialize", # Skip serde mutation tests |
| 12 | + "serde_details::<impl de::Visitor<'_>", # Skip serde mutation tests |
| 13 | + "Iterator", # Mutating operations in an iterator can result in an infinite loop |
| 14 | + "<impl .*Decodable for .*>::decoder", # Mutant replacing Default::default() is equivalent to returning new() |
| 15 | + "<impl .*Decoder for .*>::read_limit", # Function is for optimization and does not need to be tested. |
| 16 | + |
| 17 | + |
| 18 | + # ----------------------------------Crate-specific exclusions---------------------------------- |
| 19 | + # units |
| 20 | + # src/amount/mod.rs |
| 21 | + "units/.* parse_signed_to_satoshi", # Can't kill all mutants since there is no denomination smaller than Satoshi |
| 22 | + "units/.* fmt_satoshi_in", # Related to formatting/display |
| 23 | + "units/.* dec_width", # Replacing num /= 10 with num %=10 in a loop causes a timeout due to infinite loop |
| 24 | + # src/locktime/relative.rs |
| 25 | + "units/.* LockTime::to_consensus_u32", # Mutant from replacing | with ^, this returns the same value since the XOR is taken against the u16 with an all-zero bitmask |
| 26 | + "units/.* FeeRate::fee_vb", # Deprecated |
| 27 | + "units/.* FeeRate::fee_wu", # Deprecated |
| 28 | + "units/.* SignedAmount::checked_abs", # Deprecated |
| 29 | + "units/.* NumberOfBlocks::value", # Deprecated |
| 30 | + "units/.* NumberOf512Seconds::to_consensus_u32", # Deprecated |
| 31 | + "units/.* MedianTimePast::to_consensus_u32", # Deprecated |
| 32 | + "units/.* Height::to_consensus_u32", # Deprecated |
| 33 | + "units/.* Sequence::to_hex", # Deprecated |
| 34 | + "units/.* Sequence::from_512_second_intervals", # Mutant from replacing | with ^, this returns the same value since the XOR is taken against the u16 with an all-zero bitmask |
| 35 | + |
| 36 | + # primitives |
| 37 | + "primitives/.* Opcode::classify", # Not possible to kill all mutants without individually checking every opcode classification |
| 38 | + "primitives/.* Block<Checked>::cached_witness_root", # Skip getters |
| 39 | + "primitives/.* Block<Checked>::transactions", # Skip getters |
| 40 | + "primitives/.* Script::to_bytes", # Deprecated |
| 41 | + "primitives/.* decode_cursor", # Mutating operations in decode_cursor can result in an infinite loop |
| 42 | + "primitives/.* fmt_debug", # Mutants from formatting/display changes |
| 43 | + "primitives/.* fmt_debug_pretty", # Mutants from formatting/display changes |
| 44 | + "primitives/.* CompactTarget::to_hex", # Deprecated |
| 45 | + "primitives/.* Script::to_hex", # Deprecated |
| 46 | + "primitives/.* Script<T>::to_hex", # Deprecated |
| 47 | + "primitives/.* ScriptBuf::to_hex", # Deprecated |
| 48 | + "primitives/.* ScriptBuf<T>::to_hex", # Deprecated |
| 49 | + "primitives/.* <impl Encoder for .*Encoder<'_>>::current_chunk", # Replacing the return with Some(vec![]) causes an infinite loop. |
| 50 | + "primitives/.* <impl Encoder for .*Encoder<'_>>::advance", # Replacing the return with true causes an infinite loop. |
| 51 | + "primitives/.* <impl Decoder for WitnessDecoder>::push_bytes", # Replacing == with != causes an infinite loop |
| 52 | + "primitives/.* WitnessDecoder::resize_if_needed", # Replacing *= with += still resizes the buffer making the mutant untestable. |
| 53 | + "primitives/.* replace \\+ with \\* in MerkleNode::calculate_root", # Replacing + with * causes an infinite loop |
| 54 | + "primitives/.* replace == with != in MerkleNode::calculate_root", # Replacing == with != isn't caught unless alloc is disabled. |
| 55 | + |
| 56 | + # consensus_encoding - most of these are for mutations in the logic used to determine when to stop encoding or decoding. |
| 57 | + "consensus_encoding/.* <impl Decoder for ArrayDecoder<N>>::push_bytes", # Mutations cause an infinite loop |
| 58 | + "consensus_encoding/.* <impl Decoder for .*>::end", # Mutations cause an infinite loop |
| 59 | + "consensus_encoding/.* encode_to_vec", # Mutations cause an infinite loop |
| 60 | + "consensus_encoding/.* encode_to_writer", # Mutations cause an infinite loop |
| 61 | + "consensus_encoding/.* decode_from_slice", # Mutations cause an infinite loop |
| 62 | + "consensus_encoding/.* decode_from_read", # Mutations cause an infinite loop |
| 63 | + "consensus_encoding/.* <impl Decoder for .*>::push_bytes", # Mutations cause an infinite loop |
| 64 | +] |
0 commit comments