Skip to content

Commit

Permalink
Fix test for 32bit arch
Browse files Browse the repository at this point in the history
The value we use in the token info debug test overflows on 32bit
architectures and makes the test fail. This fixes the issue by making
the overflowing value < 2^32.

Signed-off-by: Ionut Mihalcea <[email protected]>
  • Loading branch information
ionut-arm committed Nov 28, 2023
1 parent 6b81342 commit c7fce24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cryptoki/src/slot/token_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ SO_PIN_TO_BE_CHANGED | ERROR_STATE";
rw_session_count: Some(1),
max_pin_len: 16,
min_pin_len: 4,
total_public_memory: Some(32 << 30), // 32GiB
total_public_memory: Some(1073741824), // 1GiB
free_public_memory: Some(1234567890),
total_private_memory: None, // unavailable
free_private_memory: None, // unavailable
Expand Down Expand Up @@ -521,7 +521,7 @@ SO_PIN_TO_BE_CHANGED | ERROR_STATE";
max_pin_len: 16,
min_pin_len: 4,
total_public_memory: Some(
34359738368,
1073741824,
),
free_public_memory: Some(
1234567890,
Expand Down

0 comments on commit c7fce24

Please sign in to comment.