diff options
author | John Högberg <john@erlang.org> | 2019-04-01 11:17:57 +0200 |
---|---|---|
committer | John Högberg <john@erlang.org> | 2019-04-01 11:17:57 +0200 |
commit | 2db15b8dd2af46c51d07dd7635057ab5421afe6d (patch) | |
tree | ae1b489dec64028218a9a0cfd92fb4d0874bf8f7 /lib/kernel/test/file_SUITE.erl | |
parent | d7a825fdf0fc63cff67bd35d35c1a6de7c533e55 (diff) | |
parent | 261f171079f98c7037309fcb7b2967e9fb79cfe5 (diff) | |
download | otp-2db15b8dd2af46c51d07dd7635057ab5421afe6d.tar.gz otp-2db15b8dd2af46c51d07dd7635057ab5421afe6d.tar.bz2 otp-2db15b8dd2af46c51d07dd7635057ab5421afe6d.zip |
Merge branch 'john/kernel/cuddle-file-suite'
* john/kernel/cuddle-file-suite:
file_name_SUITE: Darwin 18 broke support for 'icky' names
file_SUITE: Ignore EILSEQ on Darwin in +fnu/latin1 test
Diffstat (limited to 'lib/kernel/test/file_SUITE.erl')
-rw-r--r-- | lib/kernel/test/file_SUITE.erl | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl index 711ffccb67..e095e589a3 100644 --- a/lib/kernel/test/file_SUITE.erl +++ b/lib/kernel/test/file_SUITE.erl @@ -3744,19 +3744,33 @@ otp_10852(Config) when is_list(Config) -> ok = rpc_call(Node, read_file, [B]), ok = rpc_call(Node, make_link, [B,B]), case rpc_call(Node, make_symlink, [B,B]) of - ok -> ok; - {error, E} when (E =:= enotsup) or (E =:= eperm) -> - {win32,_} = os:type() + {error, eilseq} -> + %% Some versions of OS X refuse to create files with illegal names. + {unix,darwin} = os:type(); + {error, eperm} -> + %% The test user might not have permission to create symlinks. + {win32,_} = os:type(); + ok -> + ok end, ok = rpc_call(Node, delete, [B]), - ok = rpc_call(Node, make_dir, [B]), + case rpc_call(Node, make_dir, [B]) of + {error, eilseq} -> + {unix,darwin} = os:type(); + ok -> + ok + end, ok = rpc_call(Node, del_dir, [B]), - ok = rpc_call(Node, write_file, [B,B]), - {ok, Fd} = rpc_call(Node, open, [B,[read]]), - ok = rpc_call(Node, close, [Fd]), - {ok,0} = rpc_call(Node, copy, [B,B]), - {ok, Fd2, B} = rpc_call(Node, path_open, [["."], B, [read]]), - ok = rpc_call(Node, close, [Fd2]), + case rpc_call(Node, write_file, [B,B]) of + {error, eilseq} -> + {unix,darwin} = os:type(); + ok -> + {ok, Fd} = rpc_call(Node, open, [B,[read]]), + ok = rpc_call(Node, close, [Fd]), + {ok,0} = rpc_call(Node, copy, [B,B]), + {ok, Fd2, B} = rpc_call(Node, path_open, [["."], B, [read]]), + ok = rpc_call(Node, close, [Fd2]) + end, true = test_server:stop_node(Node), ok. |