Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutation testing #78

Closed
2 tasks done
poljar opened this issue Aug 1, 2022 · 3 comments · Fixed by #147
Closed
2 tasks done

Mutation testing #78

poljar opened this issue Aug 1, 2022 · 3 comments · Fixed by #147

Comments

@poljar
Copy link
Collaborator

poljar commented Aug 1, 2022

Mutation testing using cargo-mutants reveals a bunch of test cases that aren't checking for all the code behavior we should.

Once we fix all those discovered issues, we should set up cargo-mutants to run as a daily CI job:
https:/sourcefrog/cargo-mutants#continuous-integration

  • - Fix issues discovered by mutation testing
  • - Set up cargo-mutant in the CI

Full cargo-mutant output follows:

cargo mutants
Freshen source tree ... ok in 0.051s
Copy source and build products to scratch directory ... 1917 MB in 0.639s
Unmutated baseline ... ok in 13.512s
Auto-set test timeout to 20.0s
Found 393 mutants to test
src/sas.rs:129: replace <impl Debug for EstablishedSas>::fmt -> std::fmt::Result with Ok(Default::default()) ... NOT CAUGHT in 4.381s
src/olm/session/message_key.rs:65: replace MessageKey::key -> &[u8 ; 32] with Default::default() ... NOT CAUGHT in 4.405s
src/olm/session/mod.rs:239: replace Session::next_message_key -> MessageKey with Default::default() ... NOT CAUGHT in 4.225s
src/olm/session/message_key.rs:77: replace MessageKey::index -> u64 with Default::default() ... NOT CAUGHT in 3.954s
src/types/ed25519.rs:276: replace Ed25519Signature::to_base64 -> String with "".into() ... NOT CAUGHT in 3.955s
src/megolm/message.rs:151: replace MegolmMessage::encrypt -> MegolmMessage with Default::default() ... NOT CAUGHT in 3.988s
src/olm/session/receiver_chain.rs:55: replace MessageKeyStore::remove_message_key with () ... NOT CAUGHT in 4.156s
src/olm/session/mod.rs:87: replace ChainStore::is_empty -> bool with true ... NOT CAUGHT in 4.206s
src/olm/account/mod.rs:195: replace Account::remove_one_time_key -> Option<Curve25519SecretKey> with Default::default() ... NOT CAUGHT in 4.182s
src/sas.rs:159: replace SasBytes::decimals -> (u16, u16, u16) with Default::default() ... NOT CAUGHT in 4.275s
src/olm/messages/mod.rs:98: replace OlmMessage::message -> &[u8] with Default::default() ... NOT CAUGHT in 4.140s
src/types/mod.rs:31: replace <impl From for String>::from -> String with "".into() ... NOT CAUGHT in 4.024s
src/olm/messages/message.rs:53: replace Message::ciphertext -> &[u8] with Default::default() ... NOT CAUGHT in 4.241s
src/types/mod.rs:37: replace KeyId::to_base64 -> String with "xyzzy".into() ... NOT CAUGHT in 4.275s
src/sas.rs:151: replace SasBytes::emoji_indices -> [u8 ; 7] with Default::default() ... NOT CAUGHT in 4.008s
src/megolm/inbound_group_session.rs:192: replace InboundGroupSession::get_cipher_at -> Option<Cipher> with Default::default() ... NOT CAUGHT in 4.310s
src/olm/messages/message.rs:48: replace Message::chain_index -> u64 with Default::default() ... NOT CAUGHT in 3.974s
src/olm/account/mod.rs:138: replace Account::max_number_of_one_time_keys -> usize with Default::default() ... NOT CAUGHT in 4.317s
src/types/ed25519.rs:276: replace Ed25519Signature::to_base64 -> String with "xyzzy".into() ... NOT CAUGHT in 4.305s
src/olm/account/mod.rs:302: replace Account::forget_fallback_key -> bool with true ... NOT CAUGHT in 4.190s
src/megolm/message.rs:127: replace MegolmMessage::add_signature -> Result<(), SignatureError> with Ok(Default::default()) ... NOT CAUGHT in 4.224s
src/olm/session/mod.rs:148: replace <impl Debug for Session>::fmt -> std::fmt::Result with Ok(Default::default()) ... NOT CAUGHT in 3.972s
src/types/ed25519.rs:118: replace Ed25519SecretKey::from_base64 -> Result<Self, crate::KeyError> with Ok(Default::default()) ... NOT CAUGHT in 4.374s
src/megolm/message.rs:53: replace MegolmMessage::message_index -> u32 with Default::default() ... NOT CAUGHT in 4.239s
src/types/ed25519.rs:250: replace <impl Debug for Ed25519PublicKey>::fmt -> std::fmt::Result with Ok(Default::default()) ... NOT CAUGHT in 3.980s
src/olm/account/mod.rs:307: replace Account::mark_keys_as_published with () ... NOT CAUGHT in 4.270s
src/olm/session/message_key.rs:28: replace <impl Drop for MessageKey>::drop with () ... NOT CAUGHT in 4.271s
src/types/ed25519.rs:100: replace Ed25519SecretKey::from_slice -> Result<Self, crate::KeyError> with Ok(Default::default()) ... NOT CAUGHT in 4.259s
src/olm/account/mod.rs:302: replace Account::forget_fallback_key -> bool with false ... NOT CAUGHT in 4.273s
src/olm/account/fallback_keys.rs:93: replace FallbackKeys::forget_previous_fallback_key -> Option<FallbackKey> with Default::default() ... NOT CAUGHT in 4.260s
src/olm/session/chain_key.rs:79: replace RemoteChainKey::advance with () ... TIMEOUT in 21.578s
src/megolm/message.rs:58: replace MegolmMessage::mac -> [u8 ; Mac::TRUNCATED_LEN] with Default::default() ... NOT CAUGHT in 4.356s
src/olm/session/message_key.rs:40: replace <impl Drop for RemoteMessageKey>::drop with () ... NOT CAUGHT in 4.240s
src/types/mod.rs:31: replace <impl From for String>::from -> String with "xyzzy".into() ... NOT CAUGHT in 4.008s
src/types/ed25519.rs:113: replace Ed25519SecretKey::to_base64 -> String with "xyzzy".into() ... NOT CAUGHT in 3.903s
src/olm/account/fallback_keys.rs:48: replace FallbackKey::mark_as_published with () ... NOT CAUGHT in 3.929s
src/megolm/message.rs:48: replace MegolmMessage::ciphertext -> &[u8] with Default::default() ... NOT CAUGHT in 4.259s
src/types/curve25519.rs:132: replace Curve25519PublicKey::to_vec -> Vec<u8> with Default::default() ... NOT CAUGHT in 4.309s
src/megolm/session_keys.rs:83: replace <impl Zeroize for ExportedSessionKey>::zeroize with () ... NOT CAUGHT in 4.291s
src/olm/account/fallback_keys.rs:52: replace FallbackKey::published -> bool with false ... NOT CAUGHT in 4.010s
src/olm/session/mod.rs:202: replace Session::has_received_message -> bool with false ... NOT CAUGHT in 4.159s
src/olm/session/mod.rs:420: replace Session::from_libolm_pickle::<impl Drop for Pickle>::drop with () ... NOT CAUGHT in 4.347s
src/megolm/session_keys.rs:90: replace <impl Drop for ExportedSessionKey>::drop with () ... NOT CAUGHT in 4.089s
src/types/curve25519.rs:169: replace <impl Debug for Curve25519PublicKey>::fmt -> std::fmt::Result with Ok(Default::default()) ... NOT CAUGHT in 4.158s
src/olm/session/chain_key.rs:70: replace RemoteChainKey::chain_index -> u64 with Default::default() ... TIMEOUT in 21.756s
src/types/ed25519.rs:240: replace Ed25519PublicKey::verify -> Result<(), SignatureError> with Ok(Default::default()) ... NOT CAUGHT in 4.356s
src/types/ed25519.rs:113: replace Ed25519SecretKey::to_base64 -> String with "".into() ... NOT CAUGHT in 4.009s
src/sas.rs:383: replace EstablishedSas::verify_mac -> Result<(), SasError> with Ok(Default::default()) ... NOT CAUGHT in 4.366s
src/types/mod.rs:37: replace KeyId::to_base64 -> String with "".into() ... NOT CAUGHT in 4.009s
src/olm/messages/pre_key.rs:147: replace PreKeyMessage::wrap -> Self with Default::default() ... NOT CAUGHT in 4.124s
src/olm/session/message_key.rs:71: replace MessageKey::ratchet_key -> RatchetPublicKey with Default::default() ... NOT CAUGHT in 4.174s
src/olm/account/fallback_keys.rs:69: replace FallbackKeys::mark_as_published with () ... NOT CAUGHT in 4.406s
@poljar poljar changed the title Mutation testing. Mutation testing Aug 1, 2022
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 11, 2024
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 11, 2024
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 11, 2024
poljar pushed a commit that referenced this issue Mar 13, 2024
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 13, 2024
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 13, 2024
poljar pushed a commit that referenced this issue Mar 15, 2024
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 17, 2024
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 17, 2024
Relates to: matrix-org#78

Signed-off-by: Johannes Marbach <[email protected]>
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 18, 2024
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 18, 2024
poljar pushed a commit that referenced this issue Mar 18, 2024
Relates to: #78

Signed-off-by: Johannes Marbach <[email protected]>
@Johennes
Copy link
Contributor

For easy reference, here is what currently remains to be fixed (109 misses / 6 timeouts):

MISSED   src/cipher/mod.rs:146:29: replace < with == in Cipher::decrypt_pickle in 0.7s build + 3.7s test
MISSED   src/cipher/mod.rs:146:50: replace + with * in Cipher::decrypt_pickle in 0.8s build + 3.0s test
MISSED   src/cipher/mod.rs:146:50: replace + with - in Cipher::decrypt_pickle in 0.8s build + 3.0s test
MISSED   src/cipher/mod.rs:175:9: replace Cipher::verify_truncated_mac -> Result<(), MacError> with Ok(()) in 0.8s build + 3.5s test
MISSED   src/megolm/group_session.rs:80:9: replace GroupSession::session_config -> SessionConfig with Default::default() in 0.8s build + 2.9s test
MISSED   src/megolm/inbound_group_session.rs:289:47: replace < with == in InboundGroupSession::find_ratchet in 0.8s build + 3.0s test
MISSED   src/megolm/inbound_group_session.rs:302:9: replace InboundGroupSession::verify_mac -> Result<(), DecryptionError> with Ok(()) in 0.9s build + 3.0s test
MISSED   src/megolm/message.rs:133:9: replace MegolmMessage::add_signature -> Result<(), SignatureError> with Ok(()) in 0.8s build + 3.6s test
MISSED   src/megolm/message.rs:282:42: replace + with - in <impl TryFrom for MegolmMessage>::try_from in 0.9s build + 3.2s test
MISSED   src/megolm/message.rs:50:54: replace + with * in 0.8s build + 3.0s test
MISSED   src/megolm/message.rs:54:9: replace MegolmMessage::ciphertext -> &[u8] with Vec::leak(Vec::new()) in 0.8s build + 3.1s test
MISSED   src/megolm/message.rs:54:9: replace MegolmMessage::ciphertext -> &[u8] with Vec::leak(vec![0]) in 0.8s build + 3.4s test
MISSED   src/megolm/message.rs:54:9: replace MegolmMessage::ciphertext -> &[u8] with Vec::leak(vec![1]) in 0.8s build + 3.6s test
MISSED   src/megolm/message.rs:59:9: replace MegolmMessage::message_index -> u32 with 0 in 0.8s build + 3.6s test
MISSED   src/megolm/message.rs:59:9: replace MegolmMessage::message_index -> u32 with 1 in 0.8s build + 2.9s test
MISSED   src/megolm/message.rs:64:9: replace MegolmMessage::mac -> &[u8] with Vec::leak(Vec::new()) in 0.8s build + 3.0s test
MISSED   src/megolm/message.rs:64:9: replace MegolmMessage::mac -> &[u8] with Vec::leak(vec![0]) in 0.7s build + 3.0s test
MISSED   src/megolm/message.rs:64:9: replace MegolmMessage::mac -> &[u8] with Vec::leak(vec![1]) in 0.8s build + 2.9s test
MISSED   src/megolm/mod.rs:34:5: replace default_config -> SessionConfig with Default::default() in 0.8s build + 2.9s test
MISSED   src/megolm/ratchet.rs:218:31: replace < with == in Ratchet::advance_to in 0.8s build + 3.1s test
MISSED   src/megolm/session_config.rs:33:9: replace SessionConfig::version -> u8 with 0 in 0.8s build + 2.9s test
MISSED   src/megolm/session_config.rs:33:9: replace SessionConfig::version -> u8 with 1 in 0.8s build + 2.9s test
MISSED   src/megolm/session_keys.rs:141:9: replace <impl Zeroize for ExportedSessionKey>::zeroize with () in 0.8s build + 3.1s test
MISSED   src/megolm/session_keys.rs:291:9: replace <impl Zeroize for SessionKey>::zeroize with () in 0.8s build + 3.0s test
MISSED   src/olm/account/fallback_keys.rs:49:9: replace FallbackKey::mark_as_published with () in 0.8s build + 2.9s test
MISSED   src/olm/account/fallback_keys.rs:53:9: replace FallbackKey::published -> bool with false in 0.8s build + 3.0s test
MISSED   src/olm/account/fallback_keys.rs:70:9: replace FallbackKeys::mark_as_published with () in 0.8s build + 3.3s test
MISSED   src/olm/account/fallback_keys.rs:77:21: replace += with *= in FallbackKeys::generate_fallback_key in 0.8s build + 3.1s test
MISSED   src/olm/account/fallback_keys.rs:98:9: replace FallbackKeys::forget_previous_fallback_key -> Option<FallbackKey> with None in 0.9s build + 2.9s test
MISSED   src/olm/account/mod.rs:152:9: replace Account::max_number_of_one_time_keys -> usize with 0 in 0.8s build + 2.9s test
MISSED   src/olm/account/mod.rs:152:9: replace Account::max_number_of_one_time_keys -> usize with 1 in 0.8s build + 2.9s test
MISSED   src/olm/account/mod.rs:201:9: replace Account::remove_one_time_key -> Option<Curve25519SecretKey> with None in 0.8s build + 2.9s test
MISSED   src/olm/account/mod.rs:201:9: replace Account::remove_one_time_key -> Option<Curve25519SecretKey> with Some(Default::default()) in 0.8s build + 2.8s test
MISSED   src/olm/account/mod.rs:289:9: replace Account::stored_one_time_key_count -> usize with 0 in 0.8s build + 2.9s test
MISSED   src/olm/account/mod.rs:289:9: replace Account::stored_one_time_key_count -> usize with 1 in 0.8s build + 2.8s test
MISSED   src/olm/account/mod.rs:334:9: replace Account::forget_fallback_key -> bool with false in 1.0s build + 3.4s test
MISSED   src/olm/account/mod.rs:334:9: replace Account::forget_fallback_key -> bool with true in 0.8s build + 3.2s test
MISSED   src/olm/account/mod.rs:339:9: replace Account::mark_keys_as_published with () in 0.9s build + 3.5s test
MISSED   src/olm/account/mod.rs:419:9: replace Account::from_decrypted_libolm_pickle -> Result<Self, crate::LibolmPickleError> with Ok(Default::default()) in 1.0s build + 3.0s test
MISSED   src/olm/account/mod.rs:545:25: replace += with *= in libolm::<impl Encode for FallbackKeysArray>::encode in 0.9s build + 3.1s test
MISSED   src/olm/account/mod.rs:551:25: replace += with *= in libolm::<impl Encode for FallbackKeysArray>::encode in 0.8s build + 3.0s test
MISSED   src/olm/account/mod.rs:551:25: replace += with -= in libolm::<impl Encode for FallbackKeysArray>::encode in 0.8s build + 3.0s test
MISSED   src/olm/account/mod.rs:552:25: replace += with *= in libolm::<impl Encode for FallbackKeysArray>::encode in 0.9s build + 3.0s test
MISSED   src/olm/account/mod.rs:552:25: replace += with -= in libolm::<impl Encode for FallbackKeysArray>::encode in 0.9s build + 3.1s test
MISSED   src/olm/account/one_time_keys.rs:126:9: replace OneTimeKeys::is_secret_key_published -> bool with false in 0.9s build + 3.5s test
MISSED   src/olm/account/one_time_keys.rs:126:9: replace OneTimeKeys::is_secret_key_published -> bool with true in 0.9s build + 3.4s test
MISSED   src/olm/account/one_time_keys.rs:45:42: replace * with + in 1.0s build + 3.5s test
MISSED   src/olm/messages/mod.rs:99:9: replace OlmMessage::message -> &[u8] with Vec::leak(Vec::new()) in 0.8s build + 3.1s test
MISSED   src/olm/messages/mod.rs:99:9: replace OlmMessage::message -> &[u8] with Vec::leak(vec![0]) in 0.8s build + 2.9s test
MISSED   src/olm/messages/mod.rs:99:9: replace OlmMessage::message -> &[u8] with Vec::leak(vec![1]) in 1.0s build + 3.0s test
MISSED   src/olm/session/chain_key.rs:112:9: replace ChainKey::index -> u64 with 0 in 0.8s build + 3.2s test
MISSED   src/olm/session/chain_key.rs:112:9: replace ChainKey::index -> u64 with 1 in 0.8s build + 2.9s test
MISSED   src/olm/session/double_ratchet.rs:34:9: replace DoubleRatchet::chain_index -> Option<u64> with None in 0.9s build + 3.1s test
MISSED   src/olm/session/double_ratchet.rs:34:9: replace DoubleRatchet::chain_index -> Option<u64> with Some(0) in 0.9s build + 3.2s test
MISSED   src/olm/session/double_ratchet.rs:34:9: replace DoubleRatchet::chain_index -> Option<u64> with Some(1) in 1.0s build + 3.1s test
MISSED   src/olm/session/mod.rs:222:9: replace Session::has_received_message -> bool with false in 0.8s build + 3.0s test
MISSED   src/olm/session/mod.rs:252:9: replace Session::session_config -> SessionConfig with Default::default() in 0.8s build + 3.4s test
MISSED   src/olm/session/mod.rs:481:5: replace default_config -> SessionConfig with Default::default() in 0.8s build + 3.7s test
MISSED   src/olm/session/mod.rs:95:9: replace ChainStore::is_empty -> bool with true in 0.9s build + 3.1s test
MISSED   src/olm/session/ratchet.rs:62:9: replace <impl From for RatchetKey>::from -> Self with Default::default() in 0.8s build + 3.0s test
MISSED   src/olm/session_config.rs:33:9: replace SessionConfig::version -> u8 with 0 in 0.8s build + 2.8s test
MISSED   src/olm/session_config.rs:33:9: replace SessionConfig::version -> u8 with 1 in 0.7s build + 2.8s test
MISSED   src/sas.rs:152:9: replace SasBytes::emoji_indices -> [u8; 7] with [0; 7] in 0.8s build + 3.7s test
MISSED   src/sas.rs:152:9: replace SasBytes::emoji_indices -> [u8; 7] with [1; 7] in 0.8s build + 3.7s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (0, 0, 0) in 0.9s build + 3.4s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (0, 0, 1) in 0.8s build + 3.0s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (0, 1, 0) in 0.8s build + 3.7s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (0, 1, 1) in 0.8s build + 3.3s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (1, 0, 0) in 0.8s build + 3.7s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (1, 0, 1) in 0.7s build + 3.7s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (1, 1, 0) in 0.8s build + 3.0s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (1, 1, 1) in 1.0s build + 3.1s test
MISSED   src/sas.rs:166:9: replace SasBytes::as_bytes -> &[u8; 6] with &[0; 6] in 0.9s build + 2.9s test
MISSED   src/sas.rs:166:9: replace SasBytes::as_bytes -> &[u8; 6] with &[1; 6] in 0.8s build + 2.8s test
MISSED   src/sas.rs:204:35: replace | with ^ in SasBytes::bytes_to_decimal in 1.0s build + 3.0s test
MISSED   src/sas.rs:205:45: replace | with ^ in SasBytes::bytes_to_decimal in 0.8s build + 2.9s test
MISSED   src/sas.rs:205:61: replace | with ^ in SasBytes::bytes_to_decimal in 1.1s build + 3.1s test
MISSED   src/sas.rs:206:44: replace | with ^ in SasBytes::bytes_to_decimal in 0.8s build + 2.9s test
MISSED   src/sas.rs:384:9: replace EstablishedSas::verify_mac -> Result<(), SasError> with Ok(()) in 0.9s build + 3.6s test
MISSED   src/types/curve25519.rs:143:9: replace Curve25519PublicKey::to_vec -> Vec<u8> with vec![0] in 0.8s build + 3.2s test
MISSED   src/types/curve25519.rs:143:9: replace Curve25519PublicKey::to_vec -> Vec<u8> with vec![1] in 0.9s build + 3.0s test
MISSED   src/types/curve25519.rs:143:9: replace Curve25519PublicKey::to_vec -> Vec<u8> with vec![] in 0.8s build + 2.8s test
MISSED   src/types/curve25519.rs:192:9: replace <impl Display for Curve25519PublicKey>::fmt -> std::fmt::Result with Ok(Default::default()) in 0.9s build + 3.2s test
MISSED   src/types/curve25519.rs:58:9: replace Curve25519SecretKey::to_bytes -> Box<[u8; 32]> with Box::new([0; 32]) in 0.9s build + 3.1s test
MISSED   src/types/curve25519.rs:58:9: replace Curve25519SecretKey::to_bytes -> Box<[u8; 32]> with Box::new([1; 32]) in 0.9s build + 3.1s test
MISSED   src/types/ed25519.rs:111:24: replace != with == in <impl Deserialize for ExpandedSecretKey>::deserialize in 0.8s build + 3.1s test
MISSED   src/types/ed25519.rs:153:9: replace Ed25519Keypair::expanded_secret_key -> Box<[u8; 64]> with Box::new([0; 64]) in 1.0s build + 3.7s test
MISSED   src/types/ed25519.rs:153:9: replace Ed25519Keypair::expanded_secret_key -> Box<[u8; 64]> with Box::new([1; 64]) in 0.9s build + 3.7s test
MISSED   src/types/ed25519.rs:209:9: replace Ed25519SecretKey::to_bytes -> Box<[u8; 32]> with Box::new([0; 32]) in 0.8s build + 2.8s test
MISSED   src/types/ed25519.rs:209:9: replace Ed25519SecretKey::to_bytes -> Box<[u8; 32]> with Box::new([1; 32]) in 0.9s build + 3.0s test
MISSED   src/types/ed25519.rs:214:9: replace Ed25519SecretKey::from_slice -> Self with Default::default() in 0.8s build + 2.8s test
MISSED   src/types/ed25519.rs:225:9: replace Ed25519SecretKey::to_base64 -> String with "xyzzy".into() in 0.9s build + 3.5s test
MISSED   src/types/ed25519.rs:225:9: replace Ed25519SecretKey::to_base64 -> String with String::new() in 0.9s build + 3.4s test
MISSED   src/types/ed25519.rs:235:24: replace != with == in Ed25519SecretKey::from_base64 in 0.8s build + 2.9s test
MISSED   src/types/ed25519.rs:235:47: replace && with || in Ed25519SecretKey::from_base64 in 0.8s build + 2.9s test
MISSED   src/types/ed25519.rs:235:62: replace != with == in Ed25519SecretKey::from_base64 in 0.8s build + 2.9s test
MISSED   src/types/ed25519.rs:235:9: replace Ed25519SecretKey::from_base64 -> Result<Self, crate::KeyError> with Ok(Default::default()) in 0.9s build + 3.7s test
MISSED   src/types/ed25519.rs:338:24: replace != with == in Ed25519PublicKey::from_base64 in 1.0s build + 3.0s test
MISSED   src/types/ed25519.rs:338:47: replace && with || in Ed25519PublicKey::from_base64 in 0.8s build + 2.9s test
MISSED   src/types/ed25519.rs:338:62: replace != with == in Ed25519PublicKey::from_base64 in 0.8s build + 3.0s test
MISSED   src/types/ed25519.rs:385:9: replace Ed25519PublicKey::verify -> Result<(), SignatureError> with Ok(()) in 0.9s build + 3.7s test
MISSED   src/types/ed25519.rs:404:9: replace <impl Display for Ed25519PublicKey>::fmt -> std::fmt::Result with Ok(Default::default()) in 0.8s build + 3.0s test
MISSED   src/types/ed25519.rs:448:9: replace <impl Display for Ed25519Signature>::fmt -> std::fmt::Result with Ok(Default::default()) in 0.8s build + 3.0s test
MISSED   src/types/ed25519.rs:70:9: replace ExpandedSecretKey::as_bytes -> &[u8; 64] with &[0; 64] in 0.8s build + 3.3s test
MISSED   src/types/ed25519.rs:70:9: replace ExpandedSecretKey::as_bytes -> &[u8; 64] with &[1; 64] in 0.8s build + 3.2s test
MISSED   src/types/mod.rs:33:9: replace <impl From for String>::from -> String with "xyzzy".into() in 0.7s build + 3.0s test
MISSED   src/types/mod.rs:33:9: replace <impl From for String>::from -> String with String::new() in 0.8s build + 3.1s test
MISSED   src/types/mod.rs:39:9: replace KeyId::to_base64 -> String with "xyzzy".into() in 0.9s build + 3.2s test
MISSED   src/types/mod.rs:39:9: replace KeyId::to_base64 -> String with String::new() in 0.8s build + 3.2s test
TIMEOUT  src/megolm/ratchet.rs:230:23: replace -= with += in Ratchet::advance_to in 0.8s build + 22.0s test
TIMEOUT  src/megolm/ratchet.rs:230:23: replace -= with /= in Ratchet::advance_to in 0.8s build + 22.0s test
TIMEOUT  src/olm/session/chain_key.rs:71:9: replace RemoteChainKey::chain_index -> u64 with 0 in 0.8s build + 22.0s test
TIMEOUT  src/olm/session/chain_key.rs:71:9: replace RemoteChainKey::chain_index -> u64 with 1 in 0.8s build + 22.0s test
TIMEOUT  src/olm/session/chain_key.rs:80:9: replace RemoteChainKey::advance with () in 0.8s build + 22.1s test
TIMEOUT  src/olm/session/chain_key.rs:82:20: replace += with *= in RemoteChainKey::advance in 0.8s build + 22.0s test

Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 19, 2024
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 19, 2024
poljar pushed a commit that referenced this issue Mar 20, 2024
Relates to: #78

Signed-off-by: Johannes Marbach <[email protected]>
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 20, 2024
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 20, 2024
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 25, 2024
Relates to: matrix-org#78

Signed-off-by: Johannes Marbach <[email protected]>
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 25, 2024
Relates to: matrix-org#78

Signed-off-by: Johannes Marbach <[email protected]>
@Johennes
Copy link
Contributor

Here's what remains after #138:

MISSED   src/cipher/mod.rs:146:29: replace < with == in Cipher::decrypt_pickle in 0.8s build + 3.1s test
MISSED   src/cipher/mod.rs:146:50: replace + with * in Cipher::decrypt_pickle in 0.9s build + 3.1s test
MISSED   src/cipher/mod.rs:146:50: replace + with - in Cipher::decrypt_pickle in 0.8s build + 3.2s test
MISSED   src/cipher/mod.rs:175:9: replace Cipher::verify_truncated_mac -> Result<(), MacError> with Ok(()) in 0.8s build + 3.7s test
MISSED   src/megolm/group_session.rs:80:9: replace GroupSession::session_config -> SessionConfig with Default::default() in 0.8s build + 3.1s test
MISSED   src/megolm/inbound_group_session.rs:289:47: replace < with == in InboundGroupSession::find_ratchet in 0.8s build + 3.1s test
MISSED   src/megolm/inbound_group_session.rs:302:9: replace InboundGroupSession::verify_mac -> Result<(), DecryptionError> with Ok(()) in 1.0s build + 3.1s test
MISSED   src/megolm/message.rs:133:9: replace MegolmMessage::add_signature -> Result<(), SignatureError> with Ok(()) in 0.8s build + 3.7s test
MISSED   src/megolm/message.rs:282:42: replace + with - in <impl TryFrom for MegolmMessage>::try_from in 0.8s build + 3.0s test
MISSED   src/megolm/message.rs:50:54: replace + with * in 0.8s build + 3.2s test
MISSED   src/megolm/message.rs:54:9: replace MegolmMessage::ciphertext -> &[u8] with Vec::leak(Vec::new()) in 0.8s build + 3.0s test
MISSED   src/megolm/message.rs:54:9: replace MegolmMessage::ciphertext -> &[u8] with Vec::leak(vec![0]) in 0.8s build + 3.4s test
MISSED   src/megolm/message.rs:54:9: replace MegolmMessage::ciphertext -> &[u8] with Vec::leak(vec![1]) in 0.8s build + 3.0s test
MISSED   src/megolm/message.rs:59:9: replace MegolmMessage::message_index -> u32 with 0 in 0.8s build + 2.9s test
MISSED   src/megolm/message.rs:59:9: replace MegolmMessage::message_index -> u32 with 1 in 0.8s build + 3.0s test
MISSED   src/megolm/message.rs:64:9: replace MegolmMessage::mac -> &[u8] with Vec::leak(Vec::new()) in 0.8s build + 3.1s test
MISSED   src/megolm/message.rs:64:9: replace MegolmMessage::mac -> &[u8] with Vec::leak(vec![0]) in 0.8s build + 3.2s test
MISSED   src/megolm/message.rs:64:9: replace MegolmMessage::mac -> &[u8] with Vec::leak(vec![1]) in 0.9s build + 3.3s test
MISSED   src/megolm/mod.rs:34:5: replace default_config -> SessionConfig with Default::default() in 0.8s build + 3.2s test
MISSED   src/megolm/ratchet.rs:218:31: replace < with == in Ratchet::advance_to in 0.7s build + 3.0s test
MISSED   src/megolm/session_config.rs:33:9: replace SessionConfig::version -> u8 with 0 in 0.8s build + 3.0s test
MISSED   src/megolm/session_config.rs:33:9: replace SessionConfig::version -> u8 with 1 in 0.8s build + 3.5s test
MISSED   src/megolm/session_keys.rs:141:9: replace <impl Zeroize for ExportedSessionKey>::zeroize with () in 1.0s build + 3.2s test
MISSED   src/megolm/session_keys.rs:291:9: replace <impl Zeroize for SessionKey>::zeroize with () in 0.9s build + 3.2s test
MISSED   src/olm/account/one_time_keys.rs:45:42: replace * with + in 0.8s build + 3.2s test
MISSED   src/olm/messages/mod.rs:99:9: replace OlmMessage::message -> &[u8] with Vec::leak(Vec::new()) in 0.8s build + 3.2s test
MISSED   src/olm/messages/mod.rs:99:9: replace OlmMessage::message -> &[u8] with Vec::leak(vec![0]) in 0.8s build + 2.9s test
MISSED   src/olm/messages/mod.rs:99:9: replace OlmMessage::message -> &[u8] with Vec::leak(vec![1]) in 0.8s build + 3.1s test
MISSED   src/olm/session/chain_key.rs:112:9: replace ChainKey::index -> u64 with 0 in 0.8s build + 3.0s test
MISSED   src/olm/session/chain_key.rs:112:9: replace ChainKey::index -> u64 with 1 in 0.8s build + 2.9s test
MISSED   src/olm/session/mod.rs:226:9: replace Session::has_received_message -> bool with false in 0.8s build + 3.1s test
MISSED   src/olm/session/mod.rs:256:9: replace Session::session_config -> SessionConfig with Default::default() in 0.7s build + 3.0s test
MISSED   src/olm/session/mod.rs:485:5: replace default_config -> SessionConfig with Default::default() in 0.9s build + 3.8s test
MISSED   src/olm/session/mod.rs:98:9: replace ChainStore::is_empty -> bool with true in 1.1s build + 3.2s test
MISSED   src/olm/session/ratchet.rs:79:9: replace <impl From for RatchetKey>::from -> Self with Default::default() in 0.8s build + 3.1s test
MISSED   src/olm/session_config.rs:33:9: replace SessionConfig::version -> u8 with 0 in 0.9s build + 3.0s test
MISSED   src/olm/session_config.rs:33:9: replace SessionConfig::version -> u8 with 1 in 0.8s build + 3.5s test
MISSED   src/sas.rs:152:9: replace SasBytes::emoji_indices -> [u8; 7] with [0; 7] in 0.8s build + 3.4s test
MISSED   src/sas.rs:152:9: replace SasBytes::emoji_indices -> [u8; 7] with [1; 7] in 0.9s build + 3.4s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (0, 0, 0) in 0.8s build + 3.1s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (0, 0, 1) in 0.8s build + 3.7s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (0, 1, 0) in 0.8s build + 3.0s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (0, 1, 1) in 0.8s build + 3.0s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (1, 0, 0) in 0.8s build + 3.7s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (1, 0, 1) in 0.8s build + 3.0s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (1, 1, 0) in 0.8s build + 3.0s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (1, 1, 1) in 0.8s build + 3.7s test
MISSED   src/sas.rs:166:9: replace SasBytes::as_bytes -> &[u8; 6] with &[0; 6] in 0.8s build + 2.9s test
MISSED   src/sas.rs:166:9: replace SasBytes::as_bytes -> &[u8; 6] with &[1; 6] in 0.8s build + 2.9s test
MISSED   src/sas.rs:204:35: replace | with ^ in SasBytes::bytes_to_decimal in 0.9s build + 3.0s test
MISSED   src/sas.rs:205:45: replace | with ^ in SasBytes::bytes_to_decimal in 0.8s build + 2.9s test
MISSED   src/sas.rs:205:61: replace | with ^ in SasBytes::bytes_to_decimal in 0.8s build + 2.9s test
MISSED   src/sas.rs:206:44: replace | with ^ in SasBytes::bytes_to_decimal in 0.8s build + 3.7s test
MISSED   src/sas.rs:384:9: replace EstablishedSas::verify_mac -> Result<(), SasError> with Ok(()) in 0.9s build + 3.8s test
MISSED   src/types/mod.rs:33:9: replace <impl From for String>::from -> String with "xyzzy".into() in 0.7s build + 3.0s test
MISSED   src/types/mod.rs:33:9: replace <impl From for String>::from -> String with String::new() in 0.8s build + 3.2s test
MISSED   src/types/mod.rs:39:9: replace KeyId::to_base64 -> String with "xyzzy".into() in 1.0s build + 3.2s test
MISSED   src/types/mod.rs:39:9: replace KeyId::to_base64 -> String with String::new() in 0.8s build + 3.2s test
TIMEOUT  src/megolm/ratchet.rs:230:23: replace -= with += in Ratchet::advance_to in 0.8s build + 23.0s test
TIMEOUT  src/megolm/ratchet.rs:230:23: replace -= with /= in Ratchet::advance_to in 0.8s build + 23.0s test
TIMEOUT  src/olm/session/chain_key.rs:71:9: replace RemoteChainKey::chain_index -> u64 with 0 in 0.8s build + 23.0s test
TIMEOUT  src/olm/session/chain_key.rs:71:9: replace RemoteChainKey::chain_index -> u64 with 1 in 1.0s build + 23.0s test
TIMEOUT  src/olm/session/chain_key.rs:80:9: replace RemoteChainKey::advance with () in 0.8s build + 23.0s test
TIMEOUT  src/olm/session/chain_key.rs:82:20: replace += with *= in RemoteChainKey::advance in 0.8s build + 23.0s test

Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 26, 2024
Relates to: matrix-org#78

Signed-off-by: Johannes Marbach <[email protected]>
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 26, 2024
Relates to: matrix-org#78

Signed-off-by: Johannes Marbach <[email protected]>
Johennes added a commit to Johennes/vodozemac that referenced this issue Mar 27, 2024
Relates to: matrix-org#78

Signed-off-by: Johannes Marbach <[email protected]>
Johennes added a commit to Johennes/vodozemac that referenced this issue Apr 9, 2024
Johennes added a commit to Johennes/vodozemac that referenced this issue Apr 9, 2024
Relates to: matrix-org#78

Signed-off-by: Johannes Marbach <[email protected]>
Johennes added a commit to Johennes/vodozemac that referenced this issue Apr 9, 2024
Johennes added a commit to Johennes/vodozemac that referenced this issue Apr 22, 2024
Fixes: matrix-org#78
Signed-off-by: Johannes Marbach <[email protected]>
@Johennes
Copy link
Contributor

This should be all resolved once #142 and #147 land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants