Skip to content

cargo miri test with an empty lib.rs fails inside the testrunner in std::sys::windows::io::is_terminal on Windows #103504

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

Closed
dimpolo opened this issue Oct 24, 2022 · 3 comments
Labels
A-miri Area: The miri tool C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression.

Comments

@dimpolo
Copy link
Contributor

dimpolo commented Oct 24, 2022

Code

Running cargo miri test with an empty lib.rs fails inside the testrunner in std::sys::windows::io::is_terminal on Windows.

I believe this was introduced in 326ef47 @joshtriplett

Version with regression

rustc --version --verbose:

rustc 1.66.0-nightly (7fcf850d7 2022-10-23)
binary: rustc
commit-hash: 7fcf850d7942804990a1d2e3fe036622a0fe4c74
commit-date: 2022-10-23
host: x86_64-pc-windows-msvc
release: 1.66.0-nightly
LLVM version: 15.0.2

Backtrace

Backtrace

error: unsupported operation: can't call foreign function: GetFileType
   --> C:\Users\d.polonski\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\io.rs:124:8
    |
124 |     if c::GetFileType(handle) != c::FILE_TYPE_PIPE {
    |        ^^^^^^^^^^^^^^^^^^^^^^ can't call foreign function: GetFileType
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
    = note: BACKTRACE:
    = note: inside `std::sys::windows::io::msys_tty_on` at C:\Users\d.polonski\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\io.rs:
124:8
    = note: inside `std::sys::windows::io::handle_is_console` at C:\Users\d.polonski\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\
io.rs:119:5
    = note: inside `std::sys::windows::io::is_terminal::<std::io::Stdout>` at C:\Users\d.polonski\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src
\sys\windows\io.rs:87:14
    = note: inside `<std::io::Stdout as std::io::IsTerminal>::is_terminal` at C:\Users\d.polonski\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src
\io\stdio.rs:1059:17
    = note: inside `test::TestOpts::use_color` at C:\Users\d.polonski\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\test\src\cli.rs:35:58
    = note: inside `test::run_tests_console` at C:\Users\d.polonski\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\test\src\console.rs:274:13
    = note: inside `test::test_main` at C:\Users\d.polonski\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\test\src\lib.rs:115:15
    = note: inside `test::test_main_static` at C:\Users\d.polonski\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\test\src\lib.rs:134:5
    = note: inside `main`

@rustbot modify labels: +regression-from-nightly-to-nightly -regression-untriaged

@dimpolo dimpolo added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Oct 24, 2022
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 24, 2022
@ChrisDenton
Copy link
Member

Sorry, that was me. I submitted a patch to miri but apparently they've been having a spot of bother merging Miri commits back into the rust repo.

@ChrisDenton ChrisDenton added the A-miri Area: The miri tool label Oct 25, 2022
@dimpolo
Copy link
Contributor Author

dimpolo commented Oct 25, 2022

Ah I see, seems like #103392 might fix this

@apiraino apiraino added T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. and removed T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Oct 26, 2022
@dimpolo
Copy link
Contributor Author

dimpolo commented Oct 26, 2022

fixed by #103392

@dimpolo dimpolo closed this as completed Oct 26, 2022
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-miri Area: The miri tool C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression.
Projects
None yet
Development

No branches or pull requests

4 participants