Skip to content

Cargo test fails on current master #8271

Closed
@marvin-bitterlich

Description

@marvin-bitterlich

Problem
When I run cargo test on the current master, I get 4 failed tests, that do not fail on ci.

This is the result:

failures:

---- config_include::cli_include_failed stdout ----
thread 'config_include::cli_include_failed' panicked at 'Did not find expected:
failed to load --config include

Caused by:
  failed to load config include `foobar` from `--config cli option`

Caused by:
  failed to read configuration file `[..]/foobar`

Caused by:
  The system cannot find the file specified. (os error 2)
Actual:
failed to load --config include

Caused by:
  failed to load config include `foobar` from `--config cli option`

Caused by:
  failed to read configuration file `F:\Repos\cargo\target\cit\t537\foobar`

Caused by:
  Das System kann die angegebene Datei nicht finden. (os error 2)
', tests\testsuite\config.rs:204:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- config_include::missing_file stdout ----
thread 'config_include::missing_file' panicked at 'Did not find expected:
could not load Cargo configuration

Caused by:
  failed to load config include `missing` from `[..]/.cargo/config`

Caused by:
  failed to read configuration file `[..]/.cargo/missing`

Caused by:
  The system cannot find the file specified. (os error 2)
Actual:
could not load Cargo configuration

Caused by:
  failed to load config include `missing` from `F:\Repos\cargo\target\cit\t543\.cargo\config`

Caused by:
  failed to read configuration file `F:\Repos\cargo\target\cit\t543\.cargo\missing`

Caused by:
  Das System kann die angegebene Datei nicht finden. (os error 2)
', tests\testsuite\config.rs:204:9

---- install::uninstall_cwd_no_project stdout ----
running `F:\Repos\cargo\target\debug\cargo.exe uninstall`
thread 'install::uninstall_cwd_no_project' panicked at '
Expected: execs
    but: differences:
  3 - |  The system cannot find the file specified. (os error 2)|
    + |  Das System kann die angegebene Datei nicht finden. (os error 2)|


other output:
``', crates\cargo-test-support\src\lib.rs:832:13

---- package::reserved_windows_name stdout ----
running `F:\Repos\cargo\target\debug\cargo.exe package`
thread 'package::reserved_windows_name' panicked at '
Expected: execs
    but: expected to find:
error: failed to verify package tarball

Caused by:
  failed to download replaced source registry `[..]`

Caused by:
  failed to unpack package `[..] `[..]`)`

Caused by:
  failed to unpack entry at `[..]aux.rs`

Caused by:
  `[..]aux.rs` appears to contain a reserved Windows path, it cannot be extracted on Windows

Caused by:
  failed to unpack `[..]aux.rs`

Caused by:
  failed to unpack `[..]aux.rs` into `[..]aux.rs`

did not find in output:
warning: manifest has no documentation, homepage or repository.
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
   Packaging foo v0.0.1 (F:/Repos/cargo/target/cit/t1184/foo)
    Updating `F:/Repos/cargo/target/cit/t1184/registry` index
   Verifying foo v0.0.1 (F:/Repos/cargo/target/cit/t1184/foo)
 Downloading crates ...
  Downloaded bar v1.0.0 (registry `F:/Repos/cargo/target/cit/t1184/registry`)
error: failed to verify package tarball

Caused by:
  failed to download replaced source registry `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to unpack package `bar v1.0.0 (registry `F:/Repos/cargo/target/cit/t1184/registry`)`

Caused by:
  failed to unpack entry at `bar-1.0.0/src/aux.rs`

Caused by:
  `bar-1.0.0/src/aux.rs` appears to contain a reserved Windows path, it cannot be extracted on Windows

Caused by:
  failed to unpack `F:/Repos/cargo/target/cit/t1184/home/.cargo/registry/src/-4461cc62a68cd031/bar-1.0.0/src/aux.rs`

Caused by:
  failed to set mtime for `F:/Repos/cargo/target/cit/t1184/home/.cargo/registry/src/-4461cc62a68cd031/bar-1.0.0/src/aux.rs`

Caused by:
  Falscher Parameter. (os error 87)
', crates\cargo-test-support\src\lib.rs:832:13


failures:
    config_include::cli_include_failed
    config_include::missing_file
    install::uninstall_cwd_no_project
    package::reserved_windows_name

test result: FAILED. 1850 passed; 4 failed; 3 ignored; 0 measured; 0 filtered out

Steps

  1. Use a German windows machine
  2. check out the current master
  3. run cargo test

Possible Solution(s)

  • I am assuming that some of the problems come from string matching with windows error. Those errors seem to be in German on my machine.

Notes

Output of cargo version:

F:\Repos\cargo>cargo version
cargo 1.43.0 (2cbe9048e 2020-05-03)
F:\Repos\cargo>rustup show
Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\<user>\.rustup

installed toolchains
--------------------

stable-x86_64-pc-windows-msvc
nightly-2019-03-19-x86_64-pc-windows-msvc
nightly-2019-05-14-x86_64-pc-windows-msvc
nightly-2019-07-15-x86_64-pc-windows-msvc
nightly-2019-08-13-x86_64-pc-windows-msvc
nightly-2019-08-15-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc

installed targets for active toolchain
--------------------------------------

i686-pc-windows-msvc
wasm32-unknown-unknown
x86_64-pc-windows-msvc

active toolchain
----------------

stable-x86_64-pc-windows-msvc (default)
rustc 1.43.1 (8d69840ab 2020-05-04)

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions