Skip to content

Test Issue #226

@rayc345

Description

@rayc345

Hello, I have problems in testing this repo, please help.
I install rust and relavent packages on a brand new Debian (trixie on wsl).
I would always meet errors when call make test, here is the log of opcard-rs (Using current master branch):

ray@DESKTOP-MV2QQ1Q:~/opcard-rs$ make test
cargo test --features vpicc,rsa4096-gen 
warning: hiding a lifetime that's elided elsewhere is confusing
   --> src/command/private_key_template.rs:268:29
    |
268 | fn parse_rsa_template(data: &[u8]) -> Option<RsaImportFormat> {
    |                             ^^^^^            --------------- the same lifetime is hidden here
    |                             |
    |                             the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
    |
268 | fn parse_rsa_template(data: &[u8]) -> Option<RsaImportFormat<'_>> {
    |                                                             ++++

warning: hiding a lifetime that's elided elsewhere is confusing
   --> src/state.rs:249:17
    |
249 |     pub fn lend(&mut self) -> LoadedState {
    |                 ^^^^^^^^^     ----------- the same lifetime is hidden here
    |                 |
    |                 the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
    |
249 |     pub fn lend(&mut self) -> LoadedState<'_> {
    |                                          ++++

warning: `opcard` (lib) generated 2 warnings
warning: `opcard` (lib test) generated 2 warnings (2 duplicates)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s
warning: the following packages contain code that will be rejected by a future version of Rust: openpgp-card v0.3.7
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
     Running unittests src/lib.rs (target/debug/deps/opcard-b73f483c9259ac62)

running 13 tests
test card::tests::aid ... ok
test card::reply::tests::prep_length ... ok
test command::data::tests::constructed_tag ... ok
test state::tests::versions_include_current ... ok
test tlv::tests::dos ... ok
test types::tests::asssert_alg_values ... ok
test types::tests::asssert_aut_values ... ok
test command::data::tests::tags ... ok
test types::tests::asssert_sign_values ... ok
test command::data::tests::max_nesting ... ok
test types::tests::asssert_dec_values ... ok
test state::tests::test_deserialization ... ok
test command::data::tests::constructed_dos_tlv ... ok

test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

     Running tests/brainpool-p256r1.rs (target/debug/deps/brainpool_p256r1-84b1107b57ca79d3)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/brainpool-p256r1-import.rs (target/debug/deps/brainpool_p256r1_import-0c517f1214e66bc1)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/brainpool-p384r1.rs (target/debug/deps/brainpool_p384r1-fec6db9ecd0281c4)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/brainpool-p384r1-import.rs (target/debug/deps/brainpool_p384r1_import-8511b35ec0d8cfc0)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/brainpool-p512r1.rs (target/debug/deps/brainpool_p512r1-d0dc7006fac4c6c5)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/brainpool-p512r1-import.rs (target/debug/deps/brainpool_p512r1_import-d55e7d24ea0d9358)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/change-pin.rs (target/debug/deps/change_pin-eae1caecd2259067)

running 1 test
test change ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s

     Running tests/command-response.rs (target/debug/deps/command_response-eb0b1fd96dafd341)

running 1 test
test command_response ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.13s

     Running tests/crypto.rs (target/debug/deps/crypto-b10b63cd77c667e5)

running 1 test
test gen_key ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s

     Running tests/cv25519.rs (target/debug/deps/cv25519-70b806ef9bb9d852)

running 1 test
test cv25519_gpg ... FAILED

failures:

---- cv25519_gpg stdout ----
[INFO  vpicc] Connecting to vpcd on 127.0.0.1:35963

thread 'cv25519_gpg' panicked at tests/virt/mod.rs:13:38:
failed to connect to vpcd: Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    cv25519_gpg

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

error: test failed, to rerun pass `--test cv25519`
make: *** [Makefile:37: test] Error 101

Commands used since the install of wsl:

   git config --global http.proxy "http://192.168.160.1:7890"
   sudo apt update
   sudo apt install build-essential
   git config --global http.proxy "http://192.168.160.1:7890"
   git config --global https.proxy "http://192.168.160.1:7890"
   sudo apt install make curl wget
   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

   git clone https://github.com/frankmorgner/vsmartcard.git
   cd vsmartcard
   git submodule update --init --recursive
   sudo apt install autoconf
   sudo apt install libtool 
   sudo apt install libtool pkg-config
   cd virtualsmartcard
   autoreconf --verbose --install
   sudo apt install help2man
   ./configure --sysconfdir=/etc
   make
   sudo make install

In another terminal:
   git clone https://github.com/Nitrokey/opcard-rs.git
   sudo apt install pkgconf libpcsclite-dev
   sudo apt install clang llvm pkg-config nettle-dev
   make test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions