Bug 1859159 (rust-psa-crypto)
| Summary: | Review Request: rust-psa-crypto - Wrapper around the PSA Cryptography API | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Peter Robinson <pbrobinson> |
| Component: | Package Review | Assignee: | Robert-André Mauchin 🐧 <eclipseo> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | eclipseo, package-review |
| Target Milestone: | --- | Flags: | eclipseo:
fedora-review+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-07-22 16:44:14 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1857748, 1858486, 1858604, 1859151 | ||
| Bug Blocks: | 1269538, 1859994, 1862796, 1878923 | ||
|
Description
Peter Robinson
2020-07-21 11:15:22 UTC
I've got one test failure:
Running `/builddir/build/BUILD/psa-crypto-0.3.0/target/release/deps/mod-bf0093524e460258`
running 3 tests
test export_key_pair_test ... ok
test import_integration_test ... FAILED
test generate_integration_test ... ok
failures:
---- import_integration_test stdout ----
thread 'import_integration_test' panicked at 'called `Result::unwrap()` on an `Err` value: StorageFailure', tests/mod.rs:155:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
import_integration_test
test result: FAILED. 2 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
Backtrace
---- export_key_pair_test stdout ----
thread 'export_key_pair_test' panicked at 'called `Result::unwrap()` on an `Err` value: StorageFailure', tests/mod.rs:155:22
stack backtrace:
0: 0x559ebc0118a5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h83fd459720a1b780
1: 0x559ebc0358dc - core::fmt::write::h0fb2c8a7c74dc706
2: 0x559ebbf8c0a5 - std::io::Write::write_fmt::hb203e303045fd2e8
3: 0x559ebc00bcb1 - std::io::impls::<impl std::io::Write for alloc::boxed::Box<W>>::write_fmt::hbcb41256641e1664
4: 0x559ebc0140d0 - std::panicking::default_hook::{{closure}}::hbb12a969b90f30ab
5: 0x559ebc013dca - std::panicking::default_hook::hd46a6f05cd95ae1c
6: 0x559ebc014707 - std::panicking::rust_panic_with_hook::hfaf36f07e96e1a70
7: 0x559ebc01430b - rust_begin_unwind
8: 0x559ebc034281 - core::panicking::panic_fmt::ha79c22c8889dbf6b
9: 0x559ebc0340a3 - core::option::expect_none_failed::he9f78d166510670b
10: 0x559ebbf8a659 - core::result::Result<T,E>::unwrap::h3e1a442c611a1234
at /builddir/build/BUILD/rustc-1.45.0-src/src/libcore/result.rs:1005
11: 0x559ebbf8a659 - mod::test_tools::TestClient::import::h2b975496b53e491a
at tests/mod.rs:155
12: 0x559ebbf8a659 - mod::export_key_pair_test::hc1fe2c966e9ab52a
at tests/mod.rs:124
13: 0x559ebbf8a659 - mod::export_key_pair_test::{{closure}}::hfebe911071c9ccf8
at tests/mod.rs:82
14: 0x559ebbf8a659 - core::ops::function::FnOnce::call_once::hb7c8e6f4e27a34b4
at /builddir/build/BUILD/rustc-1.45.0-src/src/libcore/ops/function.rs:232
15: 0x559ebbfb33b2 - test::run_test::run_test_inner::{{closure}}::h8ead2fffa18ec440
16: 0x559ebbf8b566 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0514d4ec185c1c32
17: 0x559ebbf906e5 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h6d24acaff99ea573
18: 0x559ebc01a9da - std::sys::unix::thread::Thread::new::thread_start::h4354789cb8f1f413
19: 0x7f601626d53a - start_thread
20: 0x7f601617e283 - __GI___clone
21: 0x0 - <unknown>
failures:
export_key_pair_test
test result: FAILED$<2>. 2 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
Ok so I asked upstream and they say the Mbed Crypto implementation is not thread safe so running the test with the default command is likely to trigger errors.
Instead you should pass --test-threads=1 to cargo test:
%if %{with check}
%check
%cargo_test -- -- --test-threads=1
%endif
After doing this I was able to build the package successfully.
- License ok
- Latest version packaged
- Builds in mock
- No rpmlint errors
- Conforms to Packaging Guidelines
Package approved. Please fix the test issue before import.
(In reply to Robert-André Mauchin 🐧 from comment #3) > Ok so I asked upstream and they say the Mbed Crypto implementation is not > thread safe so running the test with the default command is likely to > trigger errors. > > Instead you should pass --test-threads=1 to cargo test: Thanks for following this up Robert, I was going to look into this today. (fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-psa-crypto |