Skip to content

Commit 7c5cff7

Browse files
committed
regression test for 66530.
it uses normalize-stderr-test because not all targets hit the same OS error number nor message ... ... and ignores tidy since I dont know how to make the normalize line shorter ... and has effectively a no-op for its error-pattern because the targets' error messages are so wildly different (and the error-pattern check occurs *before* stderr normalization.)
1 parent 0435c1b commit 7c5cff7

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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.
7+
8+
// compile-flags: -o /dev/null
9+
10+
// The error-pattern check occurs *before* normalization, and the error patterns
11+
// are wildly different between build environments. So this is a cop-out (and we
12+
// rely on the checking of the normalized stderr output as our actual
13+
// "verification" of the diagnostic).
14+
15+
// error-pattern: error
16+
17+
// On Mac OS X, we get an error like the below
18+
// normalize-stderr-test "failed to write bytecode to /dev/null.non_ice_error_on_worker_io_fail.*" -> "io error modifying /dev/"
19+
20+
// On Linux, we get an error like the below
21+
// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying /dev/"
22+
23+
// ignore-tidy-linelength
24+
// ignore-windows - this is a unix-specific test
25+
// ignore-emscripten - the file-system issues do not replicate here
26+
// ignore-wasm - the file-system issues do not replicate here
27+
28+
#![crate_type="lib"]
29+
30+
#![cfg_attr(not(feature = "std"), no_std)]
31+
pub mod task {
32+
pub mod __internal {
33+
use crate::task::Waker;
34+
}
35+
pub use core::task::Waker;
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
warning: ignoring --out-dir flag due to -o flag
2+
3+
error: io error modifying /dev/
4+
5+
error: aborting due to previous error
6+

0 commit comments

Comments
 (0)