]> git.proxmox.com Git - rustc.git/blame - tests/ui/io-checks/inaccessbile-temp-dir.rs
New upstream version 1.70.0+dfsg2
[rustc.git] / tests / ui / io-checks / inaccessbile-temp-dir.rs
CommitLineData
dfeec247
XL
1// Issue #66530: We would ICE if someone compiled with `-o /dev/null`,
2// because we would try to generate auxiliary files in `/dev/` (which
3// at least the OS X file system rejects).
4//
5// An attempt to `-o` into a directory we cannot write into should indeed
6// be an error; but not an ICE.
f9f354fc
XL
7//
8// However, some folks run tests as root, which can write `/dev/` and end
9// up clobbering `/dev/null`. Instead we'll use a non-existent path, which
10// also used to ICE, but even root can't magically write there.
dfeec247 11
9ffffee4 12// compile-flags: -Z temps-dir=/does-not-exist/output
dfeec247
XL
13
14// The error-pattern check occurs *before* normalization, and the error patterns
15// are wildly different between build environments. So this is a cop-out (and we
16// rely on the checking of the normalized stderr output as our actual
17// "verification" of the diagnostic).
18
19// error-pattern: error
20
21// On Mac OS X, we get an error like the below
f9f354fc 22// normalize-stderr-test "failed to write bytecode to /does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying /does-not-exist/"
dfeec247
XL
23
24// On Linux, we get an error like the below
f9f354fc 25// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying /does-not-exist/"
dfeec247 26
dfeec247
XL
27// ignore-windows - this is a unix-specific test
28// ignore-emscripten - the file-system issues do not replicate here
29// ignore-wasm - the file-system issues do not replicate here
30// ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu
31
9ffffee4 32#![crate_type = "lib"]
dfeec247
XL
33#![cfg_attr(not(feature = "std"), no_std)]
34pub mod task {
35 pub mod __internal {
36 use crate::task::Waker;
37 }
38 pub use core::task::Waker;
39}