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

sparse_array_usize test failures on i686 #81

Closed
mattiaverga opened this issue Sep 6, 2023 · 2 comments · Fixed by #82
Closed

sparse_array_usize test failures on i686 #81

mattiaverga opened this issue Sep 6, 2023 · 2 comments · Fixed by #82

Comments

@mattiaverga
Copy link

Hello,
while packaging rpds in Fedora we encountered some tests failures which happen only on i686 architecture:

...
test map::hash_trie_map::sparse_array_usize::test::test_first ... FAILED
...
test map::hash_trie_map::sparse_array_usize::test::test_pop ... FAILED
...
failures:
---- map::hash_trie_map::sparse_array_usize::test::test_first stdout ----
thread 'map::hash_trie_map::sparse_array_usize::test::test_first' panicked at 'assertion failed: `(left == right)`
Diff < left / right > :
 Some(
<    '�[1;48;5;52;31mb',
>    '�[1;48;5;22;32ma',
 )
', src/map/hash_trie_map/sparse_array_usize/test.rs:85:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- map::hash_trie_map::sparse_array_usize::test::test_pop stdout ----
thread 'map::hash_trie_map::sparse_array_usize::test::test_pop' panicked at 'assertion failed: `(left == right)`
Diff < left / right > :
 Some(
<    '�[1;48;5;52;31ma',
>    '�[1;48;5;22;32mb',
 )
', src/map/hash_trie_map/sparse_array_usize/test.rs:101:5
failures:
    map::hash_trie_map::sparse_array_usize::test::test_first
    map::hash_trie_map::sparse_array_usize::test::test_pop
test result: FAILED. 257 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.71s

I am wondering if this is just a rounding precision problem in tests, or if rpds should not be used in i686.
(full build.log at https://koji.fedoraproject.org/koji/taskinfo?taskID=105821360)
Thank you

@orium
Copy link
Owner

orium commented Sep 6, 2023

Hi. Thanks for reporting. The tests were written for 64 bit platforms and they fail on 32 bit computers. It's only the tests that have a problem, not the implementation itself. I'll publish a fix soon.

orium added a commit that referenced this issue Sep 6, 2023
…ers.

This issue did not affect production code which did work correctly on 32-bit
platforms.

Closes #81.
@orium orium closed this as completed in #82 Sep 6, 2023
orium added a commit that referenced this issue Sep 6, 2023
…ers.

This issue did not affect production code which did work correctly on 32-bit
platforms.

Closes #81.
@orium
Copy link
Owner

orium commented Sep 6, 2023

Fix released in v1.0.1.

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