about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2023-03-30 21:07:00 +0900
committerGitHub <noreply@github.com>2023-03-30 21:07:00 +0900
commit2981d7781cf14041278a028c40fb790a14f1a3e8 (patch)
tree33a349b2c2f3088e91b65ff94e7126b91af34674 /tests/ui
parentd6f27401f12f02876aa6fe53139b030033f37e5e (diff)
parent1692d0c142985a01a2770da8654912dc40342412 (diff)
downloadrust-2981d7781cf14041278a028c40fb790a14f1a3e8.tar.gz
rust-2981d7781cf14041278a028c40fb790a14f1a3e8.zip
Rollup merge of #109509 - ehuss:overlapping-tests, r=Mark-Simulacrum
compiletest: Don't allow tests with overlapping prefix names

Some tests will delete their output directory before starting. The output directory is based on the test names. If one test is the prefix of another test, then when that test starts, it could try to delete the output directory of the other test with the longer path, or otherwise clash with it while the two tests are trying to create/delete/modify the same directory.

In practice, this manifested as a random error on macOS where two tests were trying to create/delete/create `rustdoc/primitive` and `rustdoc/primitive/no_std`, which resulted in an EINVAL (InvalidInput) error.

This renames some of the offending tests, adds `compiletest-ignore-dir` to prevent compiletest from processing some files, and adds a check to prevent this from happening in the future.

Fixes #109397
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs (renamed from tests/ui/impl-trait/multiple-lifetimes.rs)0
-rw-r--r--tests/ui/modules_and_files_visibility/mod_file_disambig_aux/compiletest-ignore-dir0
-rw-r--r--tests/ui/non_modrs_mods_and_inline_mods/x/y/z/compiletest-ignore-dir0
-rw-r--r--tests/ui/use/use-mod/use-mod.rs (renamed from tests/ui/use/use-mod.rs)0
-rw-r--r--tests/ui/use/use-mod/use-mod.stderr (renamed from tests/ui/use/use-mod.stderr)0
-rw-r--r--tests/ui/use/use.rs (renamed from tests/ui/use.rs)0
6 files changed, 0 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/multiple-lifetimes.rs b/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs
index 5407fb6dd28..5407fb6dd28 100644
--- a/tests/ui/impl-trait/multiple-lifetimes.rs
+++ b/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs
diff --git a/tests/ui/modules_and_files_visibility/mod_file_disambig_aux/compiletest-ignore-dir b/tests/ui/modules_and_files_visibility/mod_file_disambig_aux/compiletest-ignore-dir
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/ui/modules_and_files_visibility/mod_file_disambig_aux/compiletest-ignore-dir
diff --git a/tests/ui/non_modrs_mods_and_inline_mods/x/y/z/compiletest-ignore-dir b/tests/ui/non_modrs_mods_and_inline_mods/x/y/z/compiletest-ignore-dir
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/ui/non_modrs_mods_and_inline_mods/x/y/z/compiletest-ignore-dir
diff --git a/tests/ui/use/use-mod.rs b/tests/ui/use/use-mod/use-mod.rs
index 87064c6a42b..87064c6a42b 100644
--- a/tests/ui/use/use-mod.rs
+++ b/tests/ui/use/use-mod/use-mod.rs
diff --git a/tests/ui/use/use-mod.stderr b/tests/ui/use/use-mod/use-mod.stderr
index 0cae5eb14ae..0cae5eb14ae 100644
--- a/tests/ui/use/use-mod.stderr
+++ b/tests/ui/use/use-mod/use-mod.stderr
diff --git a/tests/ui/use.rs b/tests/ui/use/use.rs
index 1beee4a5143..1beee4a5143 100644
--- a/tests/ui/use.rs
+++ b/tests/ui/use/use.rs