Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1859159 (rust-psa-crypto) - Review Request: rust-psa-crypto - Wrapper around the PSA Cryptography API
Summary: Review Request: rust-psa-crypto - Wrapper around the PSA Cryptography API
Keywords:
Status: CLOSED RAWHIDE
Alias: rust-psa-crypto
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: rust-psa-crypto-sys rust-zeroize rust-zeroize_derive rust-rsa
Blocks: IoT PARSEC rust-parsec-interface 1878923
TreeView+ depends on / blocked
 
Reported: 2020-07-21 11:15 UTC by Peter Robinson
Modified: 2020-09-14 22:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-22 16:44:14 UTC
Type: Bug
Embargoed:
zebob.m: fedora-review+


Attachments (Terms of Use)

Description Peter Robinson 2020-07-21 11:15:22 UTC
SPEC: https://pbrobinson.fedorapeople.org/rust-psa-crypto.spec
SRPM: https://pbrobinson.fedorapeople.org/rust-psa-crypto-0.3.0-1.fc32.src.rpm

Description:
Wrapper around the PSA Cryptography API

FAS: pbrobinson

Comment 1 Robert-André Mauchin 🐧 2020-07-21 18:30:02 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

Comment 2 Robert-André Mauchin 🐧 2020-07-21 18:54:19 UTC
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

Comment 3 Robert-André Mauchin 🐧 2020-07-21 23:18:26 UTC
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.

Comment 4 Peter Robinson 2020-07-22 07:29:53 UTC
(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.

Comment 5 Gwyn Ciesla 2020-07-22 13:32:52 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-psa-crypto


Note You need to log in before you can comment on or make changes to this bug.