Skip to content

Commit 1dee404

Browse files
committed
rust-themis: Run the skipped tests on the 32bit
They were skipped because allocation on 32-bit platforms failed while trying to allocate something bigger than 2GB. This is due to usage of `.reserve` which panics if it couldn't fulfill the request. Since we traversed to the rust 1.58, we now have the `try_*` methods, including the `.try_reserve` which allows us handle panics gracefully. I've tested it manually on pi4 and it works!
1 parent 33204a9 commit 1dee404

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

tests/rust/secure_cell.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -760,11 +760,6 @@ mod token_protect {
760760
}
761761

762762
#[test]
763-
// FIXME(ilammy, 2020-05-25): avoid capacity allocation panics (T1649)
764-
// This tests panics on 32-bit architectures due to size overflow.
765-
// The implementation needs to use Vec::try_reserve instead of Vec::reserve
766-
// when it becomes available in stable Rust.
767-
#[cfg_attr(target_pointer_width = "32", ignore)]
768763
fn detects_corrupted_token() {
769764
let cell = SecureCell::with_key(SymmetricKey::new())
770765
.unwrap()
@@ -817,11 +812,6 @@ mod token_protect {
817812
}
818813

819814
#[test]
820-
// FIXME(ilammy, 2020-05-25): avoid capacity allocation panics (T1649)
821-
// This tests panics on 32-bit architectures due to size overflow.
822-
// The implementation needs to use Vec::try_reserve instead of Vec::reserve
823-
// when it becomes available in stable Rust.
824-
#[cfg_attr(target_pointer_width = "32", ignore)]
825815
fn detects_data_token_swap() {
826816
let cell = SecureCell::with_key(SymmetricKey::new())
827817
.unwrap()

0 commit comments

Comments
 (0)