aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/file_SUITE.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-03-12 17:07:16 +0100
committerSverker Eriksson <[email protected]>2014-03-24 21:09:49 +0100
commit2d2ce325546bc93178d1343e2a53911b890cc259 (patch)
tree9ade83ec1d0b459ac2c6f45d5979fe8248528433 /lib/kernel/test/file_SUITE.erl
parentcb748a7989ed79cdac9454fe25a6b93b3b6f8393 (diff)
downloadotp-2d2ce325546bc93178d1343e2a53911b890cc259.tar.gz
otp-2d2ce325546bc93178d1343e2a53911b890cc259.tar.bz2
otp-2d2ce325546bc93178d1343e2a53911b890cc259.zip
erts: Make file:make_symlink/2 return {error,eperm} on Windows
if the user has not the privilege SE_CREATE_SYMBOLIC_LINK_NAME
Diffstat (limited to 'lib/kernel/test/file_SUITE.erl')
-rw-r--r--lib/kernel/test/file_SUITE.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl
index a6e4e639f4..e4eca4b756 100644
--- a/lib/kernel/test/file_SUITE.erl
+++ b/lib/kernel/test/file_SUITE.erl
@@ -2670,6 +2670,9 @@ symlinks(Config) when is_list(Config) ->
case ?FILE_MODULE:make_symlink(Name, Alias) of
{error, enotsup} ->
{skipped, "Links not supported on this platform"};
+ {error, eperm} ->
+ {win32,_} = os:type(),
+ {skipped, "Windows user not privileged to create symlinks"};
ok ->
?line {ok, Info1} = ?FILE_MODULE:read_file_info(Name),
?line {ok, Info1} = ?FILE_MODULE:read_file_info(Alias),
@@ -3596,7 +3599,11 @@ otp_10852(Config) when is_list(Config) ->
ok = rpc_call(Node, list_dir_all, [B]),
ok = rpc_call(Node, read_file, [B]),
ok = rpc_call(Node, make_link, [B,B]),
- ok = rpc_call(Node, make_symlink, [B,B]),
+ case rpc_call(Node, make_symlink, [B,B]) of
+ ok -> ok;
+ {error, E} when (E =:= enotsup) or (E =:= eperm) ->
+ {win32,_} = os:type()
+ end,
ok = rpc_call(Node, delete, [B]),
ok = rpc_call(Node, make_dir, [B]),
ok = rpc_call(Node, del_dir, [B]),