summaryrefslogtreecommitdiff
path: root/tests/ui
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-28 00:17:47 +0000
committerbors <bors@rust-lang.org>2023-04-28 00:17:47 +0000
commit9a3258fa52acdc4b63d0a49df2bd989153440d9b (patch)
treeb15ae7232a08c10d0369d4cb84c99ace516935c6 /tests/ui
parent1a6ae3d692cfb52b21d0f45ba50b659486e53d6c (diff)
parent1d847b86593d79511ddc78aa374c0f20536a449c (diff)
downloadrust-9a3258fa52acdc4b63d0a49df2bd989153440d9b.tar.gz
Auto merge of #110801 - WaffleLapkin:io-tests, r=jyn514
Fix `ui/io-checks/inaccessbile-temp-dir.rs` test Fixes #110794 r? `@jyn514`
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/io-checks/inaccessbile-temp-dir.rs39
-rw-r--r--tests/ui/io-checks/inaccessbile-temp-dir.stderr4
-rw-r--r--tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs16
-rw-r--r--tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr2
4 files changed, 5 insertions, 56 deletions
diff --git a/tests/ui/io-checks/inaccessbile-temp-dir.rs b/tests/ui/io-checks/inaccessbile-temp-dir.rs
deleted file mode 100644
index 9c0aa013572..00000000000
--- a/tests/ui/io-checks/inaccessbile-temp-dir.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// Issue #66530: We would ICE if someone compiled with `-o /dev/null`,
-// because we would try to generate auxiliary files in `/dev/` (which
-// at least the OS X file system rejects).
-//
-// An attempt to `-o` into a directory we cannot write into should indeed
-// be an error; but not an ICE.
-//
-// However, some folks run tests as root, which can write `/dev/` and end
-// up clobbering `/dev/null`. Instead we'll use a non-existent path, which
-// also used to ICE, but even root can't magically write there.
-
-// compile-flags: -Z temps-dir=/does-not-exist/output
-
-// The error-pattern check occurs *before* normalization, and the error patterns
-// are wildly different between build environments. So this is a cop-out (and we
-// rely on the checking of the normalized stderr output as our actual
-// "verification" of the diagnostic).
-
-// error-pattern: error
-
-// On Mac OS X, we get an error like the below
-// 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/"
-
-// On Linux, we get an error like the below
-// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying /does-not-exist/"
-
-// ignore-windows - this is a unix-specific test
-// ignore-emscripten - the file-system issues do not replicate here
-// ignore-wasm - the file-system issues do not replicate here
-// ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu
-
-#![crate_type = "lib"]
-#![cfg_attr(not(feature = "std"), no_std)]
-pub mod task {
- pub mod __internal {
- use crate::task::Waker;
- }
- pub use core::task::Waker;
-}
diff --git a/tests/ui/io-checks/inaccessbile-temp-dir.stderr b/tests/ui/io-checks/inaccessbile-temp-dir.stderr
deleted file mode 100644
index 2fc5f93ef79..00000000000
--- a/tests/ui/io-checks/inaccessbile-temp-dir.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-error: failed to find or create the directory specified by `--temps-dir`
-
-error: aborting due to previous error
-
diff --git a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
index 134e7d420e3..6ec81a94306 100644
--- a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
+++ b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
@@ -9,7 +9,7 @@
// up clobbering `/dev/null`. Instead we'll use a non-existent path, which
// also used to ICE, but even root can't magically write there.
-// compile-flags: -o /does-not-exist/output
+// compile-flags: -o ./does-not-exist/output
// The error-pattern check occurs *before* normalization, and the error patterns
// are wildly different between build environments. So this is a cop-out (and we
@@ -19,22 +19,14 @@
// error-pattern: error
// On Mac OS X, we get an error like the below
-// 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/"
+// 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/"
// On Linux, we get an error like the below
-// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying /does-not-exist/"
+// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying ./does-not-exist/"
// ignore-windows - this is a unix-specific test
// ignore-emscripten - the file-system issues do not replicate here
// ignore-wasm - the file-system issues do not replicate here
// ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu
-#![crate_type="lib"]
-
-#![cfg_attr(not(feature = "std"), no_std)]
-pub mod task {
- pub mod __internal {
- use crate::task::Waker;
- }
- pub use core::task::Waker;
-}
+#![crate_type = "lib"]
diff --git a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr
index edadecf273a..f1d9ed8ac8b 100644
--- a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr
+++ b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr
@@ -1,6 +1,6 @@
warning: ignoring --out-dir flag due to -o flag
-error: io error modifying /does-not-exist/
+error: io error modifying ./does-not-exist/
error: aborting due to previous error; 1 warning emitted