Skip to content

Commit 8aab0cc

Browse files
authored
Rollup merge of rust-lang#47289 - etaoins:skip-linker-output-non-utf8-test-on-apple, r=kennytm
Skip linker-output-non-utf8 test on Apple This test fails on APFS filesystems with the following error: ```shell mkdir: /Users/ryan/Code/rust/build/x86_64-apple-darwin/test/run-make/linker-output-non-utf8.stage2-x86_64-apple-darwin/zzz�: Illegal byte sequence ``` The mkdir does succeed on an HFS+ volume mounted on the same system: ```shell $ mkdir zzz$$'\xff' $ ls zzz47432\xff ``` This is due to APFS now requiring that all paths are valid UTF-8. As APFS will be the default filesystem for all new Darwin-based systems the most straightforward fix is to skip this test on Darwin as well as Windows.
2 parents 1233602 + b69c320 commit 8aab0cc

File tree

1 file changed

+12
-4
lines changed
  • src/test/run-make/linker-output-non-utf8

1 file changed

+12
-4
lines changed

src/test/run-make/linker-output-non-utf8/Makefile

+12-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
# Make sure we don't ICE if the linker prints a non-UTF-8 error message.
44

5-
ifdef IS_WINDOWS
6-
# ignore windows
5+
# Ignore Windows and Apple
76

87
# This does not work in its current form on windows, possibly due to
98
# gcc bugs or something about valid Windows paths. See issue #29151
109
# for more information.
11-
all:
10+
ifndef IS_WINDOWS
1211

13-
else
12+
# This also does not work on Apple APFS due to the filesystem requiring
13+
# valid UTF-8 paths.
14+
ifneq ($(shell uname),Darwin)
1415

1516
# The zzz it to allow humans to tab complete or glob this thing.
1617
bad_dir := $(TMPDIR)/zzz$$'\xff'
@@ -20,5 +21,12 @@ all:
2021
mkdir $(bad_dir)
2122
mv $(TMPDIR)/liblibrary.a $(bad_dir)
2223
LIBRARY_PATH=$(bad_dir) $(RUSTC) exec.rs 2>&1 | $(CGREP) this_symbol_not_defined
24+
else
25+
all:
26+
27+
endif
28+
29+
else
30+
all:
2331

2432
endif

0 commit comments

Comments
 (0)