about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-01-13 02:26:29 +0800
committerGitHub <noreply@github.com>2018-01-13 02:26:29 +0800
commit8aab0cc861e48590964a88fa06e1d7c6d29ecbf3 (patch)
tree9391d2afffcd2baca74e1fdcb1c6f5dabd818069 /src/test
parent1233602283a4510c3ab8c77054c570d57ee7100b (diff)
parentb69c32097add128aca50277d6aea5c01f8afaf2a (diff)
downloadrust-8aab0cc861e48590964a88fa06e1d7c6d29ecbf3.tar.gz
rust-8aab0cc861e48590964a88fa06e1d7c6d29ecbf3.zip
Rollup merge of #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.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-make/linker-output-non-utf8/Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/test/run-make/linker-output-non-utf8/Makefile b/src/test/run-make/linker-output-non-utf8/Makefile
index 76d4b133def..5f1577ab44d 100644
--- a/src/test/run-make/linker-output-non-utf8/Makefile
+++ b/src/test/run-make/linker-output-non-utf8/Makefile
@@ -2,15 +2,16 @@
 
 # Make sure we don't ICE if the linker prints a non-UTF-8 error message.
 
-ifdef IS_WINDOWS
-# ignore windows
+# Ignore Windows and Apple
 
 # This does not work in its current form on windows, possibly due to
 # gcc bugs or something about valid Windows paths.  See issue #29151
 # for more information.
-all:
+ifndef IS_WINDOWS
 
-else
+# This also does not work on Apple APFS due to the filesystem requiring
+# valid UTF-8 paths.
+ifneq ($(shell uname),Darwin)
 
 # The zzz it to allow humans to tab complete or glob this thing.
 bad_dir := $(TMPDIR)/zzz$$'\xff'
@@ -20,5 +21,12 @@ all:
 	mkdir $(bad_dir)
 	mv $(TMPDIR)/liblibrary.a $(bad_dir)
 	LIBRARY_PATH=$(bad_dir) $(RUSTC) exec.rs 2>&1 | $(CGREP) this_symbol_not_defined
+else
+all:
+
+endif
+
+else
+all:
 
 endif