Comments (10)
I'll look into this later if there is a shim missing
from miri.
Does .\miri test
without any env var work?
from miri.
Yes, that is the first case.
from miri.
Tests also pass when cross-interpreting i686-pc-windows-msvc
from miri.
Ah, sorry, I read too quickly. Well that's something at least. :)
So there's a problem creating symlinks. Wasn't there something where creating symlinks on Windows needs admin permissions or so? It works on CI though...
We should definitely do a better job at saying what the error was, though... Uncategorized
is not super useful.^^
Based upon the instructions inside the test I looked for miri_ files, but there were none in the tmp directory. Also setting TMPDIR or MIRI_TEMP to other paths had no affect.
The directory gets cleaned up when tests are done (even if they fail), so you wouldn't see any trace of that. If it gets to test_symlink it means these other tests already passed
test_path_conversion();
test_file();
test_file_clone();
test_file_create_new();
test_seek();
test_metadata();
test_file_set_len();
test_file_sync();
So I think it's safe to say the directory exists and works as expected, just symlinks don't.
from miri.
TBH I have no idea how symlinks work on Windows. I've never used them.
And since you mentioned it, I ran the tests under admin and they passed. So yeah, that seems to be correct.
from miri.
Okay, good to know that we figured out the cause of this. :)
Not sure what the best way is to deal with this. We could ignore permission errors (if we can detect them, Uncategorized
is not very encouraging). We could move symlink tests into a separate file and disable them on Windows hosts... that's probably the best option, but it's kind of a shame.
@ChrisDenton do you have any better ideas?
from miri.
You can enable "developer mode" in settings to allow unprivileged symlinks creation. So one option would just be to document this as a requirement.
Otherwise maybe there could be a check to see if the host supports symlinks (e.g. by trying to create one)?
from miri.
With #3589 it does make it clearer. At least it is an error code that google can tell me about.
error: unsupported operation: unsupported io error: A required privilege is not held by the client. (os error 1314)
--> C:\Users\rsmyth\.rustup\toolchains\miri\lib\rustlib\src\rust\library\std\src\sys\pal\unix\fs.rs:1732:26
|
LL | cvt(unsafe { libc::symlink(original.as_ptr(), link.as_ptr()) }).map(|_| ())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsupported io error: A required privilege is not held by the client. (os error 1314)
|
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
= note: BACKTRACE:
= note: inside closure at C:\Users\rsmyth\.rustup\toolchains\miri\lib\rustlib\src\rust\library\std\src\sys\pal\unix\fs.rs:1732:26: 1732:73
= note: inside `std::sys::pal::common::small_c_string::run_with_cstr_stack::<()>` at C:\Users\rsmyth\.rustup\toolchains\miri\lib\rustlib\src\rust\library\std\src\sys\pal\common\small_c_string.rs:49:18: 49:22
= note: inside `std::sys::pal::common::small_c_string::run_with_cstr::<()>` at C:\Users\rsmyth\.rustup\toolchains\miri\lib\rustlib\src\rust\library\std\src\sys\pal\common\small_c_string.rs:29:18: 29:47
= note: inside `std::sys::pal::common::small_c_string::run_path_with_cstr::<()>` at C:\Users\rsmyth\.rustup\toolchains\miri\lib\rustlib\src\rust\library\std\src\sys\pal\common\small_c_string.rs:19:5: 19:58
= note: inside closure at C:\Users\rsmyth\.rustup\toolchains\miri\lib\rustlib\src\rust\library\std\src\sys\pal\unix\fs.rs:1731:9: 1733:11
= note: inside `std::sys::pal::common::small_c_string::run_with_cstr_stack::<()>` at C:\Users\rsmyth\.rustup\toolchains\miri\lib\rustlib\src\rust\library\std\src\sys\pal\common\small_c_string.rs:49:18: 49:22
= note: inside `std::sys::pal::common::small_c_string::run_with_cstr::<()>` at C:\Users\rsmyth\.rustup\toolchains\miri\lib\rustlib\src\rust\library\std\src\sys\pal\common\small_c_string.rs:29:18: 29:47
= note: inside `std::sys::pal::common::small_c_string::run_path_with_cstr::<()>` at C:\Users\rsmyth\.rustup\toolchains\miri\lib\rustlib\src\rust\library\std\src\sys\pal\common\small_c_string.rs:19:5: 19:58
= note: inside `std::sys::pal::unix::fs::symlink` at C:\Users\rsmyth\.rustup\toolchains\miri\lib\rustlib\src\rust\library\std\src\sys\pal\unix\fs.rs:1730:5: 1734:7
= note: inside `std::os::unix::fs::symlink::<&std::path::PathBuf, &std::path::PathBuf>` at C:\Users\rsmyth\.rustup\toolchains\miri\lib\rustlib\src\rust\library\std\src\os\unix\fs.rs:951:5: 951:55
note: inside `test_symlink`
--> tests/pass\shims\fs.rs:233:5
|
LL | std::os::unix::fs::symlink(&path, &symlink_path).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
--> tests/pass\shims\fs.rs:32:5
|
LL | test_symlink();
| ^^^^^^^^^^^^^^
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
error: aborting due to 1 previous error
from miri.
from miri.
Related Issues (20)
- "Install tools" always runs, even when there was a cache hit HOT 4
- Add support for many-seeds mode to `cargo miri`
- Implement futex support on FreeBSD (_umtx_op)
- Use non-deterministic precision for float operations that do not have guaranteed precision HOT 1
- Solaris: add stub shims so that pre-main code works
- Illumos: make basic std facilities work HOT 1
- FreeBSD: implement support for pthread synchronization primitives
- Give `FileDescription::{read, write}` access to the `InterpCx` HOT 1
- Make `malloc(0)` and `posix_memalign(0)` return a non-null pointer HOT 8
- Implement aligned_alloc HOT 10
- Detect UB due to mismatching declarations? HOT 1
- Cannot add new targets after installation of toolchain HOT 4
- Revamp "./miri test": parse --target ourselves, pass the rest to the test harness HOT 3
- miri-script: use a proper CLI arg parsing tool HOT 1
- macOS: support calling native functions
- Support more ways of using mmap
- Complete basic support for wasm32-wasip2 HOT 9
- Complete basic support for android HOT 3
- strerror based on ErrorKind is technically valid but surprising HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miri.